context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How many accounts are in Bothell as opposed to Kenmore? What is the name of the State that comprises these two cities? | 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 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Which chromoly steel product model has AdventureWorks saved in 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Please list the total number of companies with a commission percentage of 0.018 or above, along with each company's assigned geographical location. | SELECT T1.BusinessEntityID, T2.'Group' FROM SalesPerson AS T1 INNER JOIN SalesTerritory AS T2 USING (territoryid) WHERE T1.CommissionPct >= 0.018 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Please list the various phone number types in the following order, from most to least common among businesses. | 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 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Which role has the most common contact among businesses? | 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 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What are the salespeople's email addresses? | SELECT T2.EmailAddress FROM Person AS T1 INNER JOIN EmailAddress AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.PersonType = 'SP' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Which position does Suchitra hold? | SELECT T2.JobTitle FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.FirstName = 'Suchitra' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How many employees work for AdvertureWorks that is single? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How much do the works data saved in English and Arabic differ from one another? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the location of business number 1? | SELECT T1.AddressLine1 FROM Address AS T1 INNER JOIN BusinessEntityAddress AS T2 USING (AddressID) WHERE T2.BusinessEntityID = 1 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Please list the businesses along with their numbers that have their accounts located in Duvall. | SELECT T2.BusinessEntityID FROM Address AS T1 INNER JOIN BusinessEntityAddress AS T2 ON T1.AddressID = T2.AddressID WHERE T1.City = 'Duvall' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What percentage of the AdventureWorks data is in Thai? | 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 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What percentage of AdventureWorks employees are men? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Where is the address 15873 located, in what city and state? Does that city belong to a province where the code exists? | 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 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the full address of business number 24? | SELECT T1.AddressLine1, T1.AddressLine2 FROM Address AS T1 INNER JOIN BusinessEntityAddress AS T2 ON T1.AddressID = T2.AddressID WHERE T2.BusinessEntityID = 24 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Which year is credit card No.9648's Expiration Year? | SELECT ExpYear FROM CreditCard WHERE CreditCardID = 9648 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What's Emma H Harris's Business Entity ID number? | SELECT BusinessEntityID FROM Person WHERE FirstName = 'Emma' AND LastName = 'Harris' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the location id for Debur and Polish? | SELECT LocationID FROM Location WHERE Name = 'Debur and Polish' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What are the Department ids under the Sales and Marketing Group? | SELECT DepartmentID FROM Department WHERE GroupName = 'Sales and Marketing' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Which sales person made the sale of 1635823.3967 last year? Give the Business Entity ID. | SELECT BusinessEntityID FROM SalesPerson WHERE SalesLastYear = '1635823.3967' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the Shift start time for Shift ID No.2? | SELECT StartTime FROM Shift WHERE ShiftID = '2' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is contact Type ID No.16 represent for? | SELECT Name FROM ContactType WHERE ContactTypeID = '16' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the minimum shipping charge for "OVERSEAS - DELUXE"? | SELECT ShipBase FROM ShipMethod WHERE Name = 'OVERSEAS - DELUXE' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Please tell the meaning of CultureID "fr". | SELECT Name FROM Culture WHERE CultureID = 'fr' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Give the Mauritius Rupee's currency code. | SELECT CurrencyCode FROM Currency WHERE Name = 'Mauritius Rupee' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Name cellphone number's Type ID? | SELECT PhoneNumberTypeID FROM PhoneNumberType WHERE Name = 'Cell' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | For the older production technician who was hired in 2008/12/7, what's his/her birthday? | SELECT BirthDate FROM Employee WHERE HireDate = '2008-12-07' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the product ID No.793's model name? | SELECT T1.Name FROM Product AS T1 INNER JOIN ProductModel AS T2 ON T1.ProductModelID = T2.ProductModelID WHERE T1.ProductID = 793 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What are the unit measure codes for product ID No.762? | 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 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Where is Business Entity ID No.4 located at? Give the address down to street. | SELECT AddressLine1, AddressLine2 FROM Address WHERE AddressID IN ( SELECT AddressID FROM BusinessEntityAddress WHERE BusinessEntityID = 4 ) | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | For the on going assembly item Component ID No. 494, what's the Unit measure for it? | 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 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | For the document Control Assistant who was born on 1975/12/25, how many private documents did he/she have? | 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 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | To the products which could make the profit as 21.9037, what were their list price after October of 2012? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the size of the photo of product id No.1? | SELECT T1.ThumbNailPhoto FROM ProductPhoto AS T1 INNER JOIN ProductProductPhoto AS T2 ON T1.ProductPhotoID = T2.ProductPhotoID WHERE T2.ProductID = 1 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How many letters are there in Catherine Ward's e-mail account passwords? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What rating did Jill give for HL Mountain Pedal? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What's the profit for the Freewheel? | SELECT T1.LastReceiptCost - T1.StandardPrice FROM ProductVendor AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'Freewheel' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Did Rachel Valdez complete her sales task? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How many types of tax did the sales happen in Quebec have? | SELECT COUNT(DISTINCT T1.Name) FROM SalesTaxRate AS T1 INNER JOIN StateProvince AS T2 ON T1.StateProvinceID = T2.StateProvinceID WHERE T2.Name = 'Quebec' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What's Kevin A Wright's email address? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the number of State Province of France that doesn't have a State Province Code? | 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 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What kind of transaction type for the "HL Road Frame - Black, 48" order happened in 2012/12/13? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Which type of transaction was it for the "LL Road Handlebars" order happened in 2012/11/3? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How is the Credit Rating for company whose rowguid is "33671A4E-DF2B-4879-807B-E3F930DD5C0C"? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the PreferredVendorStatus for the company which has the rowguid of "684F328D-C185-43B9-AF9A-37ACC680D2AF"? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | For person id No.2054, is his/her vendor still active? | SELECT T1.ActiveFlag FROM Vendor AS T1 INNER JOIN BusinessEntityContact AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonID = 2054 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Show me the phone number of Gerald Patel's. | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Which is Business Entity ID No.13626's phone number type? | SELECT T2.Name FROM PersonPhone AS T1 INNER JOIN PhoneNumberType AS T2 USING (PhoneNumberTypeID) WHERE T1.BusinessEntityID = 13626 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What's Lynn N Tsoflias's job title? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the number of the sub categories for bikes? | SELECT COUNT(*) FROM ProductCategory AS T1 INNER JOIN ProductSubcategory AS T2 ON T1.ProductCategoryID = T2.ProductCategoryID WHERE T1.Name = 'Bikes' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | For the document Control Assistant who was hired on 2009/1/22, what is the percentage of private documents did he/she have? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How much is HL Grip Tape's 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | For all phone numbers, what percentage of the total is cell phone? | 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 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | 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? | SELECT ProductAssemblyID FROM BillOfMaterials WHERE UnitMeasureCode = 'EA' AND BOMLevel = 2 AND PerAssemblyQty > 10 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How many location IDs have actual resource hours of 2? | SELECT COUNT(LocationID) FROM WorkOrderRouting WHERE ActualResourceHrs = 2 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the stocked quantity of products manufactured from location ID 40? | 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 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What are the total per assembly quantity for unit measure code EA, IN and OZ respectively? What are the name of these 3 code? | 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 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Which product ID do not have any work order ID? | 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 ) | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the name of product purchased with transaction type P? | SELECT ProductID FROM Product WHERE ProductID IN ( SELECT ProductID FROM TransactionHistory WHERE TransactionType = 'P' ) | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | State the full name of accountants in the company. | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the job position currently occupied by Ken J Sánchez? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How many male employees do not wish to receive e-mail promotion? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Who is the top sales person who achived highest percentage of projected sales quota in 2013? | 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 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How many of the non-sales employees are married? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Among the Production Technicians who are single, how many of them are vendor contact? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the total sick leave hours of employees who do not wish to receive any e-mail promotion? | SELECT SUM(T1.SickLeaveHours) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.EmailPromotion = 0 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Among the sales people, who are hired prior to 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 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Which sales person achieved the highest sales YTD? What is the projected yearly sales quota in 2011 for this person? | 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 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How many people with the name Alex are single and occupying organization level of 1? | 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 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the average vacation hours taken by Sales person? | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | State the last name and job title of owner for document "Crank Arm and Tire Maintenance". | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How many employees do not have any suffix and what are their organization level? | 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 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | 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. | 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' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Who are the employees that submitted resume to Human Resource Department and got hired? State the last name. | 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) | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | List down the email address of female single employees. | SELECT T3.EmailAddress FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN EmailAddress AS T3 ON T2.BusinessEntityID = T3.BusinessEntityID WHERE T1.Gender = 'F' AND T1.MaritalStatus = 'S' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What are the color of products that were reviewed? | SELECT T1.Color FROM Product AS T1 INNER JOIN ProductReview AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID = 709 OR 937 OR 798 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the projected sales quota amount in 2013 and sales YTD amount for sales person with business entity ID 275? | SELECT SUM(T1.SalesQuota) FROM SalesPerson AS T1 INNER JOIN SalesPersonQuotaHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.BusinessEntityID = 275 AND STRFTIME('%Y', QuotaDate) = '2013' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Provide the business entity ID who did not achieved projected yearly sales quota in 2013. | SELECT DISTINCT T1.BusinessEntityID FROM SalesPerson AS T1 INNER JOIN SalesPersonQuotaHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE STRFTIME('%Y', T2.QuotaDate) = '2013' AND T1.SalesQuota < T1.SalesLastYear | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Among the employees who wish to receive e-mail promotion from AdventureWorks, how many percent of them are female? | SELECT CAST(SUM(CASE WHEN T1.Gender = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.EmailPromotion = 1 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How many times is married non sales employees against single non-sales employees? | SELECT CAST(SUM(CASE WHEN T1.MaritalStatus = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T1.MaritalStatus = 'S' THEN 1 ELSE 0 END) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonType = 'EM' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How much is the total bonus received by sales person and what is the percentage of it against the projected yearly sales quota in 2013? | SELECT SUM(T1.Bonus) , CAST(SUM(T1.Bonus) AS REAL) * 100 / SUM(T1.SalesQuota) FROM SalesPerson AS T1 INNER JOIN SalesPersonQuotaHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE STRFTIME('%Y', T2.QuotaDate) = '2013' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How many types of credit cards are there and how many are vista? | SELECT COUNT(CardNumber) FROM CreditCard WHERE CardType = 'vista' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the name of the product with the id "475"? | SELECT Name FROM Product WHERE ProductID = 475 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Among the employees born before 1980 , how many of them are single? | SELECT COUNT(BusinessEntityID) FROM Employee WHERE MaritalStatus = 's' AND BirthDate < '1980-1-1' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | List all the names of the stores assigned to the sales person with the id "277". | SELECT Name FROM Store WHERE SalesPersonID = 277 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How many products with the id "989" were sold in August 2013? | SELECT SUM(Quantity) FROM TransactionHistory WHERE TransactionDate LIKE '2013-08%' AND TransactionType = 'S' AND ProductID = 989 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | List all of the credit cards that had expired by 2007. | SELECT CardNumber FROM CreditCard WHERE ExpYear < 2007 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | List all the pay rates of all employees that were hired at 20 years of age. | SELECT T2.Rate FROM Employee AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE STRFTIME('%Y', T1.HireDate) - STRFTIME('%Y', T1.BirthDate) = 20 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the name of the territory assigned to the sales person with business id "277"? | SELECT T2.Name FROM SalesPerson AS T1 INNER JOIN SalesTerritory AS T2 ON T1.TerritoryID = T2.TerritoryID WHERE T1.BusinessEntityID = 277 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the full name of the Vice President of Production? | SELECT T2.FirstName, T2.MiddleName, T2.LastName FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.JobTitle = 'Vice President of Production' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How many employees in the Information Service department work the evening shift? | SELECT COUNT(T2.BusinessEntityID) FROM Department AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.DepartmentID = T2.DepartmentID INNER JOIN Shift AS T3 ON T2.ShiftId = T3.ShiftId WHERE T1.Name = 'Information Services' AND T3.Name = 'Evening' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | List all the purchase order ids of the vendor with a below average rating. | SELECT T2.PurchaseOrderID FROM Vendor AS T1 INNER JOIN PurchaseOrderHeader AS T2 ON T1.BusinessEntityID = T2.VendorID WHERE T1.CreditRating = 5 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Is the phone number "114-555-0100" a work number or a home number? | SELECT T2.Name FROM PersonPhone AS T1 INNER JOIN PhoneNumberType AS T2 ON T1.PhoneNumberTypeID = T2.PhoneNumberTypeID WHERE T1.PhoneNumber = '114-555-0100' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the total shipment by "cargo transport 5" cost of all purchase orders created on 12/14/2011? | SELECT SUM(t2.freight) FROM ShipMethod AS t1 INNER JOIN PurchaseOrderHeader AS t2 ON t1.shipmethodid = t2.shipmethodid WHERE t1.name = 'cargo transport 5' AND t2.orderdate = '2011-12-14' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How many sales orders did the salesperson David R. Campbell create? | SELECT COUNT(T2.TotalDue) FROM Person AS T1 INNER JOIN SalesOrderHeader AS T2 ON T1.ModifiedDate = T2.DueDate WHERE T1.FirstName = 'David' AND T1.MiddleName = 'R' AND T1.LastName = 'Campbell' AND T1.PersonType = 'SP' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the email address of the Facilities Manager? | SELECT T3.EmailAddress FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN EmailAddress AS T3 ON T2.BusinessEntityID = T3.BusinessEntityID WHERE T1.JobTitle = 'Facilities Manager' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | How many customers are there in Canada? | SELECT COUNT(T2.CustomerID) FROM SalesTerritory AS T1 INNER JOIN Customer AS T2 ON T1.TerritoryID = T2.TerritoryID WHERE T1.Name = 'Canada' | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | What is the shipping address for the sales order "43873"? | SELECT T1.ShipToAddressID FROM SalesOrderHeader AS T1 INNER JOIN Address AS T2 ON T1.BillToAddressID = T2.AddressID WHERE T1.SalesOrderID = 43873 GROUP BY T1.ShipToAddressID | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | List the first names of the people with more than 65 sick leave hours. | SELECT T2.FirstName FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.SickLeaveHours > 65 | bird |
CREATE TABLE works_cycles (CountryRegionCode text, Name text, ModifiedDate datetime, CultureID text, Name text, ModifiedDate datetime, CurrencyCode text, Name text, ModifiedDate datetime, CountryRegionCode text, CurrencyCode text, ModifiedDate datetime, BusinessEntityID integer, PersonType text, NameStyle integer, Titl... | Among all the production technicians, how many have a below average pay rate for a production technician? | SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.JobTitle LIKE 'Production Technician%' AND T2.Rate < ( SELECT AVG(T2.Rate) FROM Employee AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID ... | bird |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.