db_id
stringclasses
69 values
question
stringlengths
24
325
evidence
stringlengths
1
673
SQL
stringlengths
23
804
schema
stringclasses
69 values
works_cycles
What is the name of the subcategory to which the gray product with the lowest safety stock level belongs?
gray is color of product
SELECT T1.Name FROM ProductSubcategory AS T1 INNER JOIN Product AS T2 USING (ProductSubcategoryID) WHERE T2.Color = 'Grey' GROUP BY T1.Name
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the product cost end date with the highest weight in grams?
in grams refers to WeightUnitMeasureCode = 'G'
SELECT T2.EndDate FROM Product AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.WeightUnitMeasureCode = 'G' ORDER BY T1.Weight DESC LIMIT 1
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the percentage of the total products ordered were not rejected by Drill size?
rejected quantity refers to ScrappedQty; rejected by Drill size refers to Name in ('Drill size too small','Drill size too large'); percentage = DIVIDE(SUM(ScrappedQty) where Name in('Drill size too small','Drill size too large'), OrderQty)
SELECT CAST(SUM(CASE WHEN T2.VacationHours > 20 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.BusinessEntityID) FROM EmployeePayHistory AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.CurrentFlag = 1 AND T2.SickLeaveHours > 10
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Calculate the average of the total ordered quantity of products purchased whose shipping method was Cargo Transport 5.
shipping method was Cargo Transport 5 refers to Name = 'Cargo Transport 5'; average = DIVIDE(SUM(OrderQty where Name = 'Cargo Transport 5'), COUNT(ShipMethodID))
SELECT CAST(SUM(IIF(T1.ShipMethodID = 5, T3.OrderQty, 0)) AS REAL) / COUNT(T3.ProductID) FROM ShipMethod AS T1 INNER JOIN PurchaseOrderHeader AS T2 ON T1.ShipMethodID = T2.ShipMethodID INNER JOIN PurchaseOrderDetail AS T3 ON T2.PurchaseOrderID = T3.PurchaseOrderID
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
List the name of the rates that apply to the provinces that are in the territory that obtained the greatest increase in sales with respect to the previous year.
sales of previous year refers to SalesLastYear; SalesYTD refers to year to date sales; increase in sales = DIVIDE(SUBTRACT(SalesYTD, SalesLastYear), SalesLastYear)*100
SELECT T2.Name FROM SalesTerritory AS T1 INNER JOIN StateProvince AS T2 ON T1.CountryRegionCode = T2.CountryRegionCode INNER JOIN SalesTaxRate AS T3 ON T2.StateProvinceID = T3.StateProvinceID ORDER BY (T1.SalesYTD - T1.SalesLastYear) / T1.SalesLastYear DESC LIMIT 1
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How many employees earn their salaries on a monthly basis at an hourly rate of more than 50?
employee refers to BusinessEntityID; salaries on a monthly basis refers to PayFrequency = 1; hourly rate more than 50 refers to Rate > 50
SELECT COUNT(BusinessEntityID) FROM EmployeePayHistory WHERE rate * PayFrequency > 50
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the employee of company number 1's full name?
company number 1 refers to BusinessEntityId = 1; employee refers to PersonType = 'EM'; full name refers to FirstName + MiddleName + LastName
SELECT FirstName, MiddleName, LastName FROM Person WHERE BusinessEntityID = 1 AND PersonType = 'EM'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the name of the supplier number 1492?
supplier number 1492 refers to BusinessEntityId = 1492; name of the supplier = name from vendor
SELECT NAME FROM Vendor WHERE BusinessEntityID = 1492
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How many vendors only consented to move on with the 500 to 15000 piece order in terms of quality?
Vendor refers to BusinessEntityId; 500 to 15000 piece order refers to MinOrderQty > 500 and MaxOrderQty < 15000
SELECT COUNT(*) FROM ProductVendor WHERE MinOrderQty > 500 AND MaxOrderQty < 15000
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Please list the departments that are part of the Executive General and Administration group.
Department refers to Name where GroupName = 'Executive General and Administration'
SELECT Name FROM Department WHERE GroupName = 'Executive General and Administration'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Please list the family names of any employees whose middle names begin with C.
family names refers to Last name; employee refers to PersonType = 'EM'; MiddleName starts with 'C'
SELECT LastName FROM Person WHERE PersonType = 'EM' AND MiddleName LIKE 'C%'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How many vendors are having their products ordered with an average delivery time of 25 days?
vendors refers to distinct BusinessEntityID; average delivery time of 25 days refers to AverageLeadTime = 25 and onOrderQty > 0
SELECT COUNT(DISTINCT BusinessEntityID) FROM ProductVendor WHERE AverageLeadTime = 25
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Please list any 3 product numbers with the lowest standard cost.
product number = productID
SELECT ProductID FROM ProductCostHistory ORDER BY StandardCost ASC LIMIT 3
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How many black-colored products are there that cannot be sold?
cannot be sold means product is not a salable item which refers to FinishedGoodsFlag = 0
SELECT COUNT(ProductID) FROM Product WHERE FinishedGoodsFlag = 0 AND Color = 'Black'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Please list the top three employees with the most unused sick leave along with their position titles.
employees refers to BusinessEntityID; most unused sick leave refers to MAX(SickLeaveHours); position title refers to JobTitle
SELECT JobTitle FROM Employee ORDER BY SickLeaveHours DESC LIMIT 3
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the full address of address number 11906?
address number refers to AddressID; full address refers to AddressLine1 + AddressLine2
SELECT AddressLine1, AddressLine2 FROM Address WHERE AddressID = 11906
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is business number 1580's net profit?
business number 1580 refers to BusinessEntityID = 1580; Net profit = SUBTRACT(LastReceiptCost,StandardPrice)
SELECT LastReceiptCost - StandardPrice FROM ProductVendor WHERE BusinessEntityID = 1580
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the sales revenue for item number 740?
business number 1580 refers to BusinessEntityID = 1580; Net profit = SUBTRACT(LastReceiptCost,StandardPrice)
SELECT ListPrice - StandardCost FROM Product WHERE ProductID = 740
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How many customers gave a product the best possible rating? Please list their names.
customers' name refers to ReviewerName; best possible ratings means the highest rating = 5
SELECT ReviewerName FROM ProductReview WHERE Rating = 5
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What are the company that Adventure Works deal with that have poor credit rating? Please provide their business number.
poor credit rating means bad credit; CreditRating = 5; Business number refers to BusinessEntityID
SELECT BusinessEntityID FROM Vendor WHERE CreditRating = ( SELECT CreditRating FROM Vendor ORDER BY CreditRating DESC LIMIT 1 )
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the forename and birthdate of person number 18?
person number 18 refers to BusinessEntityID = 18; forename refers to FirstName
SELECT T1.FirstName, T2.BirthDate FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.BusinessEntityID = 18
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What job is person number 322 currently holding?
person number 322 refers to PersonID = 18; job is the name of contacttype
SELECT T1.Name FROM ContactType AS T1 INNER JOIN BusinessEntityContact AS T2 ON T1.ContactTypeID = T2.ContactTypeID WHERE T2.BusinessEntityID = 332
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Please list 3 businesses along with their IDs that use cellphones.
business along with their IDs = BusinessEntityID; Cellphones refers to PhoneNumberType.name = ‘cell’
SELECT T2.BusinessEntityID FROM PhoneNumberType AS T1 INNER JOIN PersonPhone AS T2 ON T1.PhoneNumberTypeID = T2.PhoneNumberTypeID WHERE T1.Name = 'Cell' LIMIT 3
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the currency of Brazil?
null
SELECT T1.Name FROM Currency AS T1 INNER JOIN CountryRegionCurrency AS T2 ON T1.CurrencyCode = T2.CurrencyCode INNER JOIN CountryRegion AS T3 ON T2.CountryRegionCode = T3.CountryRegionCode WHERE T3.Name = 'Brazil'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How many people work in the finance department?
null
SELECT COUNT(T2.BusinessEntityID) FROM Department AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.DepartmentID = T2.DepartmentID WHERE T1.Name = 'Finance'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How long does it take for the business to receive the item it has purchased? Who is the vendor for business number 1496?
business number refers to BusinessEntityID where BusinessEntityID = 1496; how long does it take refers to AverageLeadTime
SELECT T1.AverageLeadTime, T2.Name FROM ProductVendor AS T1 INNER JOIN Vendor AS T2 USING (businessentityid) WHERE T2.BusinessEntityID = 1496 GROUP BY T1.AverageLeadTime, T2.Name
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How many accounts are in Bothell as opposed to Kenmore? What is the name of the State that comprises these two cities?
SUBTRACT(count(city = 'Bothell'), count(city = 'Kenmore'))
SELECT SUM(IIF(T1.city = 'Bothell', 1, 0)) - SUM(IIF(T1.city = 'Kenmore', 1, 0)) , stateprovincecode FROM Address AS T1 INNER JOIN StateProvince AS T2 ON T1.stateprovinceid = T2.stateprovinceid GROUP BY stateprovincecode
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Which chromoly steel product model has AdventureWorks saved in English?
Saved in English refers to product description written in English where Culture.name = 'English'
SELECT T1.ProductModelID FROM ProductModelProductDescriptionCulture AS T1 INNER JOIN Culture AS T2 USING (cultureid) INNER JOIN ProductDescription AS T3 USING (productdescriptionid) WHERE T3.Description LIKE 'Chromoly steel%' AND T2.Name = 'English'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Please list the total number of companies with a commission percentage of 0.018 or above, along with each company's assigned geographical location.
geographical location refers to group from SalesPerson; ComissionPct refers to commission percentage where ComissionPct > = 0.018;
SELECT T1.BusinessEntityID, T2.'Group' FROM SalesPerson AS T1 INNER JOIN SalesTerritory AS T2 USING (territoryid) WHERE T1.CommissionPct >= 0.018
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Please list the various phone number types in the following order, from most to least common among businesses.
null
SELECT T2.Name FROM PersonPhone AS T1 INNER JOIN PhoneNumberType AS T2 ON T1.PhoneNumberTypeID = T2.PhoneNumberTypeID GROUP BY T2.Name ORDER BY COUNT(T2.Name) DESC
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Which role has the most common contact among businesses?
Most common contact among businesses refers to BusinessEntityContact with the most name
SELECT T1.Name FROM ContactType AS T1 INNER JOIN BusinessEntityContact AS T2 ON T1.ContactTypeID = T2.ContactTypeID GROUP BY T1.Name ORDER BY COUNT(T1.Name) DESC LIMIT 1
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What are the salespeople's email addresses?
Salespeople refers to PersonType = 'SP'
SELECT T2.EmailAddress FROM Person AS T1 INNER JOIN EmailAddress AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.PersonType = 'SP'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Which position does Suchitra hold?
position refers to JobTitle
SELECT T2.JobTitle FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.FirstName = 'Suchitra'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How many employees work for AdvertureWorks that is single?
Employees refer to PersonType = 'EM'; Single refers to MaritalStatus = 's'
SELECT COUNT(T1.BusinessentityID) FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.PersonType = 'EM' AND T2.MaritalStatus = 'S'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How much do the works data saved in English and Arabic differ from one another?
Data saved in English refers to the name of the language where Culture.Name = 'English'; data saved in Arabic refers to the name of the language where Culture.Name = 'Arabic';   SUBTRACT(count(Name = 'English'), count(Name = 'Bothell'))
SELECT SUM(CASE WHEN T1.Name = 'English' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.Name = 'Arabic' THEN 1 ELSE 0 END) FROM Culture AS T1 INNER JOIN ProductModelProductDescriptionCulture AS T2 ON T1.CultureID = T2.CultureID WHERE T1.Name = 'English' OR T1.Name = 'Arabic'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the location of business number 1?
Location refers to AddressLine1; business number refers to the BusinessEntityID where BusinessEntityID = 1
SELECT T1.AddressLine1 FROM Address AS T1 INNER JOIN BusinessEntityAddress AS T2 USING (AddressID) WHERE T2.BusinessEntityID = 1
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Please list the businesses along with their numbers that have their accounts located in Duvall.
Business along with their numbers refers to the BusinessEntityID; located in Duvall refers to City = 'Duvall'
SELECT T2.BusinessEntityID FROM Address AS T1 INNER JOIN BusinessEntityAddress AS T2 ON T1.AddressID = T2.AddressID WHERE T1.City = 'Duvall'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What percentage of the AdventureWorks data is in Thai?
percentage = DIVIDE(Culture.Name = 'Thai', count(ALL Culture.Name))*100%
SELECT CAST(SUM(CASE WHEN T1.Name = 'Thai' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.CultureID) FROM Culture AS T1 INNER JOIN ProductModelProductDescriptionCulture AS T2 ON T1.CultureID = T2.CultureID
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What percentage of AdventureWorks employees are men?
male refers to Gender = 'M'; employee refers to PersonType = 'EM'; percentage = DIVIDE(COUNT(Gender = 'M'), COUNT(PersonType = 'MY'))*100%;
SELECT CAST(SUM(CASE WHEN T2.Gender = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.BusinessentityID) FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessentityID = T2.BusinessentityID WHERE T1.PersonType = 'EM'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Where is the address 15873 located, in what city and state? Does that city belong to a province where the code exists?
Address number 15873 refers to AddressID = '15873'; IsOnlyStateProvinceCode = '0' refers to StateProvinceCode exists; IsOnlyStateProvinceCode = '1' refers to StateProvinceCode unavailable;
SELECT T2.City, T1.Name, T1.IsOnlyStateProvinceFlag FROM StateProvince AS T1 INNER JOIN Address AS T2 ON T1.StateProvinceID = T2.StateProvinceID WHERE T2.AddressID = 15873
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the full address of business number 24?
Full address refers to AddressLine1+AddressLine2; business number 24 refers to BusinessEntityID = '24'
SELECT T1.AddressLine1, T1.AddressLine2 FROM Address AS T1 INNER JOIN BusinessEntityAddress AS T2 ON T1.AddressID = T2.AddressID WHERE T2.BusinessEntityID = 24
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Which year is credit card No.9648's Expiration Year?
Expiration year refers to ExpYear
SELECT ExpYear FROM CreditCard WHERE CreditCardID = 9648
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What's Emma H Harris's Business Entity ID number?
null
SELECT BusinessEntityID FROM Person WHERE FirstName = 'Emma' AND LastName = 'Harris'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the location id for Debur and Polish?
Debur and Polish is name of manufacturing location
SELECT LocationID FROM Location WHERE Name = 'Debur and Polish'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What are the Department ids under the Sales and Marketing Group?
Sales and Marketing is group name of a department
SELECT DepartmentID FROM Department WHERE GroupName = 'Sales and Marketing'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Which sales person made the sale of 1635823.3967 last year? Give the Business Entity ID.
null
SELECT BusinessEntityID FROM SalesPerson WHERE SalesLastYear = '1635823.3967'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the Shift start time for Shift ID No.2?
null
SELECT StartTime FROM Shift WHERE ShiftID = '2'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is contact Type ID No.16 represent for?
null
SELECT Name FROM ContactType WHERE ContactTypeID = '16'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the minimum shipping charge for "OVERSEAS - DELUXE"?
Minimum shipping charge refers to ShipBase; OVERSEAS - DELUXE is name of shipping company
SELECT ShipBase FROM ShipMethod WHERE Name = 'OVERSEAS - DELUXE'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Please tell the meaning of CultureID "fr".
tell the meaning is to find the name of culture
SELECT Name FROM Culture WHERE CultureID = 'fr'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Give the Mauritius Rupee's currency code.
Mauritius Rupee is name of currency
SELECT CurrencyCode FROM Currency WHERE Name = 'Mauritius Rupee'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Name cellphone number's Type ID?
Cellphone refers to Name = 'Cell'
SELECT PhoneNumberTypeID FROM PhoneNumberType WHERE Name = 'Cell'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
For the older production technician who was hired in 2008/12/7, what's his/her birthday?
Oldest production technician refers to MIN(BirthDate) where JobTitle = 'Production Technician'
SELECT BirthDate FROM Employee WHERE HireDate = '2008-12-07'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the product ID No.793's model name?
null
SELECT T1.Name FROM Product AS T1 INNER JOIN ProductModel AS T2 ON T1.ProductModelID = T2.ProductModelID WHERE T1.ProductID = 793
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What are the unit measure codes for product ID No.762?
null
SELECT T2.UnitMeasureCode FROM Product AS T1 INNER JOIN UnitMeasure AS T2 ON T1.SizeUnitMeasureCode = T2.UnitMeasureCode OR T1.WeightUnitMeasureCode = T2.UnitMeasureCode WHERE T1.ProductID = 762 GROUP BY T1.ProductID, T2.UnitMeasureCode
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Where is Business Entity ID No.4 located at? Give the address down to street.
Located refers to the total address of the entity that comprises city, addressline1, addressline2
SELECT AddressLine1, AddressLine2 FROM Address WHERE AddressID IN ( SELECT AddressID FROM BusinessEntityAddress WHERE BusinessEntityID = 4 )
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
For the on going assembly item Component ID No. 494, what's the Unit measure for it?
On going assembly item means the assembly item haven't been finished, therefore EndDate is null
SELECT T2.Name FROM BillOfMaterials AS T1 INNER JOIN UnitMeasure AS T2 ON T1.UnitMeasureCode = T2.UnitMeasureCode WHERE T1.ComponentID = 494 AND T1.EndDate IS NULL GROUP BY T2.name
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
For the document Control Assistant who was born on 1975/12/25, how many private documents did he/she have?
Document Control Assistant refers to the JobTitle = 'Document Control Assistant'; born on 1975/12/25 refers to BirthDate = '1975-12-25'; private documents indicate that DocumentSummary is null
SELECT COUNT(T2.BusinessEntityID) FROM Document AS T1 INNER JOIN Employee AS T2 ON T1.Owner = T2.BusinessEntityID WHERE T2.JobTitle = 'Document Control Assistant' AND T2.BirthDate = '1975-12-25' AND T1.DocumentSummary IS NULL
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
To the products which could make the profit as 21.9037, what were their list price after October of 2012?
Profit as 82.41 = SUTRACT(ListPrice, StandardCost); May of 2012 refers to StartDate = '2012-05'
SELECT T1.ListPrice FROM Product AS T1 INNER JOIN ProductListPriceHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ListPrice - T1.StandardCost > 21.9037 AND STRFTIME('%Y-%m-%d', T2.StartDate) >= '2012-10-01'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the size of the photo of product id No.1?
null
SELECT T1.ThumbNailPhoto FROM ProductPhoto AS T1 INNER JOIN ProductProductPhoto AS T2 ON T1.ProductPhotoID = T2.ProductPhotoID WHERE T2.ProductID = 1
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How many letters are there in Catherine Ward's e-mail account passwords?
Catherine Ward refers to the name of BusinessEntityID; how many letters in password for the e-mail account refers to LENGTH(PasswordHash)
SELECT LENGTH(T2.PasswordHash) FROM Person AS T1 INNER JOIN Password AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.FirstName = 'Catherine' AND T1.LastName = 'Ward'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What rating did Jill give for HL Mountain Pedal?
Jill refers to the name of reviewer; HL Mountain Pedal refers to the name of the product
SELECT T1.Rating FROM ProductReview AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ReviewerName = 'Jill' AND T2.Name = 'HL Mountain Pedal'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What's the profit for the Freewheel?
SUBTRACT(LastReceiptCost, StandardPrice) for ProductID where name = 'Freewheel'
SELECT T1.LastReceiptCost - T1.StandardPrice FROM ProductVendor AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'Freewheel'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Did Rachel Valdez complete her sales task?
Complete sales task refers to meeting sales quota; if Bonus = 0, it means this salesperson doesn't meet quota and vice versa
SELECT T1.Bonus FROM SalesPerson AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.FirstName = 'Rachel' AND T2.LastName = 'Valdez'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How many types of tax did the sales happen in Quebec have?
If Name = "+" in the value from SalesTaxRate, it means this sales are charged by multiple types of tax; Quebec refers to the name of State Province
SELECT COUNT(DISTINCT T1.Name) FROM SalesTaxRate AS T1 INNER JOIN StateProvince AS T2 ON T1.StateProvinceID = T2.StateProvinceID WHERE T2.Name = 'Quebec'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What's Kevin A Wright's email address?
null
SELECT T2.EmailAddress FROM Person AS T1 INNER JOIN EmailAddress AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.FirstName = 'Kevin' AND T1.MiddleName = 'A' AND T1.LastName = 'Wright'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the number of State Province of France that doesn't have a State Province Code?
Doesn't have a State Province Code refers to IsOnlyStateProvinceFlag = 1 where StateProvinceCode is unavailable
SELECT T1.CountryRegionCode FROM StateProvince AS T1 INNER JOIN CountryRegion AS T2 ON T1.CountryRegionCode = T2.CountryRegionCode WHERE T2.Name = 'France' AND T1.IsOnlyStateProvinceFlag = 1
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What kind of transaction type for the "HL Road Frame - Black, 48" order happened in 2012/12/13?
Transactiontype = 'w' means 'WorkOrder'; transactiontype = 's' means 'SalesOrder'; transactiontype = 'P' means 'PurchaseOrder'; happened in refers to TransactionDate
SELECT T1.TransactionType FROM TransactionHistory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'HL Road Frame - Black, 48' AND STRFTIME('%Y-%m-%d',T1.TransactionDate) = '2013-07-31'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Which type of transaction was it for the "LL Road Handlebars" order happened in 2012/11/3?
Transactiontype = 'w' means 'WorkOrder'; transactiontype = 's' means 'SalesOrder'; transactiontype = 'P' means 'PurchaseOrder'; happened in refers to TransactionDate
SELECT T1.TransactionType FROM TransactionHistoryArchive AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'LL Road Handlebars' AND STRFTIME('%Y-%m-%d',T1.TransactionDate) = '2012-11-03'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How is the Credit Rating for company whose rowguid is "33671A4E-DF2B-4879-807B-E3F930DD5C0C"?
CreditRating = 1 means 'Superior'; CreditRating = 2 means 'Excellent'; CreditRating = 3 means 'Above average'; CreditRating = 4 means 'Superior'; CreditRating = 5 means 'Below average'
SELECT T1.CreditRating FROM Vendor AS T1 INNER JOIN BusinessEntity AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.rowguid = '33671A4E-DF2B-4879-807B-E3F930DD5C0C'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the PreferredVendorStatus for the company which has the rowguid of "684F328D-C185-43B9-AF9A-37ACC680D2AF"?
PreferredVendorStatus = 1 means 'Do not use if another vendor is available'; CreditRating = 2 means 'Preferred over other vendors supplying the same product'
SELECT T1.PreferredVendorStatus FROM Vendor AS T1 INNER JOIN BusinessEntity AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.rowguid = '684F328D-C185-43B9-AF9A-37ACC680D2AF'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
For person id No.2054, is his/her vendor still active?
ActiveFlag = 1 means 'Vendor no longer used'; ActiveFlag = 2 means 'Vendor is actively used
SELECT T1.ActiveFlag FROM Vendor AS T1 INNER JOIN BusinessEntityContact AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonID = 2054
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Show me the phone number of Gerald Patel's.
null
SELECT T2.PhoneNumber FROM Person AS T1 INNER JOIN PersonPhone AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.FirstName = 'Gerald' AND T1.LastName = 'Patel'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Which is Business Entity ID No.13626's phone number type?
null
SELECT T2.Name FROM PersonPhone AS T1 INNER JOIN PhoneNumberType AS T2 USING (PhoneNumberTypeID) WHERE T1.BusinessEntityID = 13626
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What's Lynn N Tsoflias's job title?
null
SELECT T2.JobTitle FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.FirstName = 'Lynn' AND T1.MiddleName = 'N' AND T1.LastName = 'Tsoflias'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the number of the sub categories for bikes?
Bike refers to the name of the product category, therefore ProductCategoryID = 1
SELECT COUNT(*) FROM ProductCategory AS T1 INNER JOIN ProductSubcategory AS T2 ON T1.ProductCategoryID = T2.ProductCategoryID WHERE T1.Name = 'Bikes'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
For the document Control Assistant who was hired on 2009/1/22, what is the percentage of private documents did he/she have?
Document Control Assistant refers  to the  JobTitle = 'Document Control Assistant'; hired on 2009/1/22 means the person's hiring date is HireDate = '2009-01-22'; private documents indicate that DocumentSummary is null; DIVIDE(COUNT(DocumentSummary is null), COUNT(DocumentSummary))*100
SELECT CAST(SUM(CASE WHEN T1.DocumentSummary IS NOT NULL THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.DocumentSummary) FROM Document AS T1 INNER JOIN Employee AS T2 ON T1.Owner = T2.BusinessEntityID WHERE T2.JobTitle = 'Document Control Assistant' AND T2.HireDate = '2009-01-22'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How much is HL Grip Tape's profit ratio?
HL Grip Tape refers to the product name; DIVIDE(SUBTRACT(LastReceiptCost, StandardPrice)), (StandardPrice) as profit_ratio
SELECT (T1.LastReceiptCost - T1.StandardPrice) / T1.StandardPrice FROM ProductVendor AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'HL Grip Tape'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
For all phone numbers, what percentage of the total is cell phone?
Cellphone referes to the name of the phone type, therefore PhoneNumberTypeID = 1; DIVIDE(COUNT(PhoneNumberTypeID = 1), (COUNT(PhoneNumberTypeID)) as percentage
SELECT CAST(SUM(CASE WHEN T2.Name = 'Cell' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.Name) FROM PersonPhone AS T1 INNER JOIN PhoneNumberType AS T2 ON T1.PhoneNumberTypeID = T2.PhoneNumberTypeID
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What are the product assembly ID that come with unit measure code EA and BOM level of 2, at the same time have per assembly quantity of more than 10?
Per assembly quantity of more than 10 is expresses as PerAssemblyQty>10
SELECT ProductAssemblyID FROM BillOfMaterials WHERE UnitMeasureCode = 'EA' AND BOMLevel = 2 AND PerAssemblyQty > 10
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How many location IDs have actual resource hours of 2?
actual resource hours of 2 refers to ActualResourceHrs = 2
SELECT COUNT(LocationID) FROM WorkOrderRouting WHERE ActualResourceHrs = 2
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the stocked quantity of products manufactured from location ID 40?
Stocked quantity refers to StockedQty
SELECT COUNT(*) FROM WorkOrderRouting AS T1 INNER JOIN BillOfMaterials AS T2 ON T1.LocationID = T2.ProductAssemblyID INNER JOIN WorkOrder AS T3 ON T3.WorkOrderID = T1.WorkOrderID WHERE T1.LocationID = 40
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What are the total per assembly quantity for unit measure code EA, IN and OZ respectively? What are the name of these 3 code?
Pre assembly quantity refers to PerAssemblyQty
SELECT SUM(T1.PerAssemblyQty), T2.Name FROM BillOfMaterials AS T1 INNER JOIN UnitMeasure AS T2 ON T1.UnitMeasureCode = T2.UnitMeasureCode WHERE T1.UnitMeasureCode IN ('EA', 'IN', 'OZ') GROUP BY T2.Name
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Which product ID do not have any work order ID?
Do not have any work order ID means WorkOrderID is null
SELECT ProductID FROM Product WHERE ProductID NOT IN ( SELECT T1.ProductID FROM Product AS T1 INNER JOIN WorkOrder AS T2 ON T1.ProductID = T2.ProductID )
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the name of product purchased with transaction type P?
null
SELECT ProductID FROM Product WHERE ProductID IN ( SELECT ProductID FROM TransactionHistory WHERE TransactionType = 'P' )
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
State the full name of accountants in the company.
Accountants refers to JobTitle = 'Accountant'; full name includes FirstName, LastName, and MiddleName
SELECT T2.FirstName, T2.MiddleName, T2.LastName FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.JobTitle = 'Accountant'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the job position currently occupied by Ken J Sánchez?
Job position refers to JobTitle
SELECT T1.JobTitle FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.FirstName = 'Ken' AND T2.MiddleName = 'J' AND T2.LastName = 'Sánchez'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How many male employees do not wish to receive e-mail promotion?
Male refers to Gender = 'M'; employees do not wish to receive any e-mail promotions are marked as EmailPromotion = 0
SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.EmailPromotion = 0 AND T1.Gender = 'M'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Who is the top sales person who achived highest percentage of projected sales quota in 2013?
2013 refers to QuotaDate = '2013'; DIVIDE(SalesLastYear), (SUM(SalesQuota where YEAR(QuotaDate) = 2013)) as percentage
SELECT BusinessEntityID FROM SalesPerson WHERE BusinessEntityID IN ( SELECT BusinessEntityID FROM SalesPersonQuotaHistory WHERE STRFTIME('%Y', QuotaDate) = '2013' ) ORDER BY CAST(SalesLastYear AS REAL) / SalesQuota DESC LIMIT 1
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How many of the non-sales employees are married?
Married refers to MaritalStatus = 'M';  non-sales employees refer to PersonType = 'EM'
SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonType = 'EM' AND T1.MaritalStatus = 'M'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Among the Production Technicians who are single, how many of them are vendor contact?
Production Technicians refer to the  JobTitle = 'Production Technician%'; single refers to MaritalStatus = 'S'; Vendor contact refers to PersonType = 'VC'
SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.JobTitle LIKE 'Production Technician%' AND T1.MaritalStatus = 'S' AND T2.PersonType = 'VC'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the total sick leave hours of employees who do not wish to receive any e-mail promotion?
Employees who do not wish to receive any e-mail promotions are marked as EmailPromotion = 0
SELECT SUM(T1.SickLeaveHours) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.EmailPromotion = 0
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Among the sales people, who are hired prior to 2010?
Sales people refer to PersonType = 'SP'; hired prior to 2010 means the person's hiring date was before 2010, therefore year(HireDate)<2010
SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonType = 'SP' AND SUBSTR(T1.HireDate, 0, 4) < 2010
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Which sales person achieved the highest sales YTD? What is the projected yearly sales quota in 2011 for this person?
Sales people refer to PersonType = 'SP'; projected yearly sales refers to SalesQuota
SELECT T1.BusinessEntityID, SUM(T1.SalesQuota) FROM SalesPerson AS T1 INNER JOIN SalesPersonQuotaHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE STRFTIME('%Y', T2.QuotaDate) = '2011' GROUP BY T1.BusinessEntityID ORDER BY SUM(T1.SalesYTD) DESC LIMIT 1
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How many people with the name Alex are single and occupying organization level of 1?
Alex refers to FirstName = 'Alex'; single refers to MaritalStatus = 'S'
SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.FirstName = 'Alex' AND T1.MaritalStatus = 'S' AND T1.OrganizationLevel = 1
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
What is the average vacation hours taken by Sales person?
Store Contact refers PersonType = 'SC'; AVG(VacationHours
SELECT CAST(SUM(T1.VacationHours) AS REAL) / COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonType = 'SP'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
State the last name and job title of owner for document "Crank Arm and Tire Maintenance".
The owner refers to BusinessEntityID
SELECT T1.LastName, T3.JobTitle FROM Person AS T1 INNER JOIN Document AS T2 ON T1.BusinessEntityID = T2.Owner INNER JOIN Employee AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T2.Title = 'Crank Arm and Tire Maintenance'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
How many employees do not have any suffix and what are their organization level?
Do not have any suffix means Suffix is null
SELECT COUNT(T3.BusinessEntityID) FROM ( SELECT T1.BusinessEntityID FROM Employee AS T1 INNER JOIN Person AS T2 USING (BusinessEntityID) WHERE T2.Suffix IS NULL GROUP BY T1.BusinessEntityID ) AS T3
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Among the sales people who achieved projected sales quota 2013, is there any person from territory ID 1? If yes, state the business entity ID.
projected sales quota refers to SalesQuota; projected sales quota in 2013 refers to year(QuotaDate) = 2013;
SELECT DISTINCT T1.BusinessEntityID FROM SalesPerson AS T1 INNER JOIN SalesPersonQuotaHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.TerritoryID = 1 AND STRFTIME('%Y', QuotaDate) = '2013'
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,
works_cycles
Who are the employees that submitted resume to Human Resource Department and got hired? State the last name.
employees that submitted resume to Human Resource Department and got hired refers to BusinessEntittyID NOT null;
SELECT T3.LastName FROM Employee AS T1 INNER JOIN JobCandidate AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Person AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T1.BusinessEntityID IN (212, 274)
database name:db_id works_cycles CountryRegion table CountryRegion Cols: Country Region Code dtype text, Name dtype text, modified date dtype datetime, Culture table Culture Cols: Culture ID dtype text, Name dtype text, modified date dtype datetime, Currency table Currency Cols: Currency Code dtype text, Name dtype text, modified date dtype datetime, CountryRegionCurrency table CountryRegionCurrency Cols: Country Region Code dtype text, Currency Code dtype text, modified date dtype datetime, Person table Person Cols: Business Entity ID dtype integer, Person Type dtype text, Name Style dtype integer, Title dtype text, First Name dtype text, Middle Name dtype text, Last Name dtype text, Suffix dtype text, Email Promotion dtype integer, Additional Contact Info dtype text, Demographics dtype text, rowguid dtype text, modified date dtype datetime, BusinessEntityContact table BusinessEntityContact Cols: Business Entity ID dtype integer, Person ID dtype integer, Contact Type ID dtype integer, rowguid dtype text, modified date dtype datetime, EmailAddress table EmailAddress Cols: Business Entity ID dtype integer, Email Address ID dtype integer, Email Address dtype text, rowguid dtype text, modified date dtype datetime, Employee table Employee Cols: Business Entity ID dtype integer, National ID Number dtype text, Login ID dtype text, Organization Node dtype text, Organization Level dtype integer, Job Title dtype text, Birth Date dtype date, Marital Status dtype text, Gender dtype text, Hire Date dtype date, Salaried Flag dtype integer, Vacation Hours dtype integer, Sick Leave Hours dtype integer, Current Flag dtype integer, rowguid dtype text, modified date dtype datetime, Password table Password Cols: Business Entity ID dtype integer, Password Hash dtype text, Password Salt dtype text, rowguid dtype text, modified date dtype datetime, PersonCreditCard table PersonCreditCard Cols: Business Entity ID dtype integer, Credit Card ID dtype integer, modified date dtype datetime, ProductCategory table ProductCategory Cols: Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, ProductDescription table ProductDescription Cols: Product Description ID dtype integer, Description dtype text, rowguid dtype text, modified date dtype datetime, ProductModel table ProductModel Cols: Product Model ID dtype integer, Name dtype text, Catalog Description dtype text, Instructions dtype text, rowguid dtype text, modified date dtype datetime, ProductModelProductDescriptionCulture table ProductModelProductDescriptionCulture Cols: Product Model ID dtype integer, Product Description ID dtype integer, Culture ID dtype text, modified date dtype datetime, ProductPhoto table ProductPhoto Cols: Product Photo ID dtype integer, Thumb Nail Photo dtype blob, Thumbnail Photo File Name dtype text, large photo dtype blob, Large Photo File Name dtype text, Modified Date dtype datetime, ProductSubcategory table ProductSubcategory Cols: Product Subcategory ID dtype integer, Product Category ID dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, SalesReason table SalesReason Cols: SalesReasonID dtype integer, Name dtype text, ReasonType dtype text, modified date dtype datetime, SalesTerritory table SalesTerritory Cols: TerritoryID dtype integer, Name dtype text, Country Region Code dtype text, Group dtype text, Sales Year to Date dtype real, Sales Last Year dtype real, Cost Year to Date dtype real, Cost Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPerson table SalesPerson Cols: Business Entity ID dtype integer, Territory ID dtype integer, Sales Quota dtype real, Bonus dtype real, Commission percentage dtype real, sales year to date dtype real, Sales Last Year dtype real, rowguid dtype text, modified date dtype datetime, SalesPersonQuotaHistory table SalesPersonQuotaHistory Cols: Business Entity ID dtype integer, Quota Date dtype datetime, Sales Quota dtype real, rowguid dtype text, modified date dtype datetime, SalesTerritoryHistory table SalesTerritoryHistory Cols: Business Entity ID dtype integer, Territory ID dtype integer, Start Date dtype datetime, End Date dtype datetime, rowguid dtype text, modified date dtype datetime, ScrapReason table ScrapReason Cols: Scrap Reason ID dtype integer, Name dtype text, modified date dtype datetime, Shift table Shift Cols: ShiftID dtype integer, Name dtype text, Start Time dtype text, End Time dtype text, modified date dtype datetime, ShipMethod table ShipMethod Cols: Ship Method ID dtype integer, Name dtype text, Ship Base dtype real, Ship Rate dtype real, rowguid dtype text, modified date dtype datetime, SpecialOffer table SpecialOffer Cols: Special Offer ID dtype integer, Description dtype text, Discount precentage dtype real, Type dtype text, Category dtype text, Start Date dtype datetime, End Date dtype datetime, Min Quality dtype integer, Max Quality dtype integer, rowguid dtype text, modified date dtype datetime, BusinessEntityAddress table BusinessEntityAddress Cols: Business Entity ID dtype integer, Address ID dtype integer, Address Type ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesTaxRate table SalesTaxRate Cols: Sales Tax Rate ID dtype integer, State Province ID dtype integer, Tax Type dtype integer, Tax Rate dtype real, Name dtype text, rowguid dtype text, modified date dtype datetime, Store table Store Cols: Business Entity ID dtype integer, Name dtype text, Sales Person ID dtype integer, Demographics dtype text, rowguid dtype text, modified date dtype datetime, SalesOrderHeaderSalesReason table SalesOrderHeaderSalesReason Cols: Sales Order ID dtype integer, Sales Reason ID dtype integer, modified date dtype datetime, TransactionHistoryArchive table TransactionHistoryArchive Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, UnitMeasure table UnitMeasure Cols: Unit Measure Code dtype text, Name dtype text, modified date dtype datetime, ProductCostHistory table ProductCostHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, Standard Cost dtype real, modified date dtype datetime, ProductDocument table ProductDocument Cols: Product ID dtype integer, Document Node dtype text, modified date dtype datetime, ProductInventory table ProductInventory Cols: Product ID dtype integer, Location ID dtype integer, Shelf dtype text, Bin dtype integer, Quantity dtype integer, rowguid dtype text, modified date dtype datetime, ProductProductPhoto table ProductProductPhoto Cols: Product ID dtype integer, Product Photo ID dtype integer, Primary dtype integer, Modified Date dtype datetime, ProductReview table ProductReview Cols: Product Review ID dtype integer, Product ID dtype integer, Reviewer Name dtype text, Review Date dtype datetime, Email Address dtype text, Rating dtype integer, Comments dtype text, modified date dtype datetime, ShoppingCartItem table ShoppingCartItem Cols: Shopping CartItem ID dtype integer, Shopping Cart ID dtype text, Quantity dtype integer, Product ID dtype integer, Date Created dtype datetime, modified date dtype datetime, SpecialOfferProduct table SpecialOfferProduct Cols: Special Offer ID dtype integer, Product ID dtype integer, rowguid dtype text, modified date dtype datetime, SalesOrderDetail table SalesOrderDetail Cols: SalesOrderID dtype integer, SalesOrderDetailID dtype integer, CarrierTrackingNumber dtype text, OrderQty dtype integer, ProductID dtype integer, SpecialOfferID dtype integer, UnitPrice dtype real, UnitPriceDiscount dtype real, LineTotal dtype real, rowguid dtype text, ModifiedDate dtype datetime, TransactionHistory table TransactionHistory Cols: Transaction ID dtype integer, Product ID dtype integer, Reference Order ID dtype integer, Reference Order Line ID dtype integer, Transaction Date dtype datetime, Transaction Type dtype text, Quantity dtype integer, Actual Cost dtype real, modified date dtype datetime, Vendor table Vendor Cols: BusinessEntityID dtype integer, AccountNumber dtype text, Name dtype text, CreditRating dtype integer, Preferred Vendor Status dtype integer, Active Flag dtype integer, PurchasingWebServiceURL dtype text, modified date dtype datetime, ProductVendor table ProductVendor Cols: Product ID dtype integer, Business Entity ID dtype integer, Average Lead Time dtype integer, Standard Price dtype real, Last Receipt Cost dtype real, Last Receipt Date dtype datetime, Min Order Quantity dtype integer, Max Order Quantity dtype integer, On Order Quantity dtype integer, Unit Measure Code dtype text, modified date dtype datetime, PurchaseOrderHeader table PurchaseOrderHeader Cols: Purchase Order ID dtype integer, Revision Number dtype integer, Status dtype integer, Employee ID dtype integer, Vendor ID dtype integer, Ship Method ID dtype integer, Order Date dtype datetime, Ship Date dtype datetime, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, modified date dtype datetime, PurchaseOrderDetail table PurchaseOrderDetail Cols: Purchase Order ID dtype integer, Purchase Orde rDetail ID dtype integer, Due Date dtype datetime, Order Quantity dtype integer, Product ID dtype integer, Unit Price dtype real, Line Total dtype real, ReceivedQty dtype real, RejectedQty dtype real, StockedQty dtype real, ModifiedDate dtype datetime, WorkOrder table WorkOrder Cols: Work Order ID dtype integer, Product ID dtype integer, Order Quantity dtype integer, Stocked Quantity dtype integer, Scrapped Quantity dtype integer, Start Date dtype datetime, End Date dtype datetime, Due Date dtype datetime, Scrap Reason ID dtype integer, modified date dtype datetime, WorkOrderRouting table WorkOrderRouting Cols: WorkOrderID dtype integer, ProductID dtype integer, Operation Sequence dtype integer, Location ID dtype integer, Scheduled Start Date dtype datetime, Scheduled End Date dtype datetime, Actual Start Date dtype datetime, ActualEndDate dtype datetime, Actual Resource Hours dtype real, Planned Cost dtype real, ActualCost dtype real, modified date dtype datetime, Customer table Customer Cols: Customer ID dtype integer, Person ID dtype integer, Store ID dtype integer, Territory ID dtype integer, Account Number dtype text, rowguid dtype text, modified date dtype datetime, ProductListPriceHistory table ProductListPriceHistory Cols: Product ID dtype integer, Start Date dtype date, End Date dtype date, ListPrice dtype real, modified date dtype datetime, Address table Address Cols: address id dtype integer, address line 1 dtype text, address line 2 dtype text, City dtype text, state province id dtype integer, postal code dtype text, spatial location dtype text, rowguid dtype text, modified date dtype datetime, AddressType table AddressType Cols: address type id dtype integer, Name dtype text, rowguid dtype text, modified date dtype datetime, BillOfMaterials table BillOfMaterials Cols: bill of materials id dtype integer, product assembly id dtype integer, component ID dtype integer, start date dtype datetime, end date dtype datetime, unit measure code dtype text, bill of materials level dtype integer, per assembly quantity dtype real, modified date dtype datetime, BusinessEntity table BusinessEntity Cols: business entity id dtype integer, rowguid dtype text, modified date dtype datetime, ContactType table ContactType Cols: Contact Type ID dtype integer, Name dtype text, modified date dtype datetime, CurrencyRate table CurrencyRate Cols: Currency Rate ID dtype integer, Currency Rate Date dtype datetime, From Currency Code dtype text, ToCurrencyCode dtype text, Average Rate dtype real, End Of Day Rate dtype real, modified date dtype datetime, Department table Department Cols: Department ID dtype integer, Name dtype text, Group Name dtype text, modified date dtype datetime, EmployeeDepartmentHistory table EmployeeDepartmentHistory Cols: Business Entity ID dtype integer, DepartmentI D dtype integer, Shift ID dtype integer, Start Date dtype date, End Date dtype date, modified date dtype datetime, EmployeePayHistory table EmployeePayHistory Cols: Business Entity ID dtype integer, Rate Change Date dtype datetime, Rate dtype real, Pay Frequency dtype integer, modified date dtype datetime, JobCandidate table JobCandidate Cols: Job Candidate ID dtype integer, Business Entity ID dtype integer, Resume dtype text, modified date dtype datetime, Location table Location Cols: Location ID dtype integer, Name dtype text, Cost Rate dtype real, Availability dtype real, modified date dtype datetime, PhoneNumberType table PhoneNumberType Cols: Phone Number Type ID dtype integer, Phone Number dtype text, modified date dtype datetime, Product table Product Cols: Product ID dtype integer, Name dtype text, Product Number dtype text, Make Flag dtype integer, Finished Goods Flag dtype integer, Color dtype text, Safety Stock Level dtype integer, Reorder Point dtype integer, Standard Cost dtype real, List Price dtype real, Size dtype text, Size Unit Measure Code dtype text, Weight Unit Measure Code dtype text, Weight dtype real, Days To Manufacture dtype integer, Product Line dtype text, Class dtype text, Style dtype text, Product Subcategory ID dtype integer, Product Model ID dtype integer, Sell Start Date dtype datetime, Sell End Date dtype datetime, Discontinued Date dtype datetime, rowguid dtype text, modified date dtype datetime, Document table Document Cols: Document Node dtype text, Document Level dtype integer, Title dtype text, Owner dtype integer, Folder Flag dtype integer, File Name dtype text, File Extension dtype text, Revision dtype text, Change Number dtype integer, Status dtype integer, Document Summary dtype text, Document dtype blob, rowguid dtype text, modified date dtype datetime, StateProvince table StateProvince Cols: State Province ID dtype integer, State Province Code dtype text, Country Region Code dtype text, Is Only State Province Flag dtype integer, Name dtype text, Territory ID dtype integer, rowguid dtype text, modified date dtype datetime, CreditCard table CreditCard Cols: Credit Card ID dtype integer, Card Type dtype text, Card Number dtype text, Expiration Month dtype integer, Expiration Year dtype integer, modified date dtype datetime, SalesOrderHeader table SalesOrderHeader Cols: Sales Order ID dtype integer, RevisionNumber dtype integer, Order Date dtype datetime, DueDate dtype datetime, Ship Date dtype datetime, Status dtype integer, OnlineOrderFlag dtype integer, SalesOrderNumber dtype text, PurchaseOrderNumber dtype text, AccountNumber dtype text, CustomerID dtype integer, SalesPersonID dtype integer, TerritoryID dtype integer, BillToAddressID dtype integer, ShipToAddressID dtype integer, Ship Method ID dtype integer, CreditCardID dtype integer, CreditCardApprovalCode dtype text, CurrencyRateID dtype integer, SubTotal dtype real, Tax Amount dtype real, Freight dtype real, Total Due dtype real, Comment dtype text, rowguid dtype text, modified date dtype datetime,