db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
works_cycles | select t1.name from productsubcategory as t1 inner join product as t2 using (productsubcategoryid) where t2.color = 'grey' group by t1.name | Question: what is the name of the subcategory to which the gray product with the lowest safety stock level belongs? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, Curren... | what is the name of the subcategory to which the gray product with the lowest safety stock level belongs? |
works_cycles | 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 | Question: what is the product cost end date with the highest weight in grams? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> Busine... | what is the product cost end date with the highest weight in grams? |
works_cycles | 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 | Question: what is the percentage of the total products ordered were not rejected by drill size? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate... | what is the percentage of the total products ordered were not rejected by drill size? |
works_cycles | 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 | Question: calculate the average of the total ordered quantity of products purchased whose shipping method was cargo transport 5. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegio... | calculate the average of the total ordered quantity of products purchased whose shipping method was cargo transport 5. |
works_cycles | 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 | Question: 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. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedD... | 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. |
works_cycles | select count(businessentityid) from employeepayhistory where rate * payfrequency > 50 | Question: how many employees earn their salaries on a monthly basis at an hourly rate of more than 50? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, Modif... | how many employees earn their salaries on a monthly basis at an hourly rate of more than 50? |
works_cycles | select firstname, middlename, lastname from person where businessentityid = 1 and persontype = 'em' | Question: what is the employee of company number 1's full name? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, Pe... | what is the employee of company number 1's full name? |
works_cycles | select name from vendor where businessentityid = 1492 | Question: what is the name of the supplier number 1492? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType... | what is the name of the supplier number 1492? |
works_cycles | select count(*) from productvendor where minorderqty > 500 and maxorderqty < 15000 | Question: how many vendors only consented to move on with the 500 to 15000 piece order in terms of quality? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ... | how many vendors only consented to move on with the 500 to 15000 piece order in terms of quality? |
works_cycles | select name from department where groupname = 'executive general and administration' | Question: please list the departments that are part of the executive general and administration group. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, Modif... | please list the departments that are part of the executive general and administration group. |
works_cycles | select lastname from person where persontype = 'em' and middlename like 'c%' | Question: please list the family names of any employees whose middle names begin with c. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Perso... | please list the family names of any employees whose middle names begin with c. |
works_cycles | select count(distinct businessentityid) from productvendor where averageleadtime = 25 | Question: how many vendors are having their products ordered with an average delivery time of 25 days? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, Modif... | how many vendors are having their products ordered with an average delivery time of 25 days? |
works_cycles | select productid from productcosthistory order by standardcost asc limit 3 | Question: please list any 3 product numbers with the lowest standard cost. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessE... | please list any 3 product numbers with the lowest standard cost. |
works_cycles | select count(productid) from product where finishedgoodsflag = 0 and color = 'black' | Question: how many black-colored products are there that cannot be sold? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEnt... | how many black-colored products are there that cannot be sold? |
works_cycles | select jobtitle from employee order by sickleavehours desc limit 3 | Question: please list the top three employees with the most unused sick leave along with their position titles. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCo... | please list the top three employees with the most unused sick leave along with their position titles. |
works_cycles | select addressline1, addressline2 from address where addressid = 11906 | Question: what is the full address of address number 11906? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, Person... | what is the full address of address number 11906? |
works_cycles | select lastreceiptcost - standardprice from productvendor where businessentityid = 1580 | Question: what is business number 1580's net profit? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, N... | what is business number 1580's net profit? |
works_cycles | select listprice - standardcost from product where productid = 740 | Question: what is the sales revenue for item number 740? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonTyp... | what is the sales revenue for item number 740? |
works_cycles | select reviewername from productreview where rating = 5 | Question: how many customers gave a product the best possible rating? please list their names. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate.... | how many customers gave a product the best possible rating? please list their names. |
works_cycles | select businessentityid from vendor where creditrating = ( select creditrating from vendor order by creditrating desc limit 1 ) | Question: what are the company that adventure works deal with that have poor credit rating? please provide their business number. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegi... | what are the company that adventure works deal with that have poor credit rating? please provide their business number. |
works_cycles | select t1.firstname, t2.birthdate from person as t1 inner join employee as t2 on t1.businessentityid = t2.businessentityid where t1.businessentityid = 18 | Question: what is the forename and birthdate of person number 18? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, ... | what is the forename and birthdate of person number 18? |
works_cycles | select t1.name from contacttype as t1 inner join businessentitycontact as t2 on t1.contacttypeid = t2.contacttypeid where t2.businessentityid = 332 | Question: what job is person number 322 currently holding? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonT... | what job is person number 322 currently holding? |
works_cycles | select t2.businessentityid from phonenumbertype as t1 inner join personphone as t2 on t1.phonenumbertypeid = t2.phonenumbertypeid where t1.name = 'cell' limit 3 | Question: please list 3 businesses along with their ids that use cellphones. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> Busines... | please list 3 businesses along with their ids that use cellphones. |
works_cycles | 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' | Question: what is the currency of brazil? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, NameStyle, T... | what is the currency of brazil? |
works_cycles | select count(t2.businessentityid) from department as t1 inner join employeedepartmenthistory as t2 on t1.departmentid = t2.departmentid where t1.name = 'finance' | Question: how many people work in the finance department? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonTy... | how many people work in the finance department? |
works_cycles | 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 | Question: how long does it take for the business to receive the item it has purchased? who is the vendor for business number 1496? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryReg... | how long does it take for the business to receive the item it has purchased? who is the vendor for business number 1496? |
works_cycles | 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 | Question: how many accounts are in bothell as opposed to kenmore? what is the name of the state that comprises these two cities? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegio... | how many accounts are in bothell as opposed to kenmore? what is the name of the state that comprises these two cities? |
works_cycles | 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' | Question: which chromoly steel product model has adventureworks saved in english? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> Bu... | which chromoly steel product model has adventureworks saved in english? |
works_cycles | select t1.businessentityid, t2.'group' from salesperson as t1 inner join salesterritory as t2 using (territoryid) where t1.commissionpct >= 0.018 | Question: please list the total number of companies with a commission percentage of 0.018 or above, along with each company's assigned geographical location. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryR... | please list the total number of companies with a commission percentage of 0.018 or above, along with each company's assigned geographical location. |
works_cycles | 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 | Question: please list the various phone number types in the following order, from most to least common among businesses. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, C... | please list the various phone number types in the following order, from most to least common among businesses. |
works_cycles | 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 | Question: which role has the most common contact among businesses? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID,... | which role has the most common contact among businesses? |
works_cycles | select t2.emailaddress from person as t1 inner join emailaddress as t2 on t1.businessentityid = t2.businessentityid where t1.persontype = 'sp' | Question: what are the salespeople's email addresses? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, ... | what are the salespeople's email addresses? |
works_cycles | select t2.jobtitle from person as t1 inner join employee as t2 on t1.businessentityid = t2.businessentityid where t1.firstname = 'suchitra' | Question: which position does suchitra hold? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, NameStyle... | which position does suchitra hold? |
works_cycles | 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' | Question: how many employees work for advertureworks that is single? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityI... | how many employees work for advertureworks that is single? |
works_cycles | 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' | Question: how much do the works data saved in english and arabic differ from one another? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Pers... | how much do the works data saved in english and arabic differ from one another? |
works_cycles | select t1.addressline1 from address as t1 inner join businessentityaddress as t2 using (addressid) where t2.businessentityid = 1 | Question: what is the location of business number 1? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, N... | what is the location of business number 1? |
works_cycles | select t2.businessentityid from address as t1 inner join businessentityaddress as t2 on t1.addressid = t2.addressid where t1.city = 'duvall' | Question: please list the businesses along with their numbers that have their accounts located in duvall. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, Mo... | please list the businesses along with their numbers that have their accounts located in duvall. |
works_cycles | 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 | Question: what percentage of the adventureworks data is in thai? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, P... | what percentage of the adventureworks data is in thai? |
works_cycles | 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' | Question: what percentage of adventureworks employees are men? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, Per... | what percentage of adventureworks employees are men? |
works_cycles | 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 | Question: where is the address 15873 located, in what city and state? does that city belong to a province where the code exists? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegio... | where is the address 15873 located, in what city and state? does that city belong to a province where the code exists? |
works_cycles | select t1.addressline1, t1.addressline2 from address as t1 inner join businessentityaddress as t2 on t1.addressid = t2.addressid where t2.businessentityid = 24 | Question: what is the full address of business number 24? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonTy... | what is the full address of business number 24? |
works_cycles | select expyear from creditcard where creditcardid = 9648 | Question: which year is credit card no.9648's expiration year? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, Per... | which year is credit card no.9648's expiration year? |
works_cycles | select businessentityid from person where firstname = 'emma' and lastname = 'harris' | Question: what's emma h harris's business entity id number? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, Person... | what's emma h harris's business entity id number? |
works_cycles | select locationid from location where name = 'debur and polish' | Question: what is the location id for debur and polish? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType... | what is the location id for debur and polish? |
works_cycles | select departmentid from department where groupname = 'sales and marketing' | Question: what are the department ids under the sales and marketing group? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessE... | what are the department ids under the sales and marketing group? |
works_cycles | select businessentityid from salesperson where saleslastyear = '1635823.3967' | Question: which sales person made the sale of 1635823.3967 last year? give the business entity id. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedD... | which sales person made the sale of 1635823.3967 last year? give the business entity id. |
works_cycles | select starttime from shift where shiftid = '2' | Question: what is the shift start time for shift id no.2? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonTy... | what is the shift start time for shift id no.2? |
works_cycles | select name from contacttype where contacttypeid = '16' | Question: what is contact type id no.16 represent for? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType,... | what is contact type id no.16 represent for? |
works_cycles | select shipbase from shipmethod where name = 'overseas - deluxe' | Question: what is the minimum shipping charge for 'overseas - deluxe'? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntit... | what is the minimum shipping charge for 'overseas - deluxe'? |
works_cycles | select name from culture where cultureid = 'fr' | Question: please tell the meaning of cultureid 'fr'. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, N... | please tell the meaning of cultureid 'fr'. |
works_cycles | select currencycode from currency where name = 'mauritius rupee' | Question: give the mauritius rupee's currency code. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, Na... | give the mauritius rupee's currency code. |
works_cycles | select phonenumbertypeid from phonenumbertype where name = 'cell' | Question: name cellphone number's type id? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, NameStyle, ... | name cellphone number's type id? |
works_cycles | select birthdate from employee where hiredate = '2008-12-07' | Question: for the older production technician who was hired in 2008/12/7, what's his/her birthday? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedD... | for the older production technician who was hired in 2008/12/7, what's his/her birthday? |
works_cycles | select t1.name from product as t1 inner join productmodel as t2 on t1.productmodelid = t2.productmodelid where t1.productid = 793 | Question: what is the product id no.793's model name? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, ... | what is the product id no.793's model name? |
works_cycles | 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 | Question: what are the unit measure codes for product id no.762? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, P... | what are the unit measure codes for product id no.762? |
works_cycles | select addressline1, addressline2 from address where addressid in ( select addressid from businessentityaddress where businessentityid = 4 ) | Question: where is business entity id no.4 located at? give the address down to street. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person... | where is business entity id no.4 located at? give the address down to street. |
works_cycles | 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 | Question: for the on going assembly item component id no. 494, what's the unit measure for it? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate.... | for the on going assembly item component id no. 494, what's the unit measure for it? |
works_cycles | 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 | Question: for the document control assistant who was born on 1975/12/25, how many private documents did he/she have? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, Curre... | for the document control assistant who was born on 1975/12/25, how many private documents did he/she have? |
works_cycles | 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' | Question: to the products which could make the profit as 21.9037, what were their list price after october of 2012? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, Curren... | to the products which could make the profit as 21.9037, what were their list price after october of 2012? |
works_cycles | select t1.thumbnailphoto from productphoto as t1 inner join productproductphoto as t2 on t1.productphotoid = t2.productphotoid where t2.productid = 1 | Question: what is the size of the photo of product id no.1? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, Person... | what is the size of the photo of product id no.1? |
works_cycles | 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' | Question: how many letters are there in catherine ward's e-mail account passwords? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> B... | how many letters are there in catherine ward's e-mail account passwords? |
works_cycles | 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' | Question: what rating did jill give for hl mountain pedal? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonT... | what rating did jill give for hl mountain pedal? |
works_cycles | select t1.lastreceiptcost - t1.standardprice from productvendor as t1 inner join product as t2 on t1.productid = t2.productid where t2.name = 'freewheel' | Question: what's the profit for the freewheel? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, NameSty... | what's the profit for the freewheel? |
works_cycles | 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' | Question: did rachel valdez complete her sales task? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, N... | did rachel valdez complete her sales task? |
works_cycles | select count(distinct t1.name) from salestaxrate as t1 inner join stateprovince as t2 on t1.stateprovinceid = t2.stateprovinceid where t2.name = 'quebec' | Question: how many types of tax did the sales happen in quebec have? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityI... | how many types of tax did the sales happen in quebec have? |
works_cycles | 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' | Question: what's kevin a wright's email address? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, NameS... | what's kevin a wright's email address? |
works_cycles | 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 | Question: what is the number of state province of france that doesn't have a state province code? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDa... | what is the number of state province of france that doesn't have a state province code? |
works_cycles | 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' | Question: what kind of transaction type for the 'hl road frame - black, 48' order happened in 2012/12/13? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, Mo... | what kind of transaction type for the 'hl road frame - black, 48' order happened in 2012/12/13? |
works_cycles | 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' | Question: which type of transaction was it for the 'll road handlebars' order happened in 2012/11/3? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, Modifie... | which type of transaction was it for the 'll road handlebars' order happened in 2012/11/3? |
works_cycles | 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' | Question: how is the credit rating for company whose rowguid is '33671a4e-df2b-4879-807b-e3f930dd5c0c'? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, Modi... | how is the credit rating for company whose rowguid is '33671a4e-df2b-4879-807b-e3f930dd5c0c'? |
works_cycles | 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' | Question: what is the preferredvendorstatus for the company which has the rowguid of '684f328d-c185-43b9-af9a-37acc680d2af'? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCod... | what is the preferredvendorstatus for the company which has the rowguid of '684f328d-c185-43b9-af9a-37acc680d2af'? |
works_cycles | select t1.activeflag from vendor as t1 inner join businessentitycontact as t2 on t1.businessentityid = t2.businessentityid where t2.personid = 2054 | Question: for person id no.2054, is his/her vendor still active? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, P... | for person id no.2054, is his/her vendor still active? |
works_cycles | 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' | Question: show me the phone number of gerald patel's. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, ... | show me the phone number of gerald patel's. |
works_cycles | select t2.name from personphone as t1 inner join phonenumbertype as t2 using (phonenumbertypeid) where t1.businessentityid = 13626 | Question: which is business entity id no.13626's phone number type? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID... | which is business entity id no.13626's phone number type? |
works_cycles | 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' | Question: what's lynn n tsoflias's job title? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, NameStyl... | what's lynn n tsoflias's job title? |
works_cycles | select count(*) from productcategory as t1 inner join productsubcategory as t2 on t1.productcategoryid = t2.productcategoryid where t1.name = 'bikes' | Question: what is the number of the sub categories for bikes? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, Pers... | what is the number of the sub categories for bikes? |
works_cycles | 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' | Question: for the document control assistant who was hired on 2009/1/22, what is the percentage of private documents did he/she have? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> Country... | for the document control assistant who was hired on 2009/1/22, what is the percentage of private documents did he/she have? |
works_cycles | 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' | Question: how much is hl grip tape's profit ratio? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, Nam... | how much is hl grip tape's profit ratio? |
works_cycles | 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 | Question: for all phone numbers, what percentage of the total is cell phone? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> Busines... | for all phone numbers, what percentage of the total is cell phone? |
works_cycles | select productassemblyid from billofmaterials where unitmeasurecode = 'ea' and bomlevel = 2 and perassemblyqty > 10 | Question: 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? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. Countr... | 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? |
works_cycles | select count(locationid) from workorderrouting where actualresourcehrs = 2 | Question: how many location ids have actual resource hours of 2? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, P... | how many location ids have actual resource hours of 2? |
works_cycles | 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 | Question: what is the stocked quantity of products manufactured from location id 40? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person ->... | what is the stocked quantity of products manufactured from location id 40? |
works_cycles | 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 | Question: what are the total per assembly quantity for unit measure code ea, in and oz respectively? what are the name of these 3 code? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> Count... | what are the total per assembly quantity for unit measure code ea, in and oz respectively? what are the name of these 3 code? |
works_cycles | 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 ) | Question: which product id do not have any work order id? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonTy... | which product id do not have any work order id? |
works_cycles | select productid from product where productid in ( select productid from transactionhistory where transactiontype = 'p' ) | Question: what is the name of product purchased with transaction type p? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEnt... | what is the name of product purchased with transaction type p? |
works_cycles | 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' | Question: state the full name of accountants in the company. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, Perso... | state the full name of accountants in the company. |
works_cycles | 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 = 'snchez' | Question: what is the job position currently occupied by ken j snchez? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntit... | what is the job position currently occupied by ken j snchez? |
works_cycles | 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' | Question: how many male employees do not wish to receive e-mail promotion? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessE... | how many male employees do not wish to receive e-mail promotion? |
works_cycles | 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 | Question: who is the top sales person who achived highest percentage of projected sales quota in 2013? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, Modif... | who is the top sales person who achived highest percentage of projected sales quota in 2013? |
works_cycles | 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' | Question: how many of the non-sales employees are married? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonT... | how many of the non-sales employees are married? |
works_cycles | 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' | Question: among the production technicians who are single, how many of them are vendor contact? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate... | among the production technicians who are single, how many of them are vendor contact? |
works_cycles | select sum(t1.sickleavehours) from employee as t1 inner join person as t2 on t1.businessentityid = t2.businessentityid where t2.emailpromotion = 0 | Question: what is the total sick leave hours of employees who do not wish to receive any e-mail promotion? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, M... | what is the total sick leave hours of employees who do not wish to receive any e-mail promotion? |
works_cycles | 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 | Question: among the sales people, who are hired prior to 2010? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, Per... | among the sales people, who are hired prior to 2010? |
works_cycles | 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 | Question: which sales person achieved the highest sales ytd? what is the projected yearly sales quota in 2011 for this person? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionC... | which sales person achieved the highest sales ytd? what is the projected yearly sales quota in 2011 for this person? |
works_cycles | 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 | Question: how many people with the name alex are single and occupying organization level of 1? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate.... | how many people with the name alex are single and occupying organization level of 1? |
works_cycles | 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' | Question: what is the average vacation hours taken by sales person? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID... | what is the average vacation hours taken by sales person? |
works_cycles | 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' | Question: state the last name and job title of owner for document 'crank arm and tire maintenance'. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, Modified... | state the last name and job title of owner for document 'crank arm and tire maintenance'. |
works_cycles | 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 | Question: how many employees do not have any suffix and what are their organization level? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Per... | how many employees do not have any suffix and what are their organization level? |
works_cycles | 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' | Question: 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. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegion... | 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. |
works_cycles | 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) | Question: who are the employees that submitted resume to human resource department and got hired? state the last name. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, Cur... | who are the employees that submitted resume to human resource department and got hired? state the last name. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.