explore --db adventureworks
Data explorer
Ask the ERP database of a bike maker a question in plain words. A language model explores the tables, and you see every step it takes, the SQL behind the answer and the result.
10 questions left this hour. Model: xiaomi/mimo-v2.6-flash via OpenRouter. Questions are sent to the model provider and kept here for 30 days so that answers can be shared. Please don't type personal data.
Examples
- Which product categories grew most last quarter compared with the quarter before?
- Who were our top 10 customers by revenue this year?
- Which vendors have the highest rejection rate on deliveries?
- Where do we scrap the most in production, and why?
- How does online revenue compare with revenue through sales reps, by year?
- Which products are below their reorder point in inventory?
Schema
The tables the model sees, grouped as in the original database. In SQL, write table names without the group.
Sales (16)
CountryRegionCurrency
109 rows
Cross-reference table mapping ISO currency codes to a country or region.
-
CountryRegionCodeTEXT - ISO code for countries and regions. Foreign key to CountryRegion.CountryRegionCode. → CountryRegion.CountryRegionCode
-
CurrencyCodeTEXT - ISO standard currency code. Foreign key to Currency.CurrencyCode. → Currency.CurrencyCode
-
ModifiedDateTEXT - Date and time the record was last updated.
Currency
105 rows
Lookup table containing standard ISO currencies.
-
CurrencyCodeTEXT - The ISO code for the Currency.
-
NameTEXT - Currency name.
-
ModifiedDateTEXT - Date and time the record was last updated.
CurrencyRate
13532 rows
Currency exchange rates.
-
CurrencyRateIDINTEGER - Primary key for CurrencyRate records.
-
CurrencyRateDateTEXT - Date and time the exchange rate was obtained.
-
FromCurrencyCodeTEXT - Exchange rate was converted from this currency code. → Currency.CurrencyCode
-
ToCurrencyCodeTEXT - Exchange rate was converted to this currency code. → Currency.CurrencyCode
-
AverageRateREAL - Average exchange rate for the day.
-
EndOfDayRateREAL - Final exchange rate for the day.
-
ModifiedDateTEXT - Date and time the record was last updated.
Customer
19820 rows
Current customer information. Also see the Person and Store tables.
-
CustomerIDINTEGER - Primary key.
-
PersonIDINTEGER - Foreign key to Person.BusinessEntityID → Person.BusinessEntityID
-
StoreIDINTEGER - Foreign key to Store.BusinessEntityID → Store.BusinessEntityID
-
TerritoryIDINTEGER - ID of the territory in which the customer is located. Foreign key to SalesTerritory.SalesTerritoryID. → SalesTerritory.TerritoryID
-
AccountNumberTEXT - Unique number identifying the customer assigned by the accounting system.
-
ModifiedDateTEXT - Date and time the record was last updated.
SalesOrderDetail
121317 rows
Individual products associated with a specific sales order. See SalesOrderHeader.
-
SalesOrderIDINTEGER - Primary key. Foreign key to SalesOrderHeader.SalesOrderID. → SalesOrderHeader.SalesOrderID
-
SalesOrderDetailIDINTEGER - Primary key. One incremental unique number per product sold.
-
CarrierTrackingNumberTEXT - Shipment tracking number supplied by the shipper.
-
OrderQtyINTEGER - Quantity ordered per product.
-
ProductIDINTEGER - Product sold to customer. Foreign key to Product.ProductID. → SpecialOfferProduct.ProductID
-
SpecialOfferIDINTEGER - Promotional code. Foreign key to SpecialOffer.SpecialOfferID. → SpecialOfferProduct.SpecialOfferID
-
UnitPriceREAL - Selling price of a single product.
-
UnitPriceDiscountREAL - Discount amount.
-
LineTotalREAL - Per product subtotal. Computed as UnitPrice * (1 - UnitPriceDiscount) * OrderQty.
-
ModifiedDateTEXT - Date and time the record was last updated.
SalesOrderHeader
31465 rows
General sales order information.
-
SalesOrderIDINTEGER - Primary key.
-
RevisionNumberINTEGER - Incremental number to track changes to the sales order over time.
-
OrderDateTEXT - Dates the sales order was created.
-
DueDateTEXT - Date the order is due to the customer.
-
ShipDateTEXT - Date the order was shipped to the customer.
-
StatusINTEGER - Order current status. 1 = In process; 2 = Approved; 3 = Backordered; 4 = Rejected; 5 = Shipped; 6 = Cancelled
-
OnlineOrderFlagINTEGER - 0 = Order placed by sales person. 1 = Order placed online by customer.
-
SalesOrderNumberTEXT - Unique sales order identification number.
-
PurchaseOrderNumberTEXT - Customer purchase order number reference.
-
AccountNumberTEXT - Financial accounting number reference.
-
CustomerIDINTEGER - Customer identification number. Foreign key to Customer.BusinessEntityID. → Customer.CustomerID
-
SalesPersonIDINTEGER - Sales person who created the sales order. Foreign key to SalesPerson.BusinessEntityID. → SalesPerson.BusinessEntityID
-
TerritoryIDINTEGER - Territory in which the sale was made. Foreign key to SalesTerritory.SalesTerritoryID. → SalesTerritory.TerritoryID
-
BillToAddressIDINTEGER - Customer billing address. Foreign key to Address.AddressID. → Address.AddressID
-
ShipToAddressIDINTEGER - Customer shipping address. Foreign key to Address.AddressID. → Address.AddressID
-
ShipMethodIDINTEGER - Shipping method. Foreign key to ShipMethod.ShipMethodID. → ShipMethod.ShipMethodID
-
CurrencyRateIDINTEGER - Currency exchange rate used. Foreign key to CurrencyRate.CurrencyRateID. → CurrencyRate.CurrencyRateID
-
SubTotalREAL - Sales subtotal. Computed as SUM(SalesOrderDetail.LineTotal)for the appropriate SalesOrderID.
-
TaxAmtREAL - Tax amount.
-
FreightREAL - Shipping cost.
-
TotalDueREAL - Total due from customer. Computed as Subtotal + TaxAmt + Freight.
-
CommentTEXT - Sales representative comments.
-
ModifiedDateTEXT - Date and time the record was last updated.
SalesOrderHeaderSalesReason
27647 rows
Cross-reference table mapping sales orders to sales reason codes.
-
SalesOrderIDINTEGER - Primary key. Foreign key to SalesOrderHeader.SalesOrderID. → SalesOrderHeader.SalesOrderID
-
SalesReasonIDINTEGER - Primary key. Foreign key to SalesReason.SalesReasonID. → SalesReason.SalesReasonID
-
ModifiedDateTEXT - Date and time the record was last updated.
SalesPerson
17 rows
Sales representative current information.
-
BusinessEntityIDINTEGER - Primary key for SalesPerson records. Foreign key to Employee.BusinessEntityID → Employee.BusinessEntityID
-
TerritoryIDINTEGER - Territory currently assigned to. Foreign key to SalesTerritory.SalesTerritoryID. → SalesTerritory.TerritoryID
-
SalesQuotaREAL - Projected yearly sales.
-
BonusREAL - Bonus due if quota is met.
-
CommissionPctREAL - Commision percent received per sale.
-
SalesYTDREAL - Sales total year to date.
-
SalesLastYearREAL - Sales total of previous year.
-
ModifiedDateTEXT - Date and time the record was last updated.
SalesPersonQuotaHistory
163 rows
Sales performance tracking.
-
BusinessEntityIDINTEGER - Sales person identification number. Foreign key to SalesPerson.BusinessEntityID. → SalesPerson.BusinessEntityID
-
QuotaDateTEXT - Sales quota date.
-
SalesQuotaREAL - Sales quota amount.
-
ModifiedDateTEXT - Date and time the record was last updated.
SalesReason
10 rows
Lookup table of customer purchase reasons.
-
SalesReasonIDINTEGER - Primary key for SalesReason records.
-
NameTEXT - Sales reason description.
-
ReasonTypeTEXT - Category the sales reason belongs to.
-
ModifiedDateTEXT - Date and time the record was last updated.
SalesTaxRate
29 rows
Tax rate lookup table.
-
SalesTaxRateIDINTEGER - Primary key for SalesTaxRate records.
-
StateProvinceIDINTEGER - State, province, or country/region the sales tax applies to. → StateProvince.StateProvinceID
-
TaxTypeINTEGER - 1 = Tax applied to retail transactions, 2 = Tax applied to wholesale transactions, 3 = Tax applied to all sales (retail and wholesale) transactions.
-
TaxRateREAL - Tax rate amount.
-
NameTEXT - Tax rate description.
-
ModifiedDateTEXT - Date and time the record was last updated.
SalesTerritory
10 rows
Sales territory lookup table.
-
TerritoryIDINTEGER - Primary key for SalesTerritory records.
-
NameTEXT - Sales territory description
-
CountryRegionCodeTEXT - ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode.
-
GroupTEXT - Geographic area to which the sales territory belong.
-
SalesYTDREAL - Sales in the territory year to date.
-
SalesLastYearREAL - Sales in the territory the previous year.
-
CostYTDREAL - Business costs in the territory year to date.
-
CostLastYearREAL - Business costs in the territory the previous year.
-
ModifiedDateTEXT - Date and time the record was last updated.
SalesTerritoryHistory
17 rows
Sales representative transfers to other sales territories.
-
BusinessEntityIDINTEGER - Primary key. The sales rep. Foreign key to SalesPerson.BusinessEntityID. → SalesPerson.BusinessEntityID
-
TerritoryIDINTEGER - Primary key. Territory identification number. Foreign key to SalesTerritory.SalesTerritoryID. → SalesTerritory.TerritoryID
-
StartDateTEXT - Primary key. Date the sales representive started work in the territory.
-
EndDateTEXT - Date the sales representative left work in the territory.
-
ModifiedDateTEXT - Date and time the record was last updated.
SpecialOffer
16 rows
Sale discounts lookup table.
-
SpecialOfferIDINTEGER - Primary key for SpecialOffer records.
-
DescriptionTEXT - Discount description.
-
DiscountPctREAL - Discount precentage.
-
TypeTEXT - Discount type category.
-
CategoryTEXT - Group the discount applies to such as Reseller or Customer.
-
StartDateTEXT - Discount start date.
-
EndDateTEXT - Discount end date.
-
MinQtyINTEGER - Minimum discount percent allowed.
-
MaxQtyINTEGER - Maximum discount percent allowed.
-
ModifiedDateTEXT - Date and time the record was last updated.
SpecialOfferProduct
538 rows
Cross-reference table mapping products to special offer discounts.
-
SpecialOfferIDINTEGER - Primary key for SpecialOfferProduct records. → SpecialOffer.SpecialOfferID
-
ProductIDINTEGER - Product identification number. Foreign key to Product.ProductID. → Product.ProductID
-
ModifiedDateTEXT - Date and time the record was last updated.
Store
701 rows
Customers (resellers) of Adventure Works products.
-
BusinessEntityIDINTEGER - Primary key. Foreign key to Customer.BusinessEntityID. → BusinessEntity.BusinessEntityID
-
NameTEXT - Name of the store.
-
SalesPersonIDINTEGER - ID of the sales person assigned to the customer. Foreign key to SalesPerson.BusinessEntityID. → SalesPerson.BusinessEntityID
-
ModifiedDateTEXT - Date and time the record was last updated.
Purchasing (5)
ProductVendor
460 rows
Cross-reference table mapping vendors with the products they supply.
-
ProductIDINTEGER - Primary key. Foreign key to Product.ProductID. → Product.ProductID
-
BusinessEntityIDINTEGER - Primary key. Foreign key to Vendor.BusinessEntityID. → Vendor.BusinessEntityID
-
AverageLeadTimeINTEGER - The average span of time (in days) between placing an order with the vendor and receiving the purchased product.
-
StandardPriceREAL - The vendor's usual selling price.
-
LastReceiptCostREAL - The selling price when last purchased.
-
LastReceiptDateTEXT - Date the product was last received by the vendor.
-
MinOrderQtyINTEGER - The maximum quantity that should be ordered.
-
MaxOrderQtyINTEGER - The minimum quantity that should be ordered.
-
OnOrderQtyINTEGER - The quantity currently on order.
-
UnitMeasureCodeTEXT - The product's unit of measure. → UnitMeasure.UnitMeasureCode
-
ModifiedDateTEXT - Date and time the record was last updated.
PurchaseOrderDetail
7937 rows
Individual products associated with a specific purchase order. See PurchaseOrderHeader.
-
PurchaseOrderIDINTEGER - Primary key. Foreign key to PurchaseOrderHeader.PurchaseOrderID. → PurchaseOrderHeader.PurchaseOrderID
-
PurchaseOrderDetailIDINTEGER - Primary key. One line number per purchased product.
-
DueDateTEXT - Date the product is expected to be received.
-
OrderQtyINTEGER - Quantity ordered.
-
ProductIDINTEGER - Product identification number. Foreign key to Product.ProductID. → Product.ProductID
-
UnitPriceREAL - Vendor's selling price of a single product.
-
LineTotalREAL - Per product subtotal. Computed as OrderQty * UnitPrice.
-
ReceivedQtyREAL - Quantity actually received from the vendor.
-
RejectedQtyREAL - Quantity rejected during inspection.
-
StockedQtyREAL - Quantity accepted into inventory. Computed as ReceivedQty - RejectedQty.
-
ModifiedDateTEXT - Date and time the record was last updated.
PurchaseOrderHeader
3579 rows
General purchase order information. See PurchaseOrderDetail.
-
PurchaseOrderIDINTEGER - Primary key.
-
RevisionNumberINTEGER - Incremental number to track changes to the purchase order over time.
-
StatusINTEGER - Order current status. 1 = Pending; 2 = Approved; 3 = Rejected; 4 = Complete
-
EmployeeIDINTEGER - Employee who created the purchase order. Foreign key to Employee.BusinessEntityID. → Employee.BusinessEntityID
-
VendorIDINTEGER - Vendor with whom the purchase order is placed. Foreign key to Vendor.BusinessEntityID. → Vendor.BusinessEntityID
-
ShipMethodIDINTEGER - Shipping method. Foreign key to ShipMethod.ShipMethodID. → ShipMethod.ShipMethodID
-
OrderDateTEXT - Purchase order creation date.
-
ShipDateTEXT - Estimated shipment date from the vendor.
-
SubTotalREAL - Purchase order subtotal. Computed as SUM(PurchaseOrderDetail.LineTotal)for the appropriate PurchaseOrderID.
-
TaxAmtREAL - Tax amount.
-
FreightREAL - Shipping cost.
-
TotalDueREAL - Total due to vendor. Computed as Subtotal + TaxAmt + Freight.
-
ModifiedDateTEXT - Date and time the record was last updated.
ShipMethod
5 rows
Shipping company lookup table.
-
ShipMethodIDINTEGER - Primary key for ShipMethod records.
-
NameTEXT - Shipping company name.
-
ShipBaseREAL - Minimum shipping charge.
-
ShipRateREAL - Shipping charge per pound.
-
ModifiedDateTEXT - Date and time the record was last updated.
Vendor
104 rows
Companies from whom Adventure Works Cycles purchases parts or other goods.
-
BusinessEntityIDINTEGER - Primary key for Vendor records. Foreign key to BusinessEntity.BusinessEntityID → BusinessEntity.BusinessEntityID
-
AccountNumberTEXT - Vendor account (identification) number.
-
NameTEXT - Company name.
-
CreditRatingINTEGER - 1 = Superior, 2 = Excellent, 3 = Above average, 4 = Average, 5 = Below average
-
PreferredVendorStatusINTEGER - 0 = Do not use if another vendor is available. 1 = Preferred over other vendors supplying the same product.
-
ActiveFlagINTEGER - 0 = Vendor no longer used. 1 = Vendor is actively used.
-
PurchasingWebServiceURLTEXT -
ModifiedDateTEXT
Production (19)
BillOfMaterials
2679 rows
Items required to make bicycles and bicycle subassemblies. It identifies the heirarchical relationship between a parent product and its components.
-
BillOfMaterialsIDINTEGER - Primary key for BillOfMaterials records.
-
ProductAssemblyIDINTEGER - Parent product identification number. Foreign key to Product.ProductID. → Product.ProductID
-
ComponentIDINTEGER - Component identification number. Foreign key to Product.ProductID. → Product.ProductID
-
StartDateTEXT - Date the component started being used in the assembly item.
-
EndDateTEXT - Date the component stopped being used in the assembly item.
-
UnitMeasureCodeTEXT - Standard code identifying the unit of measure for the quantity. → UnitMeasure.UnitMeasureCode
-
BOMLevelINTEGER - Indicates the depth the component is from its parent (AssemblyID).
-
PerAssemblyQtyREAL - Quantity of the component needed to create the assembly.
-
ModifiedDateTEXT - Date and time the record was last updated.
Culture
8 rows
Lookup table containing the languages in which some AdventureWorks data is stored.
-
CultureIDTEXT - Primary key for Culture records.
-
NameTEXT - Culture description.
-
ModifiedDateTEXT - Date and time the record was last updated.
Location
14 rows
Product inventory and manufacturing locations.
-
LocationIDINTEGER - Primary key for Location records.
-
NameTEXT - Location description.
-
CostRateREAL - Standard hourly cost of the manufacturing location.
-
AvailabilityREAL - Work capacity (in hours) of the manufacturing location.
-
ModifiedDateTEXT - Date and time the record was last updated.
Product
504 rows
Products sold or used in the manfacturing of sold products.
-
ProductIDINTEGER - Primary key for Product records.
-
NameTEXT - Name of the product.
-
ProductNumberTEXT - Unique product identification number.
-
MakeFlagINTEGER - 0 = Product is purchased, 1 = Product is manufactured in-house.
-
FinishedGoodsFlagINTEGER - 0 = Product is not a salable item. 1 = Product is salable.
-
ColorTEXT - Product color.
-
SafetyStockLevelINTEGER - Minimum inventory quantity.
-
ReorderPointINTEGER - Inventory level that triggers a purchase order or work order.
-
StandardCostREAL - Standard cost of the product.
-
ListPriceREAL - Selling price.
-
SizeTEXT - Product size.
-
SizeUnitMeasureCodeTEXT - Unit of measure for Size column. → UnitMeasure.UnitMeasureCode
-
WeightUnitMeasureCodeTEXT - Unit of measure for Weight column. → UnitMeasure.UnitMeasureCode
-
WeightREAL - Product weight.
-
DaysToManufactureINTEGER - Number of days required to manufacture the product.
-
ProductLineTEXT - R = Road, M = Mountain, T = Touring, S = Standard
-
ClassTEXT - H = High, M = Medium, L = Low
-
StyleTEXT - W = Womens, M = Mens, U = Universal
-
ProductSubcategoryIDINTEGER - Product is a member of this product subcategory. Foreign key to ProductSubCategory.ProductSubCategoryID. → ProductSubcategory.ProductSubcategoryID
-
ProductModelIDINTEGER - Product is a member of this product model. Foreign key to ProductModel.ProductModelID. → ProductModel.ProductModelID
-
SellStartDateTEXT - Date the product was available for sale.
-
SellEndDateTEXT - Date the product was no longer available for sale.
-
DiscontinuedDateTEXT - Date the product was discontinued.
-
ModifiedDateTEXT - Date and time the record was last updated.
ProductCategory
4 rows
High-level product categorization.
-
ProductCategoryIDINTEGER - Primary key for ProductCategory records.
-
NameTEXT - Category description.
-
ModifiedDateTEXT - Date and time the record was last updated.
ProductCostHistory
395 rows
Changes in the cost of a product over time.
-
ProductIDINTEGER - Product identification number. Foreign key to Product.ProductID → Product.ProductID
-
StartDateTEXT - Product cost start date.
-
EndDateTEXT - Product cost end date.
-
StandardCostREAL - Standard cost of the product.
-
ModifiedDateTEXT - Date and time the record was last updated.
ProductDescription
762 rows
Product descriptions in several languages.
-
ProductDescriptionIDINTEGER - Primary key for ProductDescription records.
-
DescriptionTEXT - Description of the product.
-
ModifiedDateTEXT - Date and time the record was last updated.
ProductInventory
1069 rows
Product inventory information.
-
ProductIDINTEGER - Product identification number. Foreign key to Product.ProductID. → Product.ProductID
-
LocationIDINTEGER - Inventory location identification number. Foreign key to Location.LocationID. → Location.LocationID
-
ShelfTEXT - Storage compartment within an inventory location.
-
BinINTEGER - Storage container on a shelf in an inventory location.
-
QuantityINTEGER - Quantity of products in the inventory location.
-
ModifiedDateTEXT - Date and time the record was last updated.
ProductListPriceHistory
395 rows
Changes in the list price of a product over time.
-
ProductIDINTEGER - Product identification number. Foreign key to Product.ProductID → Product.ProductID
-
StartDateTEXT - List price start date.
-
EndDateTEXT - List price end date
-
ListPriceREAL - Product list price.
-
ModifiedDateTEXT - Date and time the record was last updated.
ProductModel
128 rows
Product model classification.
-
ProductModelIDINTEGER - Primary key for ProductModel records.
-
NameTEXT - Product model description.
-
ModifiedDateTEXT - Date and time the record was last updated.
ProductModelProductDescriptionCulture
762 rows
Cross-reference table mapping product descriptions and the language the description is written in.
-
ProductModelIDINTEGER - Primary key. Foreign key to ProductModel.ProductModelID.
-
ProductDescriptionIDINTEGER - Primary key. Foreign key to ProductDescription.ProductDescriptionID. → ProductDescription.ProductDescriptionID
-
CultureIDTEXT - Culture identification number. Foreign key to Culture.CultureID.
-
ModifiedDateTEXT - Date and time the record was last updated.
ProductReview
4 rows
Customer reviews of products they have purchased.
-
ProductReviewIDINTEGER - Primary key for ProductReview records.
-
ProductIDINTEGER - Product identification number. Foreign key to Product.ProductID. → Product.ProductID
-
ReviewerNameTEXT - Name of the reviewer.
-
ReviewDateTEXT - Date review was submitted.
-
EmailAddressTEXT - Reviewer's e-mail address.
-
RatingINTEGER - Product rating given by the reviewer. Scale is 1 to 5 with 5 as the highest rating.
-
CommentsTEXT - Reviewer's comments
-
ModifiedDateTEXT - Date and time the record was last updated.
ProductSubcategory
37 rows
Product subcategories. See ProductCategory table.
-
ProductSubcategoryIDINTEGER - Primary key for ProductSubcategory records.
-
ProductCategoryIDINTEGER - Product category identification number. Foreign key to ProductCategory.ProductCategoryID. → ProductCategory.ProductCategoryID
-
NameTEXT - Subcategory description.
-
ModifiedDateTEXT - Date and time the record was last updated.
ScrapReason
16 rows
Manufacturing failure reasons lookup table.
-
ScrapReasonIDINTEGER - Primary key for ScrapReason records.
-
NameTEXT - Failure description.
-
ModifiedDateTEXT - Date and time the record was last updated.
TransactionHistory
112537 rows
Record of each purchase order, sales order, or work order transaction year to date.
-
TransactionIDINTEGER - Primary key for TransactionHistory records.
-
ProductIDINTEGER - Product identification number. Foreign key to Product.ProductID. → Product.ProductID
-
ReferenceOrderIDINTEGER - Purchase order, sales order, or work order identification number.
-
ReferenceOrderLineIDINTEGER - Line number associated with the purchase order, sales order, or work order.
-
TransactionDateTEXT - Date and time of the transaction.
-
TransactionTypeTEXT - W = WorkOrder, S = SalesOrder, P = PurchaseOrder
-
QuantityINTEGER - Product quantity.
-
ActualCostREAL - Product cost.
-
ModifiedDateTEXT - Date and time the record was last updated.
TransactionHistoryArchive
89253 rows
Transactions for previous years.
-
TransactionIDINTEGER - Primary key for TransactionHistoryArchive records.
-
ProductIDINTEGER - Product identification number. Foreign key to Product.ProductID.
-
ReferenceOrderIDINTEGER - Purchase order, sales order, or work order identification number.
-
ReferenceOrderLineIDINTEGER - Line number associated with the purchase order, sales order, or work order.
-
TransactionDateTEXT - Date and time of the transaction.
-
TransactionTypeTEXT - W = Work Order, S = Sales Order, P = Purchase Order
-
QuantityINTEGER - Product quantity.
-
ActualCostREAL - Product cost.
-
ModifiedDateTEXT - Date and time the record was last updated.
UnitMeasure
38 rows
Unit of measure lookup table.
-
UnitMeasureCodeTEXT - Primary key.
-
NameTEXT - Unit of measure description.
-
ModifiedDateTEXT - Date and time the record was last updated.
WorkOrder
72591 rows
-
WorkOrderIDINTEGER -
ProductIDINTEGER - → Product.ProductID
-
OrderQtyINTEGER -
StockedQtyINTEGER -
ScrappedQtyINTEGER -
StartDateTEXT -
EndDateTEXT -
DueDateTEXT -
ScrapReasonIDINTEGER - → ScrapReason.ScrapReasonID
-
ModifiedDateTEXT
WorkOrderRouting
67131 rows
-
WorkOrderIDINTEGER - → WorkOrder.WorkOrderID
-
ProductIDINTEGER -
OperationSequenceINTEGER -
LocationIDINTEGER - → Location.LocationID
-
ScheduledStartDateTEXT -
ScheduledEndDateTEXT -
ActualStartDateTEXT -
ActualEndDateTEXT -
ActualResourceHrsREAL -
PlannedCostREAL -
ActualCostREAL -
ModifiedDateTEXT
Person (12)
Address
19614 rows
Street address information for customers, employees, and vendors.
-
AddressIDINTEGER - Primary key for Address records.
-
AddressLine1TEXT - First street address line.
-
AddressLine2TEXT - Second street address line.
-
CityTEXT - Name of the city.
-
StateProvinceIDINTEGER - Unique identification number for the state or province. Foreign key to StateProvince table. → StateProvince.StateProvinceID
-
PostalCodeTEXT - Postal code for the street address.
-
ModifiedDateTEXT - Date and time the record was last updated.
AddressType
6 rows
Types of addresses stored in the Address table.
-
AddressTypeIDINTEGER - Primary key for AddressType records.
-
NameTEXT - Address type description. For example, Billing, Home, or Shipping.
-
ModifiedDateTEXT - Date and time the record was last updated.
BusinessEntity
20777 rows
Source of the ID that connects vendors, customers, and employees with address and contact information.
-
BusinessEntityIDINTEGER - Primary key for all customers, vendors, and employees.
-
ModifiedDateTEXT - Date and time the record was last updated.
BusinessEntityAddress
19614 rows
Cross-reference table mapping customers, vendors, and employees to their addresses.
-
BusinessEntityIDINTEGER - Primary key. Foreign key to BusinessEntity.BusinessEntityID. → BusinessEntity.BusinessEntityID
-
AddressIDINTEGER - Primary key. Foreign key to Address.AddressID. → Address.AddressID
-
AddressTypeIDINTEGER - Primary key. Foreign key to AddressType.AddressTypeID. → AddressType.AddressTypeID
-
ModifiedDateTEXT - Date and time the record was last updated.
BusinessEntityContact
909 rows
Cross-reference table mapping stores, vendors, and employees to people
-
BusinessEntityIDINTEGER - Primary key. Foreign key to BusinessEntity.BusinessEntityID. → BusinessEntity.BusinessEntityID
-
PersonIDINTEGER - Primary key. Foreign key to Person.BusinessEntityID. → Person.BusinessEntityID
-
ContactTypeIDINTEGER - Primary key. Foreign key to ContactType.ContactTypeID. → ContactType.ContactTypeID
-
ModifiedDateTEXT - Date and time the record was last updated.
ContactType
20 rows
Lookup table containing the types of business entity contacts.
-
ContactTypeIDINTEGER - Primary key for ContactType records.
-
NameTEXT - Contact type description.
-
ModifiedDateTEXT - Date and time the record was last updated.
CountryRegion
238 rows
Lookup table containing the ISO standard codes for countries and regions.
-
CountryRegionCodeTEXT - ISO standard code for countries and regions.
-
NameTEXT - Country or region name.
-
ModifiedDateTEXT - Date and time the record was last updated.
EmailAddress
19972 rows
Where to send a person email.
-
BusinessEntityIDINTEGER - Primary key. Person associated with this email address. Foreign key to Person.BusinessEntityID → Person.BusinessEntityID
-
EmailAddressIDINTEGER - Primary key. ID of this email address.
-
EmailAddressTEXT - E-mail address for the person.
-
ModifiedDateTEXT - Date and time the record was last updated.
Person
19972 rows
Human beings involved with AdventureWorks: employees, customer contacts, and vendor contacts.
-
BusinessEntityIDINTEGER - Primary key for Person records. → BusinessEntity.BusinessEntityID
-
PersonTypeTEXT - Primary type of person: SC = Store Contact, IN = Individual (retail) customer, SP = Sales person, EM = Employee (non-sales), VC = Vendor contact, GC = General contact
-
NameStyleINTEGER - 0 = The data in FirstName and LastName are stored in western style (first name, last name) order. 1 = Eastern style (last name, first name) order.
-
TitleTEXT - A courtesy title. For example, Mr. or Ms.
-
FirstNameTEXT - First name of the person.
-
MiddleNameTEXT - Middle name or middle initial of the person.
-
LastNameTEXT - Last name of the person.
-
SuffixTEXT - Surname suffix. For example, Sr. or Jr.
-
EmailPromotionINTEGER - 0 = Contact does not wish to receive e-mail promotions, 1 = Contact does wish to receive e-mail promotions from AdventureWorks, 2 = Contact does wish to receive e-mail promotions from AdventureWorks and selected partners.
-
ModifiedDateTEXT - Date and time the record was last updated.
PersonPhone
19972 rows
Telephone number and type of a person.
-
BusinessEntityIDINTEGER - Business entity identification number. Foreign key to Person.BusinessEntityID. → Person.BusinessEntityID
-
PhoneNumberTEXT - Telephone number identification number.
-
PhoneNumberTypeIDINTEGER - Kind of phone number. Foreign key to PhoneNumberType.PhoneNumberTypeID. → PhoneNumberType.PhoneNumberTypeID
-
ModifiedDateTEXT - Date and time the record was last updated.
PhoneNumberType
3 rows
Type of phone number of a person.
-
PhoneNumberTypeIDINTEGER - Primary key for telephone number type records.
-
NameTEXT - Name of the telephone number type
-
ModifiedDateTEXT - Date and time the record was last updated.
StateProvince
181 rows
State and province lookup table.
-
StateProvinceIDINTEGER - Primary key for StateProvince records.
-
StateProvinceCodeTEXT - ISO standard state or province code.
-
CountryRegionCodeTEXT - ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. → CountryRegion.CountryRegionCode
-
IsOnlyStateProvinceFlagINTEGER - 0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode.
-
NameTEXT - State or province description.
-
TerritoryIDINTEGER - ID of the territory in which the state or province is located. Foreign key to SalesTerritory.SalesTerritoryID. → SalesTerritory.TerritoryID
-
ModifiedDateTEXT - Date and time the record was last updated.
HumanResources (5)
Department
16 rows
Lookup table containing the departments within the Adventure Works Cycles company.
-
DepartmentIDINTEGER - Primary key for Department records.
-
NameTEXT - Name of the department.
-
GroupNameTEXT - Name of the group to which the department belongs.
-
ModifiedDateTEXT - Date and time the record was last updated.
Employee
290 rows
Employee information such as salary, department, and title.
-
BusinessEntityIDINTEGER - Primary key for Employee records. Foreign key to BusinessEntity.BusinessEntityID. → Person.BusinessEntityID
-
LoginIDTEXT - Network login.
-
OrganizationLevelINTEGER - The depth of the employee in the corporate hierarchy.
-
JobTitleTEXT - Work title such as Buyer or Sales Representative.
-
BirthDateTEXT - Date of birth.
-
MaritalStatusTEXT - M = Married, S = Single
-
GenderTEXT - M = Male, F = Female
-
HireDateTEXT - Employee hired on this date.
-
SalariedFlagINTEGER - Job classification. 0 = Hourly, not exempt from collective bargaining. 1 = Salaried, exempt from collective bargaining.
-
VacationHoursINTEGER - Number of available vacation hours.
-
SickLeaveHoursINTEGER - Number of available sick leave hours.
-
CurrentFlagINTEGER - 0 = Inactive, 1 = Active
-
ModifiedDateTEXT - Date and time the record was last updated.
EmployeeDepartmentHistory
296 rows
Employee department transfers.
-
BusinessEntityIDINTEGER - Employee identification number. Foreign key to Employee.BusinessEntityID. → Employee.BusinessEntityID
-
DepartmentIDINTEGER - Department in which the employee worked including currently. Foreign key to Department.DepartmentID. → Department.DepartmentID
-
ShiftIDINTEGER - Identifies which 8-hour shift the employee works. Foreign key to Shift.Shift.ID. → Shift.ShiftID
-
StartDateTEXT - Date the employee started work in the department.
-
EndDateTEXT - Date the employee left the department. NULL = Current department.
-
ModifiedDateTEXT - Date and time the record was last updated.
EmployeePayHistory
316 rows
Employee pay history.
-
BusinessEntityIDINTEGER - Employee identification number. Foreign key to Employee.BusinessEntityID. → Employee.BusinessEntityID
-
RateChangeDateTEXT - Date the change in pay is effective
-
RateREAL - Salary hourly rate.
-
PayFrequencyINTEGER - 1 = Salary received monthly, 2 = Salary received biweekly
-
ModifiedDateTEXT - Date and time the record was last updated.
Shift
3 rows
Work shift lookup table.
-
ShiftIDINTEGER - Primary key for Shift records.
-
NameTEXT - Shift description.
-
StartTimeTEXT - Shift start time.
-
EndTimeTEXT - Shift end time.
-
ModifiedDateTEXT - Date and time the record was last updated.