interaction_utterance
sequencelengths 0
6
| interaction_query
sequencelengths 0
6
| final_utterance
stringlengths 19
224
| final_query
stringlengths 22
577
| db_id
stringclasses 140
values |
---|---|---|---|---|
[
"What are the names of colleges that have students who made the team?",
"How many students are enrolled in each of them?",
"Also, what are the different states in which those colleges reside?"
] | [
"SELECT T1.cName FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'",
"SELECT T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'",
"SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'"
] | How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges? | SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes' | soccer_2 |
[
"What are the names of colleges with less than 13,000 students?",
"Which of those are in AZ?",
"Combine that with colleges in LA that have more than 15,000 students?"
] | [
"SELECT cName FROM College WHERE enr < 13000",
"SELECT cName FROM College WHERE enr < 13000 AND state = \"AZ\"",
"SELECT cName FROM College WHERE enr < 13000 AND state = \"AZ\" UNION SELECT cName FROM College WHERE enr > 15000 AND state = \"LA\""
] | What are the names of colleges in LA that have more than 15,000 students and of colleges in AZ with less than 13,000 students? | SELECT cName FROM College WHERE enr < 13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr > 15000 AND state = "LA" | soccer_2 |
[
"What are the names of colleges that have students who tried out for the goalie?",
"Of those, which also have students who tried out for the position of mid-field?"
] | [
"SELECT cName FROM tryout WHERE pPos = 'goalie'",
"SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'"
] | What are the names of all schools that have students trying out for the position of goal and 'mid'-field. | SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid' | soccer_2 |
[
"What are the names of colleges that have students who tried out for the goalie?",
"What states are they located in?",
"Of those states, which also have colleges where students tried out for mid-field?"
] | [
"SELECT T1.cName FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie'",
"SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie'",
"SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid'"
] | What are the names of the states that have some college students playing in the positions of goalie and mid-field? | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' | soccer_2 |
[
"What are the names of colleges where students tried for the goalie position?",
"Of those, which also had students that tried out for the mid position?",
"How many of them are there?"
] | [
"SELECT cName FROM tryout WHERE pPos = 'goalie'",
"SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'",
"SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid')"
] | How many schools have students playing in goalie and mid-field positions? | SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid') | soccer_2 |
[
"What schools have players that tried out for goalies?",
"What schools have players that tried out for the mid position?",
"What are the names of schools that fit into the latter category but not the former?"
] | [
"SELECT cName FROM tryout WHERE pPos = 'goalie'",
"SELECT cName FROM tryout WHERE pPos = 'mid'",
"SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'"
] | What are the names of the schools with some players in the mid position but no goalies? | SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie' | soccer_2 |
[
"What schools have players that tried out for goalies?",
"What schools have players that tried out for the mid position?",
"In which states are the schools that fit into the latter category but not the former?"
] | [
"SELECT cName FROM tryout WHERE pPos = 'goalie'",
"SELECT cName FROM tryout WHERE pPos = 'mid'",
"SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie'"
] | What are the names of all the states with college students playing in the mid position but no goalies? | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' | soccer_2 |
[
"What schools have players that tried out for the mid position but not as goalies?",
"In which states do those schools reside?",
"How many of them exist?"
] | [
"SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'",
"SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie'",
"SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')"
] | What is the count of states with college students playing in the mid position but not as goalies? | SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie') | soccer_2 |
[
"What information is there on colleges in Florida?",
"What is their maximum enrollment size?",
"What is the name of every college that is larger than that?"
] | [
"SELECT * FROM college WHERE state = 'FL'",
"SELECT max(enr) FROM college WHERE state = 'FL'",
"SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL')"
] | What are the names of all colleges with a larger enrollment than the largest college in Florida? | SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL') | soccer_2 |
[
"What are the names of all colleges with students who tried out for the position of goalie?",
"What is the number of people enrolled in all the other colleges?",
"How many is that in total?"
] | [
"SELECT cName FROM tryout WHERE pPos = \"goalie\"",
"SELECT cNAME , enr FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = \"goalie\")",
"SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = \"goalie\")"
] | What is the total number of students enrolled in schools without any goalies? | SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = "goalie") | soccer_2 |
[
"What is the average number of students enrolled per college?",
"What are the states that have larger colleges than that?",
"How many of them are there?"
] | [
"SELECT avg(enr) FROM college",
"SELECT DISTINCT state FROM college WHERE enr > (SELECT avg(enr) FROM college)",
"SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college)"
] | How many states have a college with more students than average? | SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college) | soccer_2 |
[
"What is the average number of students per college?",
"What states have colleges that are smaller than that?",
"How many of them are there?"
] | [
"SELECT avg(enr) FROM college",
"SELECT DISTINCT state FROM college WHERE enr < (SELECT avg(enr) FROM college)",
"SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college)"
] | How many states have smaller colleges than average? | SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college) | soccer_2 |
[
"show the name and hours for each project.",
"how many projects are there?",
"what is the average number of hours spent on each project?",
"Find the name of project with the longest duration."
] | [
"SELECT name, hours FROM projects",
"SELECT count(*) FROM projects",
"SELECT avg(hours) FROM projects",
"SELECT name FROM projects ORDER BY hours DESC LIMIT 1"
] | Find the name of project that continues for the longest time. | SELECT name FROM projects ORDER BY hours DESC LIMIT 1 | scientist_1 |
[
"what is average duration of all projects?",
"what about the maximum and minimum duration?",
"how many projects have operated longer than the average duration?",
"what are their names?"
] | [
"SELECT avg(hours) FROM projects",
"SELECT max(hours), min(hours) FROM projects",
"SELECT count(*) FROM projects WHERE hours > (SELECT avg(hours) FROM projects)",
"SELECT name FROM projects WHERE hours > (SELECT avg(hours) FROM projects)"
] | List the name of all projects that are operated longer than the average working hours of all projects. | SELECT name FROM projects WHERE hours > (SELECT avg(hours) FROM projects) | scientist_1 |
[
"find the names of all projects.",
"how many scientists were assigned to each of them?",
"which one has the most scientists?",
"show how much time has already been spent on it as well."
] | [
"SELECT name FROM projects",
"SELECT T1.name , count(*) FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project",
"SELECT T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project ORDER BY count(*) DESC LIMIT 1",
"SELECT T1.name , T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project ORDER BY count(*) DESC LIMIT 1"
] | Find the name and hours of project that has the most number of scientists. | SELECT T1.name , T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project ORDER BY count(*) DESC LIMIT 1 | scientist_1 |
[
"show info of all scientists.",
"find those scientists whose name contains ‘Smith’.",
"Find the names of the projects that they are assigned to."
] | [
"SELECT * FROM scientists",
"SELECT * FROM scientists WHERE name LIKE '%Smith%'",
"SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name LIKE '%Smith%'"
] | Find the name of the project for which a scientist whose name contains ‘Smith’ is assigned to. | SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name LIKE '%Smith%' | scientist_1 |
[
"show the names of all scientists.",
"find the ssn of scientists named Michael Rogers and Carol Smith.",
"what are the names of projects that they are assigned to?",
"how many hours in total have been spent on these projects?"
] | [
"SELECT name FROM scientists",
"SELECT ssn FROM scientists WHERE name = 'Michael Rogers' OR name = 'Carol Smith'",
"SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith'",
"SELECT sum(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith'"
] | Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to. | SELECT sum(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith' | scientist_1 |
[
"what is the number of hours spent on the project named 'Matter of Time’?",
"Find the names of the scientists who worked on this project.",
"which of those scientists were also involved in the project named 'A Puzzling Parallax'?"
] | [
"SELECT hours FROM projects WHERE name = 'A Matter of Time'",
"SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Matter of Time'",
"SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Puzzling Parallax'"
] | Find the name of the scientist who worked on both a project named 'A Matter of Time' and a project named 'A Puzzling Parallax'. | SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Puzzling Parallax' | scientist_1 |
[
"how many scientists are in the table?",
"how many projects are there?",
"list all of the project names.",
"Find the number of scientists involved in each of them."
] | [
"SELECT count(*) FROM scientists",
"SELECT count(*) FROM projects",
"SELECT name FROM projects",
"SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name"
] | Find the number of scientists involved for each project name. | SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name | scientist_1 |
[
"how many scientists are in the table?",
"how many of them are assigned to a project?",
"among them, how many are involved for the projects that require less than 1000 hours. List project names.",
"how about for the projects that require more than 300 hours?"
] | [
"SELECT count(*) FROM scientists",
"SELECT count(distinct Scientist) FROM assignedto",
"SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours < 1000 GROUP BY T1.name",
"SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours > 300 GROUP BY T1.name"
] | Find the number of scientists involved for the projects that require more than 300 hours. | SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours > 300 GROUP BY T1.name | scientist_1 |
[
"find the names of scientists who are assigned to any projects.",
"Find the number of projects each of those scientists is working on."
] | [
"SELECT T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist",
"SELECT count(*), T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name"
] | Find the number of projects which each scientist is working on and scientist's name. | SELECT count(*), T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name | scientist_1 |
[
"find the hours spent on the project that has continued for the longest time.",
"what is the name of this project?",
"Find the SSN and name of scientists who are assigned to it."
] | [
"SELECT max(hours) FROM projects",
"SELECT name FROM projects ORDER BY hours DESC LIMIT 1",
"SELECT T3.ssn , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)"
] | Find the SSN and name of scientists who are assigned to the project with the longest hours. | SELECT T3.ssn , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects) | scientist_1 |
[
"how many projects are there?",
"among them, how many are not assigned yet?",
"what are the names of these projects?"
] | [
"SELECT count(*) FROM Projects",
"SELECT count(*) FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo)",
"SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo)"
] | Select the project names which are not assigned yet. | SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo) | scientist_1 |
[
"list the name of all scientists.",
"which of them are assigned to any project? List their names",
"how many of those scientists are there?",
"Find the names of those who are not assigned to a project yet."
] | [
"SELECT Name FROM scientists",
"SELECT Name FROM scientists WHERE ssn IN (SELECT scientist FROM AssignedTo)",
"SELECT count(*) FROM scientists WHERE ssn IN (SELECT scientist FROM AssignedTo)",
"SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)"
] | Find the name of scientists who are not assigned to any project. | SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo) | scientist_1 |
[
"find the names of scientists who are assigned to any project.",
"how about those who are not involved in any project?",
"count the number of those scientists."
] | [
"SELECT Name FROM scientists WHERE ssn IN (SELECT scientist FROM AssignedTo)",
"SELECT name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)",
"SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)"
] | Find the number of scientists who are not assigned to any project. | SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo) | scientist_1 |
[
"find the name of the project that has taken the most time.",
"how may hours have been spent on it?",
"how many scientists are working on the project?",
"what are their names?",
"how about those who are not involved in it? List their names."
] | [
"SELECT name FROM projects ORDER BY hours DESC LIMIT 1",
"SELECT hours FROM projects ORDER BY hours DESC LIMIT 1",
"SELECT count(*) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)",
"SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)",
"SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)"
] | Find the names of scientists who are not working on the project with the highest hours. | SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects) | scientist_1 |
[
"List all the scientists' names and their projects' names",
"show the hours worked by them on each project.",
"list the results in alphabetical order of project name, and then scientist name."
] | [
"SELECT T1.Name , T3.Name FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code",
"SELECT T1.Name , T3.Name , T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code",
"SELECT T1.Name , T3.Name , T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name, T1.Name"
] | List all the scientists' names, their projects' names, and the hours worked by that scientist on each project, in alphabetical order of project name, and then scientist name. | SELECT T1.Name , T3.Name , T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name, T1.Name | scientist_1 |
[
"What categories of products are there?",
"Show their typical buying and selling price as well.",
"Show only for products with category \"Herbs\".",
"Of these, just give the name and product description.",
"Give the color descriptions as well."
] | [
"SELECT product_category_code FROM products",
"SELECT product_category_code, typical_buying_price, typical_selling_price FROM products",
"SELECT product_category_code, typical_buying_price, typical_selling_price FROM products WHERE product_category_code = \"Herbs\"",
"SELECT product_name, product_description FROM products WHERE product_category_code = \"Herbs\"",
"SELECT T1.product_name , T2.color_description , T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = \"Herbs\""
] | List the names, color descriptions and product descriptions of products with category "Herbs". | SELECT T1.product_name , T2.color_description , T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = "Herbs" | products_gen_characteristics |
[
"Which products have category \"Herbs\"",
"How about category \"Spices\" instead",
"How many are these?",
"Restrict the count of those to the ones typically bought below 100.",
"Restrict to the ones typically sold above 1000 instead."
] | [
"SELECT * FROM products WHERE product_category_code = \"Herbs\"",
"SELECT * FROM products WHERE product_category_code = \"Spices\"",
"SELECT count(*) FROM products WHERE product_category_code = \"Spices\"",
"SELECT count(*) FROM products WHERE product_category_code = \"Spices\" AND typical_buying_price < 100",
"SELECT count(*) FROM products WHERE product_category_code = \"Spices\" AND typical_selling_price > 1000"
] | Find the number of products with category "Spices" and typically sold above 1000. | SELECT count(*) FROM products WHERE product_category_code = "Spices" AND typical_selling_price > 1000 | products_gen_characteristics |
[
"What are the product descriptions?",
"What are the names of products with product description \"eius\"",
"How about those with color description \"yellow\""
] | [
"SELECT product_description FROM products",
"SELECT product_name FROM products WHERE product_description = \"eius\"",
"SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow'"
] | What is the name of the product with the color description 'yellow'? | SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow' | products_gen_characteristics |
[
"Which color descriptions contain the letter 't'?",
"Give for product descriptions instead?",
"What are the units of measure for these products?",
"Give their category descriptions instead."
] | [
"SELECT color_description FROM ref_colors WHERE color_description LIKE '%t%'",
"SELECT product_description FROM products WHERE product_description LIKE '%t%'",
"SELECT T1.unit_of_measure FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%'",
"SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%'"
] | Find the category descriptions of the products whose descriptions include letter 't'. | SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%' | products_gen_characteristics |
[
"What are the typical buying prices of the products?",
"Give this for the product with name \"cumin\"",
"How about for the name \"catnip\" instead?",
"Give the color description instead."
] | [
"SELECT typical_buying_price FROM products",
"SELECT typical_buying_price FROM products WHERE product_name = \"basil\"",
"SELECT typical_buying_price FROM products WHERE product_name = \"catnip\"",
"SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = \"catnip\""
] | What is the color description of the product with name "catnip"? | SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "catnip" | products_gen_characteristics |
[
"What are the product descriptions?",
"For the one with the name \"chervil\"?",
"Give the color description instead.",
"Show the color code as well."
] | [
"SELECT product_description FROM products",
"SELECT product_description FROM products WHERE product_name = \"chervil\"",
"SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = \"chervil\"",
"SELECT t1.color_code , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = \"chervil\""
] | What is the color code and description of the product named "chervil"? | SELECT t1.color_code , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "chervil" | products_gen_characteristics |
[
"What are the product characteristic?",
"What are the names of the products that have only one product characteristic?",
"Give their color descriptions and their product id instead.",
"How about for those that have least 2 product characteristics."
] | [
"SELECT * FROM product_characteristics",
"SELECT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id HAVING count(*) = 1",
"SELECT t1.product_id , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_id HAVING count(*) = 1",
"SELECT t1.product_id , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_id HAVING count(*) >= 2"
] | Find the id and color description of the products with at least 2 characteristics. | SELECT t1.product_id , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_id HAVING count(*) >= 2 | products_gen_characteristics |
[
"What are the color descriptions?",
"Show the corresponding product names.",
"Filter for only the ones with color \"black\"",
"Now for color \"white\" instead.",
"Show only the product names instead."
] | [
"SELECT color_description FROM ref_colors",
"SELECT t1.product_name, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code",
"SELECT t1.product_name, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"black\"",
"SELECT t1.product_name, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"white\"",
"SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"white\""
] | List all the product names with the color description "white". | SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = "white" | products_gen_characteristics |
[
"What are the names of products and their corresponding colors?",
"Filter to show only the ones with \"green\" color.",
"Show the ones that have \"yellow\" color instead.",
"Instead of showing the color description, show their typical buying and selling prices."
] | [
"SELECT t1.product_name, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code",
"SELECT t1.product_name, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"green\"",
"SELECT t1.product_name, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"yellow\"",
"SELECT t1.product_name , t1.typical_buying_price , t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"yellow\""
] | What are the name and typical buying and selling prices of the products that have color described as "yellow"? | SELECT t1.product_name , t1.typical_buying_price , t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = "yellow" | products_gen_characteristics |
[
"What is the selling price of the product named \"sesame\"?",
"What is its color?",
"What are its product characteristic values?",
"Count how many there are."
] | [
"SELECT typical_selling_price FROM products WHERE product_name = \"sesame\"",
"SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = \"sesame\"",
"SELECT t2.product_characteristic_value FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = \"sesame\"",
"SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = \"sesame\""
] | How many characteristics does the product named "sesame" have? | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = "sesame" | products_gen_characteristics |
[
"What is the buying price of the product named \"cumin\"?",
"What are its product characteristic values?",
"Show its characteristic names.",
"Count how many distinct ones there are."
] | [
"SELECT typical_buying_price FROM products WHERE product_name = \"cumin\"",
"SELECT t2.product_characteristic_value FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = \"cumin\"",
"SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"cumin\"",
"SELECT count(DISTINCT t3.characteristic_name) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"cumin\""
] | How many distinct characteristic names does the product "cumin" have? | SELECT count(DISTINCT t3.characteristic_name) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "cumin" | products_gen_characteristics |
[
"What is the product category code for the product named \"ginger\"?",
"Show the product characteristic value instead.",
"How about the one with product named \"sesame\"",
"Give its characteristic names."
] | [
"SELECT product_category_code FROM products WHERE product_name = \"ginger\"",
"SELECT t2.product_characteristic_value FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = \"ginger\"",
"SELECT t2.product_characteristic_value FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = \"sesame\"",
"SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"sesame\""
] | What are all the characteristic names of product "sesame"? | SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "sesame" | products_gen_characteristics |
[
"What is the product description of the product named \"catnip\"?",
"Show the product characteristic value instead.",
"Now show its characteristic data type.",
"Show this for the product name \"cumin\" instead.",
"Give the characteristic name as well."
] | [
"SELECT product_description FROM products WHERE product_name = \"catnip\"",
"SELECT t2.product_characteristic_value FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = \"catnip\"",
"SELECT t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"catnip\"",
"SELECT t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"cumin\"",
"SELECT t3.characteristic_name , t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"cumin\""
] | List all the characteristic names and data types of product "cumin". | SELECT t3.characteristic_name , t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "cumin" | products_gen_characteristics |
[
"What are the selling prices of the products?",
"What about for those that have product characteristic value \"high\"?",
"What about for those that have characteristic type code \"Grade\"?",
"Of those, filter down to those that are product name \"sesame\" as well.",
"Give the characteristic names instead."
] | [
"SELECT typical_selling_price FROM products",
"SELECT t1.typical_selling_price FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t2.product_characteristic_value = \"high\"",
"SELECT t1.typical_selling_price FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_type_code = \"Grade\"",
"SELECT t1.typical_selling_price FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"sesame\" AND t3.characteristic_type_code = \"Grade\"",
"SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"sesame\" AND t3.characteristic_type_code = \"Grade\""
] | List all characteristics of product named "sesame" with type code "Grade". | SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "sesame" AND t3.characteristic_type_code = "Grade" | products_gen_characteristics |
[
"What are the product characteristic values of the product named \"laurel\"?",
"Give the characteristic name instead.",
"How many are there?"
] | [
"SELECT t2.product_characteristic_value FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = \"laurel\"",
"SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"laurel\"",
"SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"laurel\""
] | How many characteristics does the product named "laurel" have? | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "laurel" | products_gen_characteristics |
[
"What is the typical selling price of the product \"catnip\"?",
"What about the product \"flax\"?",
"What are its characteristics?",
"How many are there?"
] | [
"SELECT typical_selling_price FROM products WHERE product_name = \"catnip\"",
"SELECT typical_selling_price FROM products WHERE product_name = \"flax\"",
"SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"flax\"",
"SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"flax\""
] | Find the number of characteristics that the product "flax" has. | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "flax" | products_gen_characteristics |
[
"What is the name of products with selling price > 1000",
"What about for products with characteristic name \"slow\"",
"For characteristic name \"fast\" instead?",
"Show the ones that also have color description red."
] | [
"SELECT product_name FROM products WHERE typical_selling_price > 1000",
"SELECT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = \"slow\"",
"SELECT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = \"fast\"",
"SELECT product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = \"red\" AND t3.characteristic_name = \"fast\""
] | Find the name of the products that have the color description "red" and have the characteristic name "fast". | SELECT product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "red" AND t3.characteristic_name = "fast" | products_gen_characteristics |
[
"What are the names of the products with color \"red\"?",
"How many are there?",
"What about for those with characteristic named \"hot\" instead?"
] | [
"SELECT product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"red\"",
"SELECT count(*) FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"red\"",
"SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = \"hot\""
] | How many products have the characteristic named "hot"? | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = "hot" | products_gen_characteristics |
[
"What are the names of the products that have buying price < 100",
"Show their distinct names.",
"What about for those with color \"black\"?",
"For the characteristic name \"warm\" instead?"
] | [
"SELECT product_name FROM products WHERE typical_buying_price < 100",
"SELECT DISTINCT product_name FROM products WHERE typical_buying_price < 100",
"SELECT DISTINCT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"red\"",
"SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = \"warm\""
] | List the all the distinct names of the products with the characteristic name 'warm'. | SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = "warm" | products_gen_characteristics |
[
"What are the buying prices of the products with selling price < 500?",
"Show their names instead.",
"Of those, narrow down to ones with color \"red\" as well.",
"Remove the restriction of selling price.",
"How many are there?",
"Restrict also to those with characteristic named \"slow\" as well."
] | [
"SELECT typical_buying_price FROM products WHERE typical_selling_price < 500",
"SELECT product_name FROM products WHERE typical_selling_price < 500",
"SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.typical_selling_price < 500 AND t2.color_description = \"red\"",
"SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"red\"",
"SELECT count(*) FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"red\"",
"SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = \"red\" AND t3.characteristic_name = \"slow\""
] | Find the number of the products that have their color described as "red" and have a characteristic named "slow". | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "red" AND t3.characteristic_name = "slow" | products_gen_characteristics |
[
"Show the names of products that have buying price > 100",
"How many are there?",
"What about for those with color description \"red\"?",
"Show the ones with color description \"white\" instead.",
"They can also be having the characteristic name \"hot\"."
] | [
"SELECT product_name FROM products WHERE typical_buying_price > 100",
"SELECT count(*) FROM products WHERE typical_buying_price > 100",
"SELECT count(*) FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"red\"",
"SELECT count(*) FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"white\"",
"SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = \"white\" OR t3.characteristic_name = \"hot\""
] | Count the products that have the color description "white" or have the characteristic name "hot". | SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "white" OR t3.characteristic_name = "hot" | products_gen_characteristics |
[
"What is the typical selling price of the product named \"catnip\"?",
"Show its color description instead.",
"Give its unit of measurement instead."
] | [
"SELECT typical_selling_price FROM products WHERE product_name = \"catnip\"",
"SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = \"catnip\"",
"SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = \"cumin\""
] | What is the unit of measurement of product named "cumin"? | SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = "cumin" | products_gen_characteristics |
[
"What is the color of the product named \"ginger\"?",
"Show its unit of measurement instead.",
"Give the product category code as well.",
"Do this for the product named \"chervil\" instead."
] | [
"SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = \"ginger\"",
"SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = \"ginger\"",
"SELECT t2.unit_of_measure , t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = \"ginger\"",
"SELECT t2.unit_of_measure , t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = \"chervil\""
] | Find the unit of measurement and product category code of product named "chervil". | SELECT t2.unit_of_measure , t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = "chervil" | products_gen_characteristics |
[
"What are the product names that are not product category code \"Herbs\"?",
"Show the same, but for those with unit of measurement \"Handful\" instead.",
"What about the opposite condition?",
"Of these, show for the ones that are colored \"white\" too."
] | [
"SELECT product_name FROM products WHERE product_category_code != \"Herbs\"",
"SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t2.unit_of_measure = \"Handul\"",
"SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t2.unit_of_measure != \"Handul\"",
"SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = \"white\" AND t2.unit_of_measure != \"Handful\""
] | Find the product names that are colored 'white' but do not have unit of measurement "Handful". | SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = "white" AND t2.unit_of_measure != "Handful" | products_gen_characteristics |
[
"What are the product names in decreasing order of typical selling price?",
"Order by decreasing order of color frequency instead.",
"Show their respective color descriptions.",
"Show only for the most frequent color description."
] | [
"SELECT product_name FROM products ORDER BY typical_selling_price DESC",
"SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC",
"SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC",
"SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC LIMIT 1"
] | What is the description of the color for most products? | SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC LIMIT 1 | products_gen_characteristics |
[
"What is the most frequent product category code of the products?",
"What about the color description instead?",
"Give the least frequent now."
] | [
"SELECT product_category_code FROM products GROUP BY product_category_code ORDER BY count(*) DESC LIMIT 1",
"SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC LIMIT 1",
"SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) ASC LIMIT 1"
] | What is the description of the color used by least products? | SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) ASC LIMIT 1 | products_gen_characteristics |
[
"What are the product category codes used of the products?",
"What is the ones used most frequently?",
"What about for the characteristic name instead?"
] | [
"SELECT product_category_code FROM products",
"SELECT product_category_code FROM products GROUP BY product_category_code ORDER BY count(*) DESC LIMIT 1",
"SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY count(*) DESC LIMIT 1"
] | What is the characteristic name used by most number of the products? | SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY count(*) DESC LIMIT 1 | products_gen_characteristics |
[
"What are the names, details and data types of the characteristics?",
"Show these for the ones used in products.",
"Show the ones that are not used."
] | [
"SELECT characteristic_name , other_characteristic_details , characteristic_data_type FROM characteristics",
"SELECT characteristic_name , other_characteristic_details , characteristic_data_type FROM characteristics AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_id",
"SELECT characteristic_name , other_characteristic_details , characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name , t1.other_characteristic_details , t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_id"
] | What are the names, details and data types of the characteristics which are never used by any product? | SELECT characteristic_name , other_characteristic_details , characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name , t1.other_characteristic_details , t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_id | products_gen_characteristics |
[
"What are the color descriptions?",
"Which ones are used only once across all the products?",
"How about for the characteristic names?",
"Show the ones that are used at least twice."
] | [
"SELECT color_description FROM ref_colors",
"SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description HAVING count(*) = 1",
"SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name HAVING count(*) = 1",
"SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name HAVING count(*) >= 2"
] | What are characteristic names used at least twice across all products? | SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name HAVING count(*) >= 2 | products_gen_characteristics |
[
"List all channel names.",
"Order them by rating ratio from highest to lowest.",
"Which one has the highest rating?",
"Who is the owner?"
] | [
"SELECT name FROM channel",
"SELECT name FROM channel ORDER BY rating_in_percent DESC",
"SELECT name FROM channel ORDER BY rating_in_percent DESC LIMIT 1",
"SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1"
] | What is the owner of the channel that has the highest rating ratio? | SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1 | program_share |
[
"What are the program names?",
"Order by launch date from most recent to least recent.",
"Which one was launched most recently?"
] | [
"SELECT name FROM program",
"SELECT name FROM program ORDER BY launch DESC",
"SELECT name FROM program ORDER BY launch DESC LIMIT 1"
] | find the name of the program that was launched most recently. | SELECT name FROM program ORDER BY launch DESC LIMIT 1 | program_share |
[
"List all channel names.",
"When are they broadcasted?",
"Which ones are broadcasted in the morning?"
] | [
"SELECT name FROM channel",
"SELECT t1.name, t2.time_of_day FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id",
"SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'"
] | Find the names of the channels that are broadcast in the morning. | SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' | program_share |
[
"Please list the names of all channels.",
"Include the time of day that they are broadcasted.",
"Which ones broadcast in the morning?",
"Out of those channels, which ones also broadcast at night?"
] | [
"SELECT name FROM channel",
"SELECT t1.name, t2.time_of_day FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id",
"SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'",
"SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night'"
] | what are the names of the channels that broadcast in both morning and night? | SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night' | program_share |
[
"What are the names of all programs?",
"When are they broadcasted?",
"Which ones are broadcasted in the morning?",
"What about the ones that are not broadcasted in the morning?"
] | [
"SELECT name FROM program",
"SELECT t1.name, t2.time_of_day FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id",
"SELECT t1.name, t2.time_of_day FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Morning\"",
"SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Morning\""
] | Find the names of programs that are never broadcasted in the morning. | SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = "Morning" | program_share |
[
"List the names of all programs.",
"Include their broadcast times.",
"Which ones are broadcasted in both morning and night?",
"Who are the owners of these programs?"
] | [
"SELECT name FROM program",
"SELECT t1.name, t2.time_of_day FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id",
"SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.time_of_day = 'Night'",
"SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Morning\" INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Night\""
] | find the program owners that have some programs in both morning and night time. | SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = "Morning" INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = "Night" | program_share |
[
"List the names of all channels.",
"Which channels are owned by CCTV?",
"Include those owned by HBS."
] | [
"SELECT name FROM channel",
"SELECT name FROM channel WHERE OWNER = 'CCTV'",
"SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS'"
] | What are the names of the channels owned by CCTV or HBS? | SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS' | program_share |
[
"How many events are there in the record?",
"Show me their names.",
"Which ones happened in the most recent year?"
] | [
"SELECT count(*) FROM event",
"SELECT name FROM event",
"SELECT name FROM event ORDER BY YEAR DESC LIMIT 1"
] | What is the name of the event that happened in the most recent year? | SELECT name FROM event ORDER BY YEAR DESC LIMIT 1 | swimming |
[
"How many stadiums are there in the system?",
"What are their names?",
"Show me the one with maximum capacity."
] | [
"SELECT count(*) FROM stadium",
"SELECT name FROM stadium",
"SELECT name FROM stadium ORDER BY capacity DESC LIMIT 1"
] | Find the name of the stadium that has the maximum capacity. | SELECT name FROM stadium ORDER BY capacity DESC LIMIT 1 | swimming |
[
"How many stadiums are there in the system?",
"What are their names?",
"Give me their capacities.",
"What is the average capacity?",
"Show me the stadiums whose capacity is smaller than that."
] | [
"SELECT count(*) FROM stadium",
"SELECT name FROM stadium",
"SELECT name, capacity FROM stadium",
"SELECT avg(capacity) FROM stadium",
"SELECT name FROM stadium WHERE capacity < (SELECT avg(capacity) FROM stadium)"
] | Find the names of stadiums whose capacity is smaller than the average capacity. | SELECT name FROM stadium WHERE capacity < (SELECT avg(capacity) FROM stadium) | swimming |
[
"How many stadiums are there in file?",
"What about in terms of different countries?",
"Show me the country with the most of them."
] | [
"SELECT count(*) FROM Stadium",
"SELECT Country, count(*) FROM Stadium GROUP BY country",
"SELECT country FROM stadium GROUP BY country ORDER BY count(*) DESC LIMIT 1"
] | Find the country that has the most stadiums. | SELECT country FROM stadium GROUP BY country ORDER BY count(*) DESC LIMIT 1 | swimming |
[
"How many stadiums are there in file?",
"What about in terms of different countries?",
"Show me the countries with at most three."
] | [
"SELECT count(*) FROM Stadium",
"SELECT Country, count(*) FROM Stadium GROUP BY country",
"SELECT country FROM stadium GROUP BY country HAVING count(*) <= 3"
] | Which country has at most 3 stadiums listed? | SELECT country FROM stadium GROUP BY country HAVING count(*) <= 3 | swimming |
[
"How many stadiums are there in file?",
"What about in terms of different countries?",
"Show me the countries that have stadiums with capacity greater than 60000.",
"Among them, which ones also have stadiums with capacity less than 50000."
] | [
"SELECT count(*) FROM Stadium",
"SELECT Country, count(*) FROM Stadium GROUP BY country",
"SELECT country FROM stadium WHERE capacity > 60000",
"SELECT country FROM stadium WHERE capacity > 60000 INTERSECT SELECT country FROM stadium WHERE capacity < 50000"
] | Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000? | SELECT country FROM stadium WHERE capacity > 60000 INTERSECT SELECT country FROM stadium WHERE capacity < 50000 | swimming |
[
"Show me the name of all stadiums.",
"What about their opening years?",
"Only list those opened after 2006.",
"Show me the countries which has any of those stadiums.",
"What about the countries in file that are not among them."
] | [
"SELECT Name FROM stadium",
"SELECT Name,opening_year FROM stadium",
"SELECT Name,opening_year FROM stadium WHERE opening_year > 2006",
"SELECT country FROM stadium WHERE opening_year > 2006",
"SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year > 2006"
] | Which countries do not have a stadium that was opened after 2006? | SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year > 2006 | swimming |
[
"How many swimmers are there in record?",
"What about in terms of nationality?",
"Show me the countries with more than one."
] | [
"SELECT count(*) FROM swimmer",
"SELECT nationality , count(*) FROM swimmer GROUP BY nationality",
"SELECT nationality , count(*) FROM swimmer GROUP BY nationality HAVING count(*) > 1"
] | List countries that have more than one swimmer. | SELECT nationality , count(*) FROM swimmer GROUP BY nationality HAVING count(*) > 1 | swimming |
[
"How many swimming records are there?",
"How many of them have a result of win?",
"Show me the swimmer ids in those records.",
"What are their names?"
] | [
"SELECT count(*) FROM record",
"SELECT count(*) FROM record WHERE result = 'Win'",
"SELECT swimmer_id FROM record WHERE result = 'Win'",
"SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win'"
] | Find the names of swimmers who has a result of "win". | SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' | swimming |
[
"How many events are there?",
"What about in terms of stadiums?",
"Give me the name of the one that held the most of them."
] | [
"SELECT count(*) FROM event",
"SELECT stadium_id,count(*) FROM event GROUP BY stadium_id",
"SELECT t1.name FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1"
] | What is the name of the stadium which held the most events? | SELECT t1.name FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1 | swimming |
[
"How many events are there?",
"What are their names?",
"Show me the name of the stadium that held World Junior event."
] | [
"SELECT count(*) FROM event",
"SELECT Name FROM event",
"SELECT t1.name , t1.capacity FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id WHERE t2.name = 'World Junior'"
] | Find the name and capacity of the stadium where the event named "World Junior" happened. | SELECT t1.name , t1.capacity FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id WHERE t2.name = 'World Junior' | swimming |
[
"How many events are there?",
"Give me the id of stadiums that have held any of them.",
"What about the stadium ids in file that are not among those?",
"Show me their names."
] | [
"SELECT count(*) FROM event",
"SELECT stadium_id FROM event",
"SELECT id FROM stadium WHERE id NOT IN (SELECT stadium_id FROM event)",
"SELECT name FROM stadium WHERE id NOT IN (SELECT stadium_id FROM event)"
] | Find the names of stadiums which have never had any event. | SELECT name FROM stadium WHERE id NOT IN (SELECT stadium_id FROM event) | swimming |
[
"How many swimming records are there in the system?",
"What about that in terms of swimmer ids?",
"Show me the one with the most of them.",
"Give me that swimmer's name."
] | [
"SELECT count(*) FROM record",
"SELECT swimmer_id, count(*) FROM record GROUP BY swimmer_id",
"SELECT swimmer_id FROM record GROUP BY swimmer_id ORDER BY count(*) DESC LIMIT 1",
"SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id GROUP BY t2.swimmer_id ORDER BY count(*) DESC LIMIT 1"
] | Find the name of the swimmer who has the most records. | SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id GROUP BY t2.swimmer_id ORDER BY count(*) DESC LIMIT 1 | swimming |
[
"How many swimming records are there in the system?",
"What about that in terms of swimmer ids?",
"Show me those with at least two.",
"What about their names?"
] | [
"SELECT count(*) FROM record",
"SELECT swimmer_id, count(*) FROM record GROUP BY swimmer_id",
"SELECT swimmer_id FROM record GROUP BY swimmer_id HAVING count(*) >= 2",
"SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id GROUP BY t2.swimmer_id HAVING count(*) >= 2"
] | Find the name of the swimmer who has at least 2 records. | SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id GROUP BY t2.swimmer_id HAVING count(*) >= 2 | swimming |
[
"How many swimming records are there in the system?",
"What about swimming records of a result Win?",
"What about in terms of swimmer ids?",
"Show me those with more than one.",
"Show me their names and nationalities."
] | [
"SELECT count(*) FROM record",
"SELECT count(*) FROM record WHERE result = 'Win'",
"SELECT swimmer_id, count(*) FROM record WHERE result = 'Win' GROUP BY swimmer_id",
"SELECT swimmer_id FROM record WHERE result = 'Win' GROUP BY swimmer_id HAVING count(*) > 1",
"SELECT t1.name , t1.nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' GROUP BY t2.swimmer_id HAVING count(*) > 1"
] | Find the name and nationality of the swimmer who has won (i.e., has a result of "win") more than 1 time. | SELECT t1.name , t1.nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' GROUP BY t2.swimmer_id HAVING count(*) > 1 | swimming |
[
"How many swimming records are there?",
"Show me the swimmer ids associated with any of those record.",
"What about the swimmer ids that are not one of those?",
"Show me those swimmers' names."
] | [
"SELECT count(*) FROM record",
"SELECT distinct swimmer_id FROM record",
"SELECT id FROM swimmer WHERE id NOT IN (SELECT swimmer_id FROM record)",
"SELECT name FROM swimmer WHERE id NOT IN (SELECT swimmer_id FROM record)"
] | Find the names of the swimmers who have no record. | SELECT name FROM swimmer WHERE id NOT IN (SELECT swimmer_id FROM record) | swimming |
[
"How many swimming records are there?",
"What about records that have results \"Win\"?",
"Show me the name of the swimmers who have any of those records.",
"Among those swimmers, who also have any records with results \"Loss\"?"
] | [
"SELECT count(*) FROM record",
"SELECT count(*) FROM record where RESULT = 'Win'",
"SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win'",
"SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' INTERSECT SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Loss'"
] | Find the names of the swimmers who have both "win" and "loss" results in the record. | SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' INTERSECT SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Loss' | swimming |
[
"How many stadiums are there?",
"How many Australian swimmers are there in the record?",
"Show me the stadiums any of those swimmers have been to."
] | [
"SELECT count(*) FROM stadium",
"SELECT count(*) FROM Swimmer where nationality = 'Australian'",
"SELECT t4.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id JOIN event AS t3 ON t2.event_id = t3.id JOIN stadium AS t4 ON t4.id = t3.stadium_id WHERE t1.nationality = 'Australia'"
] | Find the names of stadiums that some Australian swimmers have been to. | SELECT t4.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id JOIN event AS t3 ON t2.event_id = t3.id JOIN stadium AS t4 ON t4.id = t3.stadium_id WHERE t1.nationality = 'Australia' | swimming |
[
"What is the average market rate for furniture?",
"Show each furniture id number and its corresponding market_rate.",
"Which one has the lowest market_rate?",
"Which one has the highest?",
"Also show its name."
] | [
"SELECT avg(market_rate) FROM furniture",
"SELECT furniture_id, market_rate FROM furniture",
"SELECT furniture_id, market_rate FROM furniture ORDER BY market_rate LIMIT 1",
"SELECT furniture_id, market_rate FROM furniture ORDER BY market_rate DESC LIMIT 1",
"SELECT name , furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1"
] | Return the name and id of the furniture with the highest market rate. | SELECT name , furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1 | manufacturer |
[
"What are the names of the 5 furniture items with the highest market rates?",
"How about the top 2?",
"What are their market rates?",
"How about the sum?"
] | [
"SELECT name FROM furniture ORDER BY market_rate DESC LIMIT 5",
"SELECT name FROM furniture ORDER BY market_rate DESC LIMIT 2",
"SELECT name, market_rate FROM furniture ORDER BY market_rate DESC LIMIT 2",
"SELECT sum(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2"
] | Find the total market rate of the furnitures that have the top 2 market shares. | SELECT sum(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2 | manufacturer |
[
"Show all information for the lowest market-rate furniture item.",
"What is its id number?",
"How many components does it have?",
"Also show its name."
] | [
"SELECT * FROM furniture ORDER BY market_rate LIMIT 1",
"SELECT furniture_id FROM furniture ORDER BY market_rate LIMIT 1",
"SELECT Num_of_Component FROM furniture ORDER BY market_rate LIMIT 1",
"SELECT name , Num_of_Component FROM furniture ORDER BY market_rate LIMIT 1"
] | Find the name and component amount of the least popular furniture. | SELECT name , Num_of_Component FROM furniture ORDER BY market_rate LIMIT 1 | manufacturer |
[
"What is the highest dollar price among the furniture?",
"Show manufacture information for items with a lower price than this.",
"Show only their furniture_id numbers.",
"What are the names of these items?"
] | [
"SELECT max(Price_in_Dollar) FROM furniture_manufacte",
"SELECT * FROM furniture_manufacte WHERE Price_in_Dollar < (SELECT max(Price_in_Dollar) FROM furniture_manufacte)",
"SELECT furniture_id FROM furniture_manufacte WHERE Price_in_Dollar < (SELECT max(Price_in_Dollar) FROM furniture_manufacte)",
"SELECT t1.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID WHERE t2.Price_in_Dollar < (SELECT max(Price_in_Dollar) FROM furniture_manufacte)"
] | Find the names of furnitures whose prices are lower than the highest price. | SELECT t1.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID WHERE t2.Price_in_Dollar < (SELECT max(Price_in_Dollar) FROM furniture_manufacte) | manufacturer |
[
"What is the average number of shops for manufacturers?",
"How about the minimum?",
"Which manufacturer has the fewest shops?",
"Only show the year it opened and the name of the manufacturer."
] | [
"SELECT avg(Num_of_Shops) FROM manufacturer",
"SELECT min(Num_of_Shops) FROM manufacturer",
"SELECT * FROM manufacturer ORDER BY Num_of_Shops DESC LIMIT 1",
"SELECT open_year , name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1"
] | Which manufacturer has the most number of shops? List its name and year of opening. | SELECT open_year , name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1 | manufacturer |
[
"How many different manufacturers are there?",
"How many of them have fewer than 10 factories?",
"Show their names and the years they opened.",
"Also include those that have more than 10 shops."
] | [
"SELECT count(*) FROM manufacturer",
"SELECT count(*) FROM manufacturer WHERE num_of_shops < 10",
"SELECT name, open_year FROM manufacturer WHERE num_of_shops < 10",
"SELECT name, open_year FROM manufacturer WHERE num_of_shops < 10 OR num_of_shops > 10"
] | Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops. | SELECT name , open_year FROM manufacturer WHERE num_of_shops > 10 OR Num_of_Factories < 10 | manufacturer |
[
"Show information for manufacturers that opened on or after 1990.",
"How about before 1990?",
"What is the maximim number of shops among these manufacturers?",
"Also show the average number of factories for this group."
] | [
"SELECT * FROM manufacturer WHERE open_year >= 1990",
"SELECT * FROM manufacturer WHERE open_year < 1990",
"SELECT max(num_of_shops) FROM manufacturer WHERE open_year < 1990",
"SELECT max(num_of_shops) , avg(Num_of_Factories) FROM manufacturer WHERE open_year < 1990"
] | what is the average number of factories and maximum number of shops for manufacturers that opened before 1990. | SELECT max(num_of_shops) , avg(Num_of_Factories) FROM manufacturer WHERE open_year < 1990 | manufacturer |
[
"What is the furniture id number of the most expensive furniture?",
"How about the manufacturer number?",
"What is the name of the manufacturer?",
"Also show how many shops they have."
] | [
"SELECT furniture_id FROM furniture_manufacte ORDER BY Price_in_Dollar DESC 1",
"SELECT manufacturer_id FROM furniture_manufacte ORDER BY Price_in_Dollar DESC 1",
"SELECT t1.manufacturer_id FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1",
"SELECT t1.manufacturer_id , t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1"
] | Find the id and number of shops for the company that produces the most expensive furniture. | SELECT t1.manufacturer_id , t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1 | manufacturer |
[
"How many distinct manufacturers are there?",
"How many produce furniture?",
"What are their names?",
"Also show how many furniture types each manufacturer produces."
] | [
"SELECT count(DISTINCT manufacturer_id) FROM manufacturer",
"SELECT count(DISTINCT t1.manufacturer_id) FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id",
"SELECT DISTINCT t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id",
"SELECT count(*) , t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id GROUP BY t1.manufacturer_id"
] | Find the number of funiture types produced by each manufacturer as well as the company names. | SELECT count(*) , t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id GROUP BY t1.manufacturer_id | manufacturer |
[
"How many different furniture items are there?",
"How many are sold by manufacturers in our records?",
"Which furniture names are not in our records?",
"Also show their market rates."
] | [
"SELECT count(DISTINCT furniture_id) FROM furniture",
"SELECT count(DISTINCT furniture_id) FROM furniture WHERE furniture_id IN (SELECT furniture_id FROM furniture_manufacte)",
"SELECT name FROM furniture WHERE furniture_id NOT IN (SELECT furniture_id FROM furniture_manufacte)",
"SELECT market_rate, name FROM furniture WHERE furniture_id NOT IN (SELECT furniture_id FROM furniture_manufacte)"
] | Find the market shares and names of furnitures which no any company is producing in our records. | SELECT Market_Rate , name FROM furniture WHERE Furniture_ID NOT IN (SELECT Furniture_ID FROM furniture_manufacte) | manufacturer |
[
"How many drivers are there?",
"How many drivers does each city have?",
"Which city has the most drivers?"
] | [
"SELECT COUNT(*) FROM driver",
"SELECT home_city, count(*) FROM driver GROUP BY home_city",
"SELECT home_city FROM driver GROUP BY home_city ORDER BY count(*) DESC LIMIT 1"
] | Show the home city with the most number of drivers. | SELECT home_city FROM driver GROUP BY home_city ORDER BY count(*) DESC LIMIT 1 | school_bus |
[
"How many different parties are there?",
"How many drivers are from Hartford?",
"Among these drivers, how many of them are older than 40?",
"Show their parites."
] | [
"SELECT COUNT(DISTINCT party) FROM driver",
"SELECT COUNT(*) FROM driver WHERE home_city = 'Hartford'",
"SELECT COUNT(*) FROM driver WHERE home_city = 'Hartford' AND age > 40",
"SELECT party FROM driver WHERE home_city = 'Hartford' AND age > 40"
] | Show the party with drivers from Hartford and drivers older than 40. | SELECT party FROM driver WHERE home_city = 'Hartford' AND age > 40 | school_bus |
[
"How many drivers are older than 30?",
"How many are older than 40?",
"Show their home cities.",
"Among these cities, which one has at least two drivers older than 40?"
] | [
"SELECT COUNT(*) FROM driver WHERE age > 30",
"SELECT COUNT(*) FROM driver WHERE age > 40",
"SELECT home_city FROM driver WHERE age > 40",
"SELECT home_city FROM driver WHERE age > 40 GROUP BY home_city HAVING count(*) >= 2"
] | Show home city where at least two drivers older than 40 are from. | SELECT home_city FROM driver WHERE age > 40 GROUP BY home_city HAVING count(*) >= 2 | school_bus |
[
"Show the hometowns of the drivers who are older than 40.",
"How many different cities are there?",
"What are the cities that do not have a driver older than 40?"
] | [
"SELECT home_city FROM driver WHERE age > 40",
"SELECT COUNT(DISTINCT home_city) FROM driver",
"SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver WHERE age > 40"
] | Show all home cities except for those having a driver older than 40. | SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver WHERE age > 40 | school_bus |
[
"How many drivers are there that have a school bus?",
"How about the number of drivers without a school bus?",
"Show these drivers' names."
] | [
"SELECT COUNT(*) FROM driver WHERE driver_id IN (SELECT driver_id FROM school_bus)",
"SELECT COUNT(*) FROM driver WHERE driver_id NOT IN (SELECT driver_id FROM school_bus)",
"SELECT name FROM driver WHERE driver_id NOT IN (SELECT driver_id FROM school_bus)"
] | Show the names of the drivers without a school bus. | SELECT name FROM driver WHERE driver_id NOT IN (SELECT driver_id FROM school_bus) | school_bus |
[
"How many different types of schools are there?",
"For each type, how many schools are there?",
"Which types have two schools?"
] | [
"SELECT COUNT(DISTINCT TYPE) FROM school",
"SELECT TYPE, COUNT(*) FROM school GROUP BY TYPE",
"SELECT TYPE FROM school GROUP BY TYPE HAVING count(*) = 2"
] | Show the types of schools that have two schools. | SELECT TYPE FROM school GROUP BY TYPE HAVING count(*) = 2 | school_bus |
[
"How many different schools are there?",
"Which schools have school buses?",
"Please also show the names of the drivers."
] | [
"SELECT COUNT(*) FROM school",
"SELECT T2.school FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id",
"SELECT T2.school , T3.name FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN driver AS T3 ON T1.driver_id = T3.driver_id"
] | Show the school name and driver name for all school buses. | SELECT T2.school , T3.name FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN driver AS T3 ON T1.driver_id = T3.driver_id | school_bus |
[
"What are the top 3 number of years spent working on a school bus?",
"What is the maximum years spent working on a school bus?",
"Please also show the minimum and average years."
] | [
"SELECT years_working FROM school_bus ORDER BY years_working DESC LIMIT 3",
"SELECT max(years_working) FROM school_bus",
"SELECT max(years_working) , min(years_working) , avg(years_working) FROM school_bus"
] | What is the maximum, minimum and average years spent working on a school bus? | SELECT max(years_working) , min(years_working) , avg(years_working) FROM school_bus | school_bus |
[
"How many schools do not have a school bus?",
"What are the names of these schools?",
"Please also show the school types."
] | [
"SELECT COUNT(*) FROM school WHERE school_id NOT IN (SELECT school_id FROM school_bus)",
"SELECT school FROM school WHERE school_id NOT IN (SELECT school_id FROM school_bus)",
"SELECT school , TYPE FROM school WHERE school_id NOT IN (SELECT school_id FROM school_bus)"
] | Show the school name and type for schools without a school bus. | SELECT school , TYPE FROM school WHERE school_id NOT IN (SELECT school_id FROM school_bus) | school_bus |