db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
works_cycles | select description, discountpct from specialoffer where category = 'reseller' order by discountpct desc limit 0, 3 | Question: please list the top 3 discounts with the highest discount percentage and fall under the reseller category. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, Curre... | please list the top 3 discounts with the highest discount percentage and fall under the reseller category. |
works_cycles | select demographics from store where name = 'valley bicycle specialists' | Question: where can i get the demographic information about the valley bicycle specialists store? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDa... | where can i get the demographic information about the valley bicycle specialists store? |
works_cycles | select sum(finishedgoodsflag) from product where makeflag = 1 | Question: among all the products that are manufactured in-house, how many of them are salable? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate.... | among all the products that are manufactured in-house, how many of them are salable? |
works_cycles | select safetystocklevel from product where name = 'chainring bolts' | Question: what is the minimum inventory quantity of chainring bolts? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityI... | what is the minimum inventory quantity of chainring bolts? |
works_cycles | select name from product order by standardcost desc limit 1 | Question: which product has the highest standard cost? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType,... | which product has the highest standard cost? |
works_cycles | select persontype from person where firstname = 'david' and lastname = 'bradley' | Question: what type of employee is david bradley? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, Name... | what type of employee is david bradley? |
works_cycles | select count(businessentityid) from person where persontype = 'sc' and title = 'mr.' | Question: among the employees who are store contacts, how many of them have a title of 'mr.'? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. ... | among the employees who are store contacts, how many of them have a title of 'mr.'? |
works_cycles | select t2.addressline1, t2.addressline2 from businessentityaddress as t1 inner join address as t2 on t1.addressid = t2.addressid inner join store as t3 on t1.businessentityid = t3.businessentityid where t3.name = 'valley bicycle specialists' | Question: where can i find the valley bicycle specialists store? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, P... | where can i find the valley bicycle specialists store? |
works_cycles | select t2.emailaddress from person as t1 inner join emailaddress as t2 on t1.businessentityid = t2.businessentityid where t1.firstname = 'david' and t1.lastname = 'bradley' | Question: to which e-mail address should i write if i want to contact david bradley? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person ->... | to which e-mail address should i write if i want to contact david bradley? |
works_cycles | select t2.phonenumber from person as t1 inner join personphone as t2 on t1.businessentityid = t2.businessentityid where t1.persontype = 'sc' | Question: please list the phone numbers of all the store contacts. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID,... | please list the phone numbers of all the store contacts. |
works_cycles | select t2.passwordhash from person as t1 inner join password as t2 on t1.businessentityid = t2.businessentityid where t1.firstname = 'david' and t1.lastname = 'bradley' | Question: what is the hashed password of david bradley? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType... | what is the hashed password of david bradley? |
works_cycles | select t2.emailaddress from person as t1 inner join emailaddress as t2 on t1.businessentityid = t2.businessentityid where t1.emailpromotion = 2 | Question: please list the e-mail addresses of all the employees who wish to receive e-mail promotions from adventureworks and selected partners. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency... | please list the e-mail addresses of all the employees who wish to receive e-mail promotions from adventureworks and selected partners. |
works_cycles | select t3.cardnumber from person as t1 inner join personcreditcard as t2 on t1.businessentityid = t2.businessentityid inner join creditcard as t3 on t2.creditcardid = t3.creditcardid where t1.firstname = 'david' and t1.lastname = 'bradley' | Question: please show the credit card number of david bradley. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, Per... | please show the credit card number of david bradley. |
works_cycles | select t3.expyear from person as t1 inner join personcreditcard as t2 on t1.businessentityid = t2.businessentityid inner join creditcard as t3 on t2.creditcardid = t3.creditcardid where t1.firstname = 'david' and t1.lastname = 'bradley' | Question: in which year will the david bradley's credit card expire? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityI... | in which year will the david bradley's credit card expire? |
works_cycles | select t1.firstname, t1.lastname from person as t1 inner join personcreditcard as t2 on t1.businessentityid = t2.businessentityid inner join creditcard as t3 on t2.creditcardid = t3.creditcardid where t3.expyear = 2007 and t1.persontype = 'sc' | Question: please list the names of all the store contact employees whose credit cards expired in 2007. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, Modif... | please list the names of all the store contact employees whose credit cards expired in 2007. |
works_cycles | select count(t1.firstname) from person as t1 inner join personcreditcard as t2 on t1.businessentityid = t2.businessentityid inner join creditcard as t3 on t2.creditcardid = t3.creditcardid where t3.cardtype = 'vista' and t1.persontype = 'sc' | Question: among the store contact employees, how many of them have a vista credit card? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person... | among the store contact employees, how many of them have a vista credit card? |
works_cycles | select count(t3.departmentid) from person as t1 inner join employeedepartmenthistory as t2 on t1.businessentityid = t2.businessentityid inner join department as t3 on t2.departmentid = t3.departmentid where t1.firstname = 'david' and t1.lastname = 'bradley' | Question: how many departments have david bradley been in? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonT... | how many departments have david bradley been in? |
works_cycles | select t2.departmentid from person as t1 inner join employeedepartmenthistory as t2 on t1.businessentityid = t2.businessentityid inner join department as t3 on t2.departmentid = t3.departmentid where t1.firstname = 'david' and t1.lastname = 'bradley' | Question: please list the departments that david bradley used to belong to. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> Business... | please list the departments that david bradley used to belong to. |
works_cycles | select count(t1.businessentityid) from person as t1 inner join employeedepartmenthistory as t2 on t1.businessentityid = t2.businessentityid inner join department as t3 on t2.departmentid = t3.departmentid where t3.name = 'engineering' and strftime('%y', t2.enddate) > '2009' and strftime('%y', t2.startdate) < '2009' | Question: how many people were there in the engineering department in the year 2009? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person ->... | how many people were there in the engineering department in the year 2009? |
works_cycles | select t1.firstname, t1.lastname from person as t1 inner join employeedepartmenthistory as t2 on t1.businessentityid = t2.businessentityid inner join department as t3 on t2.departmentid = t3.departmentid where t3.name = 'engineering' order by t2.enddate - t2.startdate desc limit 1 | Question: which employee has been in the engineering department the longest? please give his or her firstname and lastname. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode... | which employee has been in the engineering department the longest? please give his or her firstname and lastname. |
works_cycles | select count(t1.businessentityid) from employeedepartmenthistory as t1 inner join department as t2 on t1.departmentid = t2.departmentid inner join person as t3 on t1.businessentityid where t3.persontype = 'sc' and t2.groupname = 'manufacturing' and strftime('%y', t1.enddate) >= '2007' and strftime('%y', t1.startdate) <... | Question: among the employees in the manufacturing group in 2007, how many of them are store contacts? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, Modif... | among the employees in the manufacturing group in 2007, how many of them are store contacts? |
works_cycles | select t3.cardnumber from employeedepartmenthistory as t1 inner join department as t2 on t1.departmentid = t2.departmentid inner join creditcard as t3 on t1.modifieddate = t3.modifieddate inner join personcreditcard as t4 on t3.creditcardid = t4.creditcardid where t2.name = 'finance' and t1.enddate is not null | Question: please list the credit card numbers of all the employees who have left the finance department. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, Mod... | please list the credit card numbers of all the employees who have left the finance department. |
works_cycles | select count(t1.businessentityid) from employeedepartmenthistory as t1 inner join department as t2 on t1.departmentid = t2.departmentid inner join personcreditcard as t3 on t1.businessentityid = t3.businessentityid inner join creditcard as t4 on t3.creditcardid = t4.creditcardid where t4.expyear = 2007 and t2.name = 'e... | Question: how many employees working in the engineering department in 2007 would have their credit cards expired in the same year? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryReg... | how many employees working in the engineering department in 2007 would have their credit cards expired in the same year? |
works_cycles | select t2.emailaddress from employeedepartmenthistory as t1 inner join emailaddress as t2 on t1.businessentityid = t2.businessentityid group by t2.businessentityid order by count(t1.departmentid) desc limit 1 | Question: what is the e-mail address of the employee who switched departments for the most times? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDa... | what is the e-mail address of the employee who switched departments for the most times? |
works_cycles | select count(t1.businessentityid) from employeedepartmenthistory as t1 inner join person as t2 on t1.businessentityid = t2.businessentityid inner join department as t3 on t1.departmentid = t3.departmentid where t3.name = 'engineering' and t2.emailpromotion = 0 | Question: among all the employees who don't wish to receive promotion e-mails, how many of them belong to or once belonged to the engineering department? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegio... | among all the employees who don't wish to receive promotion e-mails, how many of them belong to or once belonged to the engineering department? |
works_cycles | select count(t1.businessentityid) from employeedepartmenthistory as t1 inner join department as t2 on t1.departmentid = t2.departmentid where t2.groupname = 'quality assurance' and strftime('%y', t1.startdate) = '2007' | Question: how many employees came into the quality assurance group in the year 2007? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person ->... | how many employees came into the quality assurance group in the year 2007? |
works_cycles | select t3.name from specialoffer as t1 inner join specialofferproduct as t2 on t1.specialofferid = t2.specialofferid inner join product as t3 on t2.productid = t3.productid where t1.description = 'll road frame sale' | Question: please list the product names of all the products on the ll road frame sale. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person ... | please list the product names of all the products on the ll road frame sale. |
works_cycles | select count(distinct productid) from specialoffer as t1 inner join specialofferproduct as t2 on t1.specialofferid = t2.specialofferid where t1.description = 'll road frame sale' | Question: how many products were on the ll road frame sale? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, Person... | how many products were on the ll road frame sale? |
works_cycles | select case when count(t1.description) >= 1 then 'yes' else 'no' end from specialoffer as t1 inner join specialofferproduct as t2 on t1.specialofferid = t2.specialofferid inner join product as t3 on t2.productid = t3.productid where t3.name = 'chainring bolts' | Question: has the product chainring bolts been on any of the sales? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID... | has the product chainring bolts been on any of the sales? |
works_cycles | select count(t2.productid) from specialoffer as t1 inner join specialofferproduct as t2 on t1.specialofferid = t2.specialofferid inner join product as t3 on t2.productid = t3.productid inner join productsubcategory as t4 on t3.productsubcategoryid = t4.productsubcategoryid inner join productcategory as t5 on t4.product... | Question: how many products from the clothing category were on the ll road frame sale? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person ... | how many products from the clothing category were on the ll road frame sale? |
works_cycles | select case when t1.makeflag = 1 then t1.name end from product as t1 inner join productsubcategory as t2 on t1.productsubcategoryid = t2.productsubcategoryid inner join productcategory as t3 on t2.productcategoryid = t3.productcategoryid where t2.productsubcategoryid = 3 | Question: please list the products that are under the clothing category that are manufactured in-house and salable. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, Curren... | please list the products that are under the clothing category that are manufactured in-house and salable. |
works_cycles | select cast(sum(365 * (strftime('%y', t1.enddate) - strftime('%y', t1.startdate)) + 30 * (strftime('%m', t1.enddate) - strftime('%m', t1.startdate)) + strftime('%d', t1.enddate) - strftime('%d', t1.startdate)) as real) / count(t1.businessentityid) from employeedepartmenthistory as t1 inner join department as t2 on t1.d... | Question: for all the employees that have left the engineering department, what is the average time of their stay? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, Currenc... | for all the employees that have left the engineering department, what is the average time of their stay? |
works_cycles | select avg(t3.rate) from employeedepartmenthistory as t1 inner join department as t2 on t1.departmentid = t2.departmentid inner join employeepayhistory as t3 on t1.businessentityid = t3.businessentityid where t2.name = 'engineering' and strftime('%y', enddate) > '2007' and strftime('%y', t1.startdate) < '2007' | Question: what is the average pay rate of the employees who worked in the engineering departmentin 2007? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, Mod... | what is the average pay rate of the employees who worked in the engineering departmentin 2007? |
works_cycles | select (max(t1.listprice) - min(t1.listprice)) * 100 / min(t1.listprice) from product as t1 inner join productsubcategory as t2 on t1.productsubcategoryid = t2.productsubcategoryid inner join productcategory as t3 on t2.productcategoryid = t3.productcategoryid where t3.name = 'clothing' | Question: how much more expensive in percentage is the product with the highest selling price from the product with the lowest selling price in the clothing category? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate.... | how much more expensive in percentage is the product with the highest selling price from the product with the lowest selling price in the clothing category? |
works_cycles | select sum(t1.listprice - t1.standardcost) / count(t1.productid) from product as t1 inner join productsubcategory as t2 on t1.productsubcategoryid = t2.productsubcategoryid inner join productcategory as t3 on t2.productcategoryid = t3.productcategoryid where t3.name = 'clothing' | Question: what is the average profit of all the products from the clothing category? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person ->... | what is the average profit of all the products from the clothing category? |
works_cycles | select productid from productcosthistory where startdate like '2013%' order by standardcost limit 1 | Question: which product cost the least in 2013? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, NameSt... | which product cost the least in 2013? |
works_cycles | select productid from product where color = 'yellow' | Question: list all products with the color yellow. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, Nam... | list all products with the color yellow. |
works_cycles | select businessentityid from person where title = 'mr.' and firstname = 'hung-fu' and lastname = 'ting' | Question: what is the bussiness id for mr. hung-fu ting? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonTyp... | what is the bussiness id for mr. hung-fu ting? |
works_cycles | select phonenumber from personphone where businessentityid = 12597 | Question: what is the phone number of the person with id '12597'? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, ... | what is the phone number of the person with id '12597'? |
works_cycles | select listprice from productlistpricehistory where productid = 912 | Question: what is the price for the product with the id '912'? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, Per... | what is the price for the product with the id '912'? |
works_cycles | select case when actualcost = plannedcost then 'no' else 'yes' end from workorderrouting | Question: is there a work order where the planned cost is different from the actual cost? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Pers... | is there a work order where the planned cost is different from the actual cost? |
works_cycles | select t2.thumbnailphotofilename from productproductphoto as t1 inner join productphoto as t2 on t1.productphotoid = t2.productphotoid where t1.productid = 979 | Question: what is the thumbnail photo file for the product with the id '979'? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> Busine... | what is the thumbnail photo file for the product with the id '979'? |
works_cycles | select distinct t2.name from productlistpricehistory as t1 inner join product as t2 on t1.productid = t2.productid where t1.listprice > 1000 | Question: list all the names of the products with the price of more than 1000$. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> Busi... | list all the names of the products with the price of more than 1000$. |
works_cycles | select t1.productid from productlistpricehistory as t1 inner join productcosthistory as t2 on t1.productid = t2.productid order by t1.listprice - t2.standardcost desc limit 1 | Question: what is the product with the most profit? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, Na... | what is the product with the most profit? |
works_cycles | select t2.name from productinventory as t1 inner join product as t2 on t1.productid = t2.productid where t1.locationid = 1 and t1.shelf = 'l' and t1.bin = 6 | Question: what is the name of the product stored in location 1 compartment l container 6? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Pers... | what is the name of the product stored in location 1 compartment l container 6? |
works_cycles | select t2.name from workorderrouting as t1 inner join location as t2 on t1.locationid = t2.locationid where t1.workorderid = 35493 | Question: what are locations of the work order '35493'? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType... | what are locations of the work order '35493'? |
works_cycles | select t2.productid from productphoto as t1 inner join productproductphoto as t2 on t1.productphotoid = t2.productphotoid where t1.largephotofilename like '%large.gif' | Question: what are the products with a large photo? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, Na... | what are the products with a large photo? |
works_cycles | select t2.productid from productsubcategory as t1 inner join product as t2 on t1.productsubcategoryid = t2.productsubcategoryid where t1.name = 'socks' | Question: list all the socks products. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, NameStyle, Titl... | list all the socks products. |
works_cycles | select 100 / t2.listprice from product as t1 inner join productlistpricehistory as t2 on t1.productid = t2.productid where t1.name = 'cable lock' | Question: with 100$, how many cable lock can you buy? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, ... | with 100$, how many cable lock can you buy? |
works_cycles | select t2.name from workorder as t1 inner join scrapreason as t2 on t1.scrapreasonid = t2.scrapreasonid where t1.workorderid = 57788 | Question: what is the scrap reason for work order '57788'? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonT... | what is the scrap reason for work order '57788'? |
works_cycles | select t2.standardcost from product as t1 inner join productcosthistory as t2 on t1.productid = t2.productid where t1.name like '%sport%' | Question: what is the cost for the sports? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, NameStyle, ... | what is the cost for the sports? |
works_cycles | select t2.quantity from location as t1 inner join productinventory as t2 on t1.locationid = t2.locationid where t2.productid = 476 and t1.name = 'metal storage' | Question: how many products with the id '476' are stored in metal storage? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessE... | how many products with the id '476' are stored in metal storage? |
works_cycles | select distinct t2.productid from productcosthistory as t1 inner join product as t2 on t1.productid = t2.productid where t1.standardcost < ( select sum(standardcost) / count(productid) from product ) | Question: list all the products with lower than average cost. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, Pers... | list all the products with lower than average cost. |
works_cycles | select (t1.listprice - t2.standardcost) * 100 / t2.standardcost from productlistpricehistory as t1 inner join productcosthistory as t2 on t1.productid = t2.productid where t1.productid = 858 | Question: what is the the percentage of profit for the product '858'? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntity... | what is the the percentage of profit for the product '858'? |
works_cycles | select count(productid) from productproductphoto where productphotoid != 1 | Question: how many products with a thumpnail photo? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, Na... | how many products with a thumpnail photo? |
works_cycles | select 365 * (strftime('%y', actualenddate) - strftime('%y', actualstartdate)) + 30 * (strftime('%m', actualenddate) - strftime('%m', actualstartdate)) + strftime('%d', actualenddate) - strftime('%d', actualstartdate) from workorderrouting where workorderid = 425 | Question: how many days did it take to end the work order '425'? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, P... | how many days did it take to end the work order '425'? |
works_cycles | select productid from productlistpricehistory where startdate like '2012%' order by listprice desc limit 1 | Question: which product has the highest price in 2012? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType,... | which product has the highest price in 2012? |
works_cycles | select standardcost from productcosthistory where productid = 847 | Question: what is the cost for the product '847'? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, Name... | what is the cost for the product '847'? |
works_cycles | select organizationlevel from employee where jobtitle = 'human resources manager' | Question: what is the organization level for human resources manager? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntity... | what is the organization level for human resources manager? |
works_cycles | select count(workorderid) from workorder where enddate > duedate | Question: how many of the work orders didnt meet the due date? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, Per... | how many of the work orders didnt meet the due date? |
works_cycles | select t2.standardcost, t2.productnumber from productcosthistory as t1 inner join product as t2 on t1.productid = t2.productid where t1.productid = 888 | Question: what is the cost and the product number of product with the id '888'? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> Busi... | what is the cost and the product number of product with the id '888'? |
works_cycles | select count(distinct t2.productid) from productphoto as t1 inner join productproductphoto as t2 on t1.productphotoid = t2.productphotoid where t1.largephotofilename = 'roadster_black_large.gif' | Question: how many products using 'roadster_black_small.gif' as the thumbnail photo? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person ->... | how many products using 'roadster_black_small.gif' as the thumbnail photo? |
works_cycles | select t2.locationid, t2.shelf, t2.bin from product as t1 inner join productinventory as t2 on t1.productid = t2.productid where t1.name like 'lock ring' | Question: list the locations ids, compartments and containers for the lock ring | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> Busi... | list the locations ids, compartments and containers for the lock ring |
works_cycles | select t2.name from productsubcategory as t1 inner join productcategory as t2 on t1.productcategoryid = t2.productcategoryid where t1.name = 'road frames' | Question: what category do road frames fall into? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, Name... | what category do road frames fall into? |
works_cycles | select t2.workorderid from scrapreason as t1 inner join workorder as t2 on t1.scrapreasonid = t2.scrapreasonid where t1.name = 'handling damage' | Question: list all the scraped work orders for handling damage reason. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntit... | list all the scraped work orders for handling damage reason. |
works_cycles | select t1.listprice - t2.standardcost from productlistpricehistory as t1 inner join productcosthistory as t2 on t1.productid = t2.productid where t1.productid = 792 | Question: what is the profit for the product '792'? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, Na... | what is the profit for the product '792'? |
works_cycles | select t2.firstname, t2.lastname from emailaddress as t1 inner join person as t2 on t1.businessentityid = t2.businessentityid where t1.emailaddress = 'regina7@adventure-works.com' | Question: who owns the email address 'regina7@adventure-works.com'? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID... | who owns the email address 'regina7@adventure-works.com'? |
works_cycles | select t2.name from productinventory as t1 inner join location as t2 on t1.locationid = t2.locationid where t1.productid = 810 | Question: where are the locations where the product '810' is stored? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityI... | where are the locations where the product '810' is stored? |
works_cycles | select t2.name from workorder as t1 inner join product as t2 on t1.productid = t2.productid where t1.workorderid = 2540 | Question: what is the name of the product the work order '2540' was making? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> Business... | what is the name of the product the work order '2540' was making? |
works_cycles | select t2.listprice from product as t1 inner join productlistpricehistory as t2 on t1.productid = t2.productid where t1.name = 'awc logo cap' | Question: what is the price for the awc logo cap? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonType, Name... | what is the price for the awc logo cap? |
works_cycles | select t2.workorderid from product as t1 inner join workorder as t2 on t1.productid = t2.productid where t1.name = 'down tube' | Question: list all the work orders that is related to the down tube. | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityI... | list all the work orders that is related to the down tube. |
works_cycles | select avg((t1.listprice - t2.standardcost) * 100 / t2.standardcost) from productlistpricehistory as t1 inner join productcosthistory as t2 on t1.productid = t2.productid | Question: what is the the average percentage of profit for the all the product? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> Busi... | what is the the average percentage of profit for the all the product? |
works_cycles | select 100.0 * sum(case when t1.name = 'subassembly' then 1 else 0 end) / count(t2.workorderid) from location as t1 inner join workorderrouting as t2 on t1.locationid = t2.locationid | Question: what proportion of work order is in subassembly? | Tables: CountryRegion -> CountryRegionCode, Name, ModifiedDate. Culture -> CultureID, Name, ModifiedDate. Currency -> CurrencyCode, Name, ModifiedDate. CountryRegionCurrency -> CountryRegionCode, CurrencyCode, ModifiedDate. Person -> BusinessEntityID, PersonT... | what proportion of work order is in subassembly? |
image_and_language | select count(obj_sample_id) from img_obj where img_id = 1 | Question: how many object samples are there in image no.1? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLASS_ID, PRED_CLASS. IMG_REL -> IMG_I... | how many object samples are there in image no.1? |
image_and_language | select count(t1.img_id) from ( select img_id from img_obj group by img_id having count(obj_sample_id) > 20 ) t1 | Question: how many images have over 20 object samples? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLASS_ID, PRED_CLASS. IMG_REL -> IMG_ID, P... | how many images have over 20 object samples? |
image_and_language | select img_id from img_obj group by img_id order by count(obj_sample_id) desc limit 1 | Question: what is the id of the image with the most number of object samples? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLASS_ID, PRED_CLAS... | what is the id of the image with the most number of object samples? |
image_and_language | select obj_sample_id from img_obj where img_id = 1 and obj_class_id = 297 | Question: please list the ids of the object samples in class no. 297 in image no.1. | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLASS_ID, PRE... | please list the ids of the object samples in class no. 297 in image no.1. |
image_and_language | select sum(case when img_id = 5 then 1 else 0 end) from img_rel where obj1_sample_id = obj2_sample_id | Question: how many self-relations are there between the object samples in image no.5? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLASS_ID, P... | how many self-relations are there between the object samples in image no.5? |
image_and_language | select t2.x, t2.y, t2.w, t2.h from img_rel as t1 inner join img_obj as t2 on t1.img_id = t2.img_id where t1.img_id = 5 and t1.obj1_sample_id = t1.obj2_sample_id | Question: what is the bounding box of the object sample in image no.5 that has a self-relation? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_C... | what is the bounding box of the object sample in image no.5 that has a self-relation? |
image_and_language | select sum(case when t1.obj_class = 'man' then 1 else 0 end) from obj_classes as t1 inner join img_obj as t2 on t1.obj_class_id = t2.obj_class_id where t2.img_id = 1 | Question: how many object samples in image no.1 are in the class of 'man'? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLASS_ID, PRED_CLASS. ... | how many object samples in image no.1 are in the class of 'man'? |
image_and_language | select count(t.img_id) from ( select t2.img_id from obj_classes as t1 inner join img_obj as t2 on t1.obj_class_id = t2.obj_class_id where t1.obj_class = 'man' group by t2.img_id ) t | Question: how many images have at least one object sample in the class of 'man'? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLASS_ID, PRED_C... | how many images have at least one object sample in the class of 'man'? |
image_and_language | select t1.obj_class from obj_classes as t1 inner join img_obj as t2 on t1.obj_class_id = t2.obj_class_id where t2.img_id = 1 group by t1.obj_class | Question: please list the classes of all the object samples in image no.1. | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLASS_ID, PRED_CLASS. ... | please list the classes of all the object samples in image no.1. |
image_and_language | select t1.pred_class from pred_classes as t1 inner join img_rel as t2 on t1.pred_class_id = t2.pred_class_id where t2.img_id = 1 and t2.obj1_sample_id = 8 and t2.obj2_sample_id = 4 | Question: what is the relation between object sample no.8 and object sample no.4 in image no.1? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_C... | what is the relation between object sample no.8 and object sample no.4 in image no.1? |
image_and_language | select sum(case when t1.pred_class = 'parked on' then 1 else 0 end) from pred_classes as t1 inner join img_rel as t2 on t1.pred_class_id = t2.pred_class_id where t2.img_id = 1 and t2.obj1_sample_id != obj2_sample_id | Question: how many pairs of object samples in image no.1 have the relation of 'parked on'? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLASS_... | how many pairs of object samples in image no.1 have the relation of 'parked on'? |
image_and_language | select t1.pred_class from pred_classes as t1 inner join img_rel as t2 on t1.pred_class_id = t2.pred_class_id where t2.obj1_sample_id = 14 and t2.obj2_sample_id = 14 | Question: please list all the predicted relation classes of object sample no.14 in image no.1. | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CL... | please list all the predicted relation classes of object sample no.14 in image no.1. |
image_and_language | select sum(case when t1.pred_class = 'parked on' then 1 else 0 end) from pred_classes as t1 inner join img_rel as t2 on t1.pred_class_id = t2.pred_class_id where t2.obj1_sample_id != t2.obj2_sample_id | Question: how many images have at least one pair of object samples with the relation 'parked on'? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED... | how many images have at least one pair of object samples with the relation 'parked on'? |
image_and_language | select t2.img_id from pred_classes as t1 inner join img_rel as t2 on t1.pred_class_id = t2.pred_class_id where t1.pred_class = 'parked on' and t2.obj1_sample_id != t2.obj2_sample_id group by t2.img_id having count(t2.img_id) > 2 | Question: please list the ids of all the images with more than 2 pairs of object samples with the relation 'parked on'. | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID... | please list the ids of all the images with more than 2 pairs of object samples with the relation 'parked on'. |
image_and_language | select t1.pred_class from pred_classes as t1 inner join img_rel as t2 on t1.pred_class_id = t2.pred_class_id where t2.img_id = 5 and t2.obj1_sample_id = t2.obj2_sample_id | Question: to which predicted relation class does the self-relation of the object sample in image no.5 belong? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLA... | to which predicted relation class does the self-relation of the object sample in image no.5 belong? |
image_and_language | select t3.x, t3.y, t3.w, t3.h from pred_classes as t1 inner join img_rel as t2 on t1.pred_class_id = t2.pred_class_id inner join img_obj as t3 on t2.obj1_sample_id = t3.obj_class_id where t2.img_id = 1 and t1.pred_class = 'by' | Question: what are the bounding boxes of the object samples with a predicted relation class of 'by' in image no.1? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRE... | what are the bounding boxes of the object samples with a predicted relation class of 'by' in image no.1? |
image_and_language | select cast(sum(t3.y) as real) / count(case when t1.pred_class = 'parked on' then 1 else null end) from pred_classes as t1 inner join img_rel as t2 on t1.pred_class_id = t2.pred_class_id inner join img_obj as t3 on t2.obj1_sample_id = t3.obj_class_id where t2.img_id = 1 and t2.obj1_sample_id != t2.obj2_sample_id | Question: what is the average difference in the y coordinate of 2 object samples with the relation 'parked on' in image no.1? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAM... | what is the average difference in the y coordinate of 2 object samples with the relation 'parked on' in image no.1? |
image_and_language | select cast(count(case when t1.obj_class = 'man' then 1 else null end) as real) * 100 / count(t1.obj_class_id) from obj_classes as t1 inner join img_obj as t2 on t1.obj_class_id = t2.obj_class_id where t2.img_id = 1 | Question: what is the percentage of the object samples in the class of 'man' in image no.1? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLASS... | what is the percentage of the object samples in the class of 'man' in image no.1? |
image_and_language | select count(att_class_id) from att_classes | Question: state the total number of the attribute classes. | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLASS_ID, PRED_CLASS. IMG_REL -> IMG_I... | state the total number of the attribute classes. |
image_and_language | select count(obj_class_id) from obj_classes | Question: how many object classes are there in the database? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLASS_ID, PRED_CLASS. IMG_REL -> IMG... | how many object classes are there in the database? |
image_and_language | select count(pred_class_id) from pred_classes | Question: provide the number of predicted classes. | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLASS_ID, PRED_CLASS. IMG_REL -> IMG_ID, PRED_... | provide the number of predicted classes. |
image_and_language | select t2.x, t2.y, t2.w, t2.h from obj_classes as t1 inner join img_obj as t2 on t1.obj_class_id = t2.obj_class_id where t2.img_id = 2324765 and t1.obj_class = 'kite' | Question: give the bounding box of the kite in image no.2324765. | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLASS_ID, PRED_CLASS. IMG_REL ->... | give the bounding box of the kite in image no.2324765. |
image_and_language | select sum(case when t2.att_class = 'white' then 1 else 0 end) from img_obj_att as t1 inner join att_classes as t2 on t1.att_class_id = t2.att_class_id where t1.img_id = 2347915 | Question: how many white objects are there in image no.2347915? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLASS_ID, PRED_CLASS. IMG_REL -> ... | how many white objects are there in image no.2347915? |
image_and_language | select sum(case when t2.att_class = 'white' then 1 else 0 end) from img_obj_att as t1 inner join att_classes as t2 on t1.att_class_id = t2.att_class_id where t1.img_id = 2347915 | Question: give the number of samples in image no.2377985 whose attribute is electrical. | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLASS_ID,... | give the number of samples in image no.2377985 whose attribute is electrical. |
image_and_language | select t1.pred_class from pred_classes as t1 inner join img_rel as t2 on t1.pred_class_id = t2.pred_class_id where t2.img_id = 2345511 and t2.obj1_sample_id = 12 and t2.obj2_sample_id = 8 | Question: what is the relationship between object sample no.12 and no.8 of image no.2345511? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLAS... | what is the relationship between object sample no.12 and no.8 of image no.2345511? |
image_and_language | select t2.obj1_sample_id from pred_classes as t1 inner join img_rel as t2 on t1.pred_class_id = t2.pred_class_id where t2.img_id = 2345524 and t1.pred_class = 'lying on' and t2.obj2_sample_id = 1 | Question: give the object number of the sample which has the relationship of 'lying on' with object sample no.1 from image no.2345524. | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID... | give the object number of the sample which has the relationship of 'lying on' with object sample no.1 from image no.2345524. |
image_and_language | select count(t2.obj_sample_id) from obj_classes as t1 inner join img_obj as t2 on t1.obj_class_id = t2.obj_class_id where t2.img_id = 6 and t1.obj_class = 'food' | Question: how many samples of food object are there in image no.6? | Tables: ATT_CLASSES -> ATT_CLASS_ID, ATT_CLASS. OBJ_CLASSES -> OBJ_CLASS_ID, OBJ_CLASS. IMG_OBJ -> IMG_ID, OBJ_SAMPLE_ID, OBJ_CLASS_ID, X, Y, W, H. IMG_OBJ_ATT -> IMG_ID, ATT_CLASS_ID, OBJ_SAMPLE_ID. PRED_CLASSES -> PRED_CLASS_ID, PRED_CLASS. IMG_REL ... | how many samples of food object are there in image no.6? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.