minktn/spider-data huggingface dataset:
Database: shop_membership
Question: Show all member names and registered branch names sorted by register year.
SQL: SELECT T3.name ,  T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id JOIN member AS T3 ON T1.member_id  =  T3.member_id ORDER BY T1.register_year
Database: shop_membership
Question: What are the names of the members and branches at which they are registered sorted by year of registration?
SQL: SELECT T3.name ,  T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id JOIN member AS T3 ON T1.member_id  =  T3.member_id ORDER BY T1.register_year
Database: shop_membership
Question: Show all branch names with the number of members in each branch registered after 2015.
SQL: SELECT T2.name ,  count(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T1.register_year  >  2015 GROUP BY T2.branch_id
Database: shop_membership
Question: For each branch id, what are the names of the branches that were registered after 2015?
SQL: SELECT T2.name ,  count(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T1.register_year  >  2015 GROUP BY T2.branch_id
Database: shop_membership
Question: Show member names without any registered branch.
SQL: SELECT name FROM member WHERE member_id NOT IN (SELECT member_id FROM membership_register_branch)
Database: shop_membership
Question: What are the names of the members that have never registered at any branch?
SQL: SELECT name FROM member WHERE member_id NOT IN (SELECT member_id FROM membership_register_branch)
Database: shop_membership
Question: List the branch name and city without any registered members.
SQL: SELECT name ,  city FROM branch WHERE branch_id NOT IN (SELECT branch_id FROM membership_register_branch)
Database: shop_membership
Question: What are the names and cities of the branches that do not have any registered members?
SQL: SELECT name ,  city FROM branch WHERE branch_id NOT IN (SELECT branch_id FROM membership_register_branch)
Database: shop_membership
Question: What is the name and open year for the branch with most number of memberships registered in 2016?
SQL: SELECT T2.name ,  T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T1.register_year  =  2016 GROUP BY T2.branch_id ORDER BY count(*) DESC LIMIT 1
Database: shop_membership
Question: What is the name and opening year for the branch that registered the most members in 2016?
SQL: SELECT T2.name ,  T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T1.register_year  =  2016 GROUP BY T2.branch_id ORDER BY count(*) DESC LIMIT 1
Database: shop_membership
Question: Show the member name and hometown who registered a branch in 2016.
SQL: SELECT T2.name ,  T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id  =  T2.member_id WHERE T1.register_year  =  2016
Database: shop_membership
Question: What are the member names and hometowns of those who registered at a branch in 2016?
SQL: SELECT T2.name ,  T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id  =  T2.member_id WHERE T1.register_year  =  2016
Database: shop_membership
Question: Show all city with a branch opened in 2001 and a branch with more than 100 membership.
SQL: SELECT city FROM branch WHERE open_year  =  2001 AND membership_amount  >  100
Database: shop_membership
Question: What are the cities that have a branch that opened in 2001 and a branch with more than 100 members?
SQL: SELECT city FROM branch WHERE open_year  =  2001 AND membership_amount  >  100
Database: shop_membership
Question: Show all cities without a branch having more than 100 memberships.
SQL: SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount  >  100
Database: shop_membership
Question: What are the cities that do not have any branches with more than 100 members?
SQL: SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount  >  100
Database: shop_membership
Question: What is the sum of total pounds of purchase in year 2018 for all branches in London?
SQL: SELECT sum(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T2.city  =  'London' AND T1.year  =  2018
Database: shop_membership
Question: How many total pounds were purchased in the year 2018 at all London branches?
SQL: SELECT sum(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T2.city  =  'London' AND T1.year  =  2018
Database: shop_membership
Question: What is the total number of purchases for members with level 6?
SQL: SELECT count(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id  =  T2.member_id WHERE T2.level  =  6
Database: shop_membership
Question: What are the total purchases for members rated at level 6?
SQL: SELECT count(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id  =  T2.member_id WHERE T2.level  =  6
Database: shop_membership
Question: Find the name of branches where have some members whose hometown is in Louisville, Kentucky and some in Hiram, Georgia.
SQL: SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id JOIN member AS T3 ON T1.member_id  =  T3.member_id WHERE T3.Hometown  =  'Louisville ,  Kentucky' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id JOIN member AS T3 ON T1.member_id  =  T3.member_id WHERE T3.Hometown  =  'Hiram ,  Georgia'
Database: shop_membership
Question: What are the names of the branches that have some members with a hometown in Louisville, Kentucky and also those from Hiram, Goergia?
SQL: SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id JOIN member AS T3 ON T1.member_id  =  T3.member_id WHERE T3.Hometown  =  'Louisville ,  Kentucky' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id JOIN member AS T3 ON T1.member_id  =  T3.member_id WHERE T3.Hometown  =  'Hiram ,  Georgia'
Database: shop_membership
Question: list the card number of all members whose hometown address includes word "Kentucky".
SQL: SELECT card_number FROM member WHERE Hometown LIKE "%Kentucky%"
Database: shop_membership
Question: What are the card numbers of members from Kentucky?
SQL: SELECT card_number FROM member WHERE Hometown LIKE "%Kentucky%"
Database: voter_2
Question: Find the number of students in total.
SQL: SELECT count(*) FROM STUDENT
Database: voter_2
Question: How many students are there in total?
SQL: SELECT count(*) FROM STUDENT
Database: voter_2
Question: Find the number of voting records in total.
SQL: SELECT count(*) FROM VOTING_RECORD
Database: voter_2
Question: How many voting records do we have?
SQL: SELECT count(*) FROM VOTING_RECORD
Database: voter_2
Question: Find the distinct number of president votes.
SQL: SELECT count(DISTINCT President_Vote) FROM VOTING_RECORD
Database: voter_2
Question: How many distinct president votes are recorded?
SQL: SELECT count(DISTINCT President_Vote) FROM VOTING_RECORD
Database: voter_2
Question: Find the maximum age of all the students.
SQL: SELECT max(Age) FROM STUDENT
Database: voter_2
Question: What is the oldest age among the students?
SQL: SELECT max(Age) FROM STUDENT
Database: voter_2
Question: Find the last names of students with major 50.
SQL: SELECT LName FROM STUDENT WHERE Major  =  50
Database: voter_2
Question: What are the last names of students studying major 50?
SQL: SELECT LName FROM STUDENT WHERE Major  =  50
Database: voter_2
Question: Find the first names of students with age above 22.
SQL: SELECT Fname FROM STUDENT WHERE Age  >  22
Database: voter_2
Question: What are the first names of all the students aged above 22?
SQL: SELECT Fname FROM STUDENT WHERE Age  >  22
Database: voter_2
Question: What are the majors of male (sex is M) students?
SQL: SELECT Major FROM STUDENT WHERE Sex  =  "M"
Database: voter_2
Question: List the major of each male student.
SQL: SELECT Major FROM STUDENT WHERE Sex  =  "M"
Database: voter_2
Question: What is the average age of female (sex is F) students?
SQL: SELECT avg(Age) FROM STUDENT WHERE Sex  =  "F"
Database: voter_2
Question: Find the average age of female students.
SQL: SELECT avg(Age) FROM STUDENT WHERE Sex  =  "F"
Database: voter_2
Question: What are the maximum and minimum age of students with major 600?
SQL: SELECT max(Age) ,  min(Age) FROM STUDENT WHERE Major  =  600
Database: voter_2
Question: Tell me the ages of the oldest and youngest students studying major 600.
SQL: SELECT max(Age) ,  min(Age) FROM STUDENT WHERE Major  =  600
Database: voter_2
Question: Who are the advisors for students that live in a city with city code "BAL"?
SQL: SELECT Advisor FROM STUDENT WHERE city_code  =  "BAL"
Database: voter_2
Question: Show the advisors of the students whose city of residence has city code "BAL".
SQL: SELECT Advisor FROM STUDENT WHERE city_code  =  "BAL"
Database: voter_2
Question: What are the distinct secretary votes in the fall election cycle?
SQL: SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE  =  "Fall"
Database: voter_2
Question: Return all the distinct secretary votes made in the fall election cycle.
SQL: SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE  =  "Fall"
Database: voter_2
Question: What are the distinct president votes on 08/30/2015?
SQL: SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date  =  "08/30/2015"
Database: voter_2
Question: Show all the distinct president votes made on 08/30/2015.
SQL: SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date  =  "08/30/2015"
Database: voter_2
Question: Report the distinct registration date and the election cycle.
SQL: SELECT DISTINCT Registration_Date ,  Election_Cycle FROM VOTING_RECORD
Database: voter_2
Question: What are the distinct registration dates and the election cycles?
SQL: SELECT DISTINCT Registration_Date ,  Election_Cycle FROM VOTING_RECORD
Database: voter_2
Question: Report the distinct president vote and the vice president vote.
SQL: SELECT DISTINCT President_Vote ,  VICE_President_Vote FROM VOTING_RECORD
Database: voter_2
Question: List all the distinct president votes and the vice president votes.
SQL: SELECT DISTINCT President_Vote ,  VICE_President_Vote FROM VOTING_RECORD
Database: voter_2
Question: Find the distinct last names of the students who have class president votes.
SQL: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.CLASS_President_VOTE
Database: voter_2
Question: What are the distinct last names of the students who have class president votes?
SQL: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.CLASS_President_VOTE
Database: voter_2
Question: Find the distinct first names of the students who have class senator votes.
SQL: SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.CLASS_Senator_VOTE
Database: voter_2
Question: What are the distinct first names of the students who have class president votes?
SQL: SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.CLASS_Senator_VOTE
Database: voter_2
Question: Find the distinct ages of students who have secretary votes in the fall election cycle.
SQL: SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.Secretary_Vote WHERE T2.Election_Cycle  =  "Fall"
Database: voter_2
Question: What are the distinct ages of students who have secretary votes in the fall election cycle?
SQL: SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.Secretary_Vote WHERE T2.Election_Cycle  =  "Fall"
Database: voter_2
Question: Find the distinct Advisor of students who have treasurer votes in the spring election cycle.
SQL: SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.Treasurer_Vote WHERE T2.Election_Cycle  =  "Spring"
Database: voter_2
Question: Who served as an advisor for students who have treasurer votes in the spring election cycle?
SQL: SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.Treasurer_Vote WHERE T2.Election_Cycle  =  "Spring"
Database: voter_2
Question: Find the distinct majors of students who have treasurer votes.
SQL: SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.Treasurer_Vote
Database: voter_2
Question: What are the distinct majors that students with treasurer votes are studying?
SQL: SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.Treasurer_Vote
Database: voter_2
Question: Find the first and last names of all the female (sex is F) students who have president votes.
SQL: SELECT DISTINCT T1.Fname ,  T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.President_VOTE WHERE T1.sex  =  "F"
Database: voter_2
Question: What are the first and last names of all the female students who have president votes?
SQL: SELECT DISTINCT T1.Fname ,  T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.President_VOTE WHERE T1.sex  =  "F"
Database: voter_2
Question: Find the first and last name of all the students of age 18 who have vice president votes.
SQL: SELECT DISTINCT T1.Fname ,  T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.VICE_President_VOTE WHERE T1.age  =  18
Database: voter_2
Question: What are the first names and last names of the students who are 18 years old and have vice president votes.
SQL: SELECT DISTINCT T1.Fname ,  T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.VICE_President_VOTE WHERE T1.age  =  18
Database: voter_2
Question: How many male (sex is M) students have class senator votes in the fall election cycle?
SQL: SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  Class_Senator_Vote WHERE T1.Sex  =  "M" AND T2.Election_Cycle  =  "Fall"
Database: voter_2
Question: Count the number of male students who had class senator votes in the fall election cycle.
SQL: SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  Class_Senator_Vote WHERE T1.Sex  =  "M" AND T2.Election_Cycle  =  "Fall"
Database: voter_2
Question: Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle.
SQL: SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  Class_Senator_Vote WHERE T1.city_code  =  "NYC" AND T2.Election_Cycle  =  "Spring"
Database: voter_2
Question: Which students live in the city with code "NYC" and have class senator votes in the spring election cycle? Count the numbers.
SQL: SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  Class_Senator_Vote WHERE T1.city_code  =  "NYC" AND T2.Election_Cycle  =  "Spring"
Database: voter_2
Question: Find the average age of students who live in the city with code "NYC" and have secretary votes in the spring election cycle.
SQL: SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  SECRETARY_Vote WHERE T1.city_code  =  "NYC" AND T2.Election_Cycle  =  "Spring"
Database: voter_2
Question: What is the average age of students who have city code "NYC" and have secretary votes for the spring election cycle?
SQL: SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  SECRETARY_Vote WHERE T1.city_code  =  "NYC" AND T2.Election_Cycle  =  "Spring"
Database: voter_2
Question: Find the average age of female (sex is F) students who have secretary votes in the spring election cycle.
SQL: SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  SECRETARY_Vote WHERE T1.Sex  =  "F" AND T2.Election_Cycle  =  "Spring"
Database: voter_2
Question: What is the average age of the female students with secretary votes in the spring election cycle?
SQL: SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  SECRETARY_Vote WHERE T1.Sex  =  "F" AND T2.Election_Cycle  =  "Spring"
Database: voter_2
Question: Find the distinct first names of all the students who have vice president votes and whose city code is not PIT.
SQL: SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code  =  "PIT"
Database: voter_2
Question: What are the distinct first names of the students who have vice president votes and reside in a city whose city code is not PIT?
SQL: SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code  =  "PIT"
Database: voter_2
Question: Find the distinct last names of all the students who have president votes and whose advisor is not 2192.
SQL: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor  =  "2192"
Database: voter_2
Question: What are the distinct last names of the students who have president votes but do not have 2192 as the advisor?
SQL: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor  =  "2192"
Database: voter_2
Question: Find the distinct last names of all the students who have president votes and whose advisor is 8741.
SQL: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor  =  "8741"
Database: voter_2
Question: What are the distinct last names of the students who have president votes and have 8741 as the advisor?
SQL: SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor  =  "8741"
Database: voter_2
Question: For each advisor, report the total number of students advised by him or her.
SQL: SELECT Advisor ,  count(*) FROM STUDENT GROUP BY Advisor
Database: voter_2
Question: How many students does each advisor have?
SQL: SELECT Advisor ,  count(*) FROM STUDENT GROUP BY Advisor
Database: voter_2
Question: Report all advisors that advise more than 2 students.
SQL: SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*)  >  2
Database: voter_2
Question: Which advisors have more than two students?
SQL: SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*)  >  2
Database: voter_2
Question: Report all majors that have less than 3 students.
SQL: SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*)  <  3
Database: voter_2
Question: What are the majors only less than three students are studying?
SQL: SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*)  <  3
Database: voter_2
Question: For each election cycle, report the number of voting records.
SQL: SELECT Election_Cycle ,  count(*) FROM VOTING_RECORD GROUP BY Election_Cycle
Database: voter_2
Question: Count the number of voting records for each election cycle.
SQL: SELECT Election_Cycle ,  count(*) FROM VOTING_RECORD GROUP BY Election_Cycle
Database: voter_2
Question: Which major has the most students?
SQL: SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1
Database: voter_2
Question: Find the major that is studied by the largest number of students.
SQL: SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1
Database: voter_2
Question: What is the most common major among female (sex is F) students?
SQL: SELECT Major FROM STUDENT WHERE Sex  =  "F" GROUP BY major ORDER BY count(*) DESC LIMIT 1
Database: voter_2
Question: Find the major that is studied by the most female students.
SQL: SELECT Major FROM STUDENT WHERE Sex  =  "F" GROUP BY major ORDER BY count(*) DESC LIMIT 1
Database: voter_2
Question: What is the city_code of the city that the most students live in?
SQL: SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1
Database: voter_2
Question: Return the code of the city that has the most students.
SQL: SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1
Database: voter_2
Question: Report the distinct advisors who have more than 2 students.
SQL: SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*)  >  2
Database: voter_2
Question: Which advisors are advising more than 2 students?
SQL: SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*)  >  2
Database: products_gen_characteristics
Question: How many products are there?
SQL: SELECT count(*) FROM products
Database: products_gen_characteristics
Question: Count the number of products.
SQL: SELECT count(*) FROM products
Database: products_gen_characteristics
Question: How many colors are there?
SQL: SELECT count(*) FROM ref_colors
Database: products_gen_characteristics
Question: Count the number of colors.
SQL: SELECT count(*) FROM ref_colors
Database: products_gen_characteristics
Question: How many characteristics are there?
SQL: SELECT count(*) FROM CHARACTERISTICS
Database: products_gen_characteristics
Question: Count the number of characteristics.
SQL: SELECT count(*) FROM CHARACTERISTICS
Database: products_gen_characteristics
Question: What are the names and buying prices of all the products?
SQL: SELECT product_name ,  typical_buying_price FROM products
Database: products_gen_characteristics
Question: Return the names and typical buying prices for all products.
SQL: SELECT product_name ,  typical_buying_price FROM products
Database: products_gen_characteristics
Question: List the description of all the colors.
SQL: SELECT color_description FROM ref_colors
Database: products_gen_characteristics
Question: What are the descriptions for each color?
SQL: SELECT color_description FROM ref_colors
Database: products_gen_characteristics
Question: Find the names of all the product characteristics.
SQL: SELECT DISTINCT characteristic_name FROM CHARACTERISTICS
Database: products_gen_characteristics
Question: What are the different names of the product characteristics?
SQL: SELECT DISTINCT characteristic_name FROM CHARACTERISTICS
Database: products_gen_characteristics
Question: What are the names of products with category "Spices"?
SQL: SELECT product_name FROM products WHERE product_category_code  =  "Spices"
Database: products_gen_characteristics
Question: Return the names of products in the category 'Spices'.
SQL: SELECT product_name FROM products WHERE product_category_code  =  "Spices"
Database: products_gen_characteristics
Question: List the names, color descriptions and product descriptions of products with category "Herbs".
SQL: 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"
Database: products_gen_characteristics
Question: What are the names, color descriptions, and product descriptions for products in the 'Herbs' category?
SQL: 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"
Database: products_gen_characteristics
Question: How many products are there under the category "Seeds"?
SQL: SELECT count(*) FROM products WHERE product_category_code  =  "Seeds"
Database: products_gen_characteristics
Question: Count the number of products in the category 'Seeds'.
SQL: SELECT count(*) FROM products WHERE product_category_code  =  "Seeds"
Database: products_gen_characteristics
Question: Find the number of products with category "Spices" and typically sold above 1000.
SQL: SELECT count(*) FROM products WHERE product_category_code  =  "Spices" AND typical_buying_price  >  1000
Database: products_gen_characteristics
Question: How many products are in the 'Spices' category and have a typical price of over 1000?
SQL: SELECT count(*) FROM products WHERE product_category_code  =  "Spices" AND typical_buying_price  >  1000
Database: products_gen_characteristics
Question: What is the category and typical buying price  of the product with name "cumin"?
SQL: SELECT product_category_code ,  typical_buying_price FROM products WHERE product_name  =  "cumin"
Database: products_gen_characteristics
Question: Return the category code and typical price of 'cumin'.
SQL: SELECT product_category_code ,  typical_buying_price FROM products WHERE product_name  =  "cumin"
Database: products_gen_characteristics
Question: Which category does the product named "flax" belong to?
SQL: SELECT product_category_code FROM products WHERE product_name  =  "flax"
Database: products_gen_characteristics
Question: What is the code of the category that the product with the name 'flax' belongs to?
SQL: SELECT product_category_code FROM products WHERE product_name  =  "flax"
Database: products_gen_characteristics
Question: What is the name of the product with the color description 'yellow'?
SQL: 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'
Database: products_gen_characteristics
Question: Give the name of the products that have a color description 'yellow'.
SQL: 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'
Database: products_gen_characteristics
Question: Find the category descriptions of the products whose descriptions include letter 't'.
SQL: 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%'
Database: products_gen_characteristics
Question: What are the descriptions of the categories that products with product descriptions that contain the letter t are in?
SQL: 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%'
Database: products_gen_characteristics
Question: What is the color description of the product with name "catnip"?
SQL: 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"
Database: products_gen_characteristics
Question: Give the color description for the product 'catnip'.
SQL: 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"
Database: products_gen_characteristics
Question: What is the color code and description of the product named "chervil"?
SQL: 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"
Database: products_gen_characteristics
Question: Return the color code and description for the product with the name 'chervil'.
SQL: 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"
Database: products_gen_characteristics
Question: Find the id and color description of the products with at least 2 characteristics.
SQL: 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
Database: products_gen_characteristics
Question: What are the product ids and color descriptions for products with two or more characteristics?
SQL: 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
Database: products_gen_characteristics
Question: List all the product names with the color description "white".
SQL: 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"
Database: products_gen_characteristics
Question: What are the names of products with 'white' as their color description?
SQL: 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"
Database: products_gen_characteristics
Question: What are the name and typical buying and selling prices of the products that have color described as "yellow"?
SQL: 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"
Database: products_gen_characteristics
Question: Return the names and typical buying and selling prices for products that have 'yellow' as their color description.
SQL: 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"
Database: products_gen_characteristics
Question: How many characteristics does the product named "sesame" have?
SQL: SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id WHERE t1.product_name  =  "sesame"
Database: products_gen_characteristics
Question: Count the number of characteristics the product 'sesame' has.
SQL: SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id WHERE t1.product_name  =  "sesame"
Database: products_gen_characteristics
Question: How many distinct characteristic names does the product "cumin" have?
SQL: 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  =  "sesame"
Database: products_gen_characteristics
Question: Count the number of different characteristic names the product 'cumin' has.
SQL: 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  =  "sesame"
Database: products_gen_characteristics
Question: What are all the characteristic names of product "sesame"?
SQL: 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"
Database: products_gen_characteristics
Question: Return the characteristic names of the 'sesame' product.
SQL: 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"
Database: products_gen_characteristics
Question: List all the characteristic names and data types of product "cumin".
SQL: 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"
Database: products_gen_characteristics
Question: What are the names and data types of the characteristics of the 'cumin' product?
SQL: 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"
Database: products_gen_characteristics
Question: List all characteristics of product named "sesame" with type code "Grade".
SQL: 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"
Database: products_gen_characteristics
Question: What are the names of the characteristics of the product 'sesame' that have the characteristic type code 'Grade'?
SQL: 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"
Database: products_gen_characteristics
Question: How many characteristics does the product named "laurel" have?
SQL: 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"
Database: products_gen_characteristics
Question: Count the number of characteristics of the product named 'laurel'.
SQL: 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"
Database: products_gen_characteristics
Question: Find the number of characteristics that the product "flax" has.
SQL: 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"
Database: products_gen_characteristics
Question: Count the number of characteristics of the 'flax' product.
SQL: 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"
Database: products_gen_characteristics
Question: Find the name of the products that have the color description "red" and have the characteristic name "fast".
SQL: 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"
Database: products_gen_characteristics
Question: What are the names of the products that have a color description of 'red' and the 'fast' characteristic?
SQL: 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"
Database: products_gen_characteristics
Question: How many products have the characteristic named "hot"?
SQL: 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"
Database: products_gen_characteristics
Question: Count the number of products with the 'hot' charactersitic.
SQL: 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"
Database: products_gen_characteristics
Question: List the all the distinct names of the products with the characteristic name 'warm'.
SQL: 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"
Database: products_gen_characteristics
Question: What are the different product names for products that have the 'warm' characteristic:?
SQL: 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"
Database: products_gen_characteristics
Question: Find the number of the products that have their color described as "red" and have a characteristic named "slow".
SQL: 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"
Database: products_gen_characteristics
Question: How many products have the color description 'red' and the characteristic name 'slow'?
SQL: 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"
Database: products_gen_characteristics
Question: Count the products that have the color description "white" or have the characteristic name "hot".
SQL: 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"
Database: products_gen_characteristics
Question: How many products have their color described as 'white' or have a characteristic with the name 'hot'?
SQL: 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"
Database: products_gen_characteristics
Question: What is the unit of measuerment of the product category code "Herbs"?
SQL: SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"
Database: products_gen_characteristics
Question: Return the unit of measure for 'Herb' products.
SQL: SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"
Database: products_gen_characteristics
Question: Find the product category description of the product category with code "Spices".
SQL: SELECT product_category_description FROM ref_product_categories WHERE product_category_code  =  "Spices"
Database: products_gen_characteristics
Question: What is the description of the product category with the code 'Spices'?
SQL: SELECT product_category_description FROM ref_product_categories WHERE product_category_code  =  "Spices"
Database: products_gen_characteristics
Question: What is the product category description and unit of measurement of category "Herbs"?
SQL: SELECT product_category_description ,  unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"
Database: products_gen_characteristics
Question: Return the description and unit of measurement for products in the 'Herbs' category.
SQL: SELECT product_category_description ,  unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"
Database: products_gen_characteristics
Question: What is the unit of measurement of product named "cumin"?
SQL: 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"
Database: products_gen_characteristics
Question: Give the unit of measure for the product with the name 'cumin'.
SQL: 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"
Database: products_gen_characteristics
Question: Find the unit of measurement and product category code of product named "chervil".
SQL: 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"
Database: products_gen_characteristics
Question: What are the unit of measure and category code for the 'chervil' product?
SQL: 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"
Database: products_gen_characteristics
Question: Find the product names that are colored 'white' but do not have unit of measurement "Handful".
SQL: 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"
Database: products_gen_characteristics
Question: What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'?
SQL: 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"
Database: products_gen_characteristics
Question: What is the description of the color for most products?
SQL: 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
Database: products_gen_characteristics
Question: Return the color description that is most common across all products.
SQL: 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
Database: products_gen_characteristics
Question: What is the description of the color used by least products?
SQL: 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
Database: products_gen_characteristics
Question: Give the color description that is least common across products.
SQL: 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
Database: products_gen_characteristics
Question: What is the characteristic name used by most number of the products?
SQL: 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
Database: products_gen_characteristics
Question: Return the name of the characteristic that is most common across all products.
SQL: 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
Database: products_gen_characteristics
Question: What are the names, details and data types of the characteristics which are never used by any product?
SQL: 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
Database: products_gen_characteristics
Question: Give the names, details, and data types of characteristics that are not found in any product.
SQL: 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
Database: products_gen_characteristics
Question: What are characteristic names used at least twice across all products?
SQL: 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
Database: products_gen_characteristics
Question: Give the names of characteristics that are in two or more products?
SQL: 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
Database: products_gen_characteristics
Question: How many colors are never used by any product?
SQL: SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products )
Database: products_gen_characteristics
Question: Count the number of colors that are not used in any products.
SQL: SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products )
Database: swimming
Question: How many events are there?
SQL: SELECT count(*) FROM event
Database: swimming
Question: List all the event names by year from the most recent to the oldest.
SQL: SELECT name FROM event ORDER BY YEAR DESC
Database: swimming
Question: What is the name of the event that happened in the most recent year?
SQL: SELECT name FROM event ORDER BY YEAR DESC LIMIT 1
Database: swimming
Question: How many stadiums are there?
SQL: SELECT count(*) FROM stadium
Database: swimming
Question: Find the name of the stadium that has the maximum capacity.
SQL: SELECT name FROM stadium ORDER BY capacity DESC LIMIT 1
Database: swimming
Question: Find the names of stadiums whose capacity is smaller than the average capacity.
SQL: SELECT name FROM stadium WHERE capacity  <  (SELECT avg(capacity) FROM stadium)
Database: swimming
Question: Find the country that has the most stadiums.
SQL: SELECT country FROM stadium GROUP BY country ORDER BY count(*) DESC LIMIT 1
Database: swimming
Question: Which country has at most 3 stadiums listed?
SQL: SELECT country FROM stadium GROUP BY country HAVING count(*)  <=  3
Database: swimming
Question: Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000?
SQL: SELECT country FROM stadium WHERE capacity  >  60000 INTERSECT SELECT country FROM stadium WHERE capacity  <  50000
Database: swimming
Question: How many cities have a stadium that was opened before the year of 2006?
SQL: SELECT count(DISTINCT city) FROM stadium WHERE opening_year  <  2006
Database: swimming
Question: How many stadiums does each country have?
SQL: SELECT country ,  count(*) FROM stadium GROUP BY country
Database: swimming
Question: Which countries do not have a stadium that was opened after 2006?
SQL: SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year  >  2006
Database: swimming
Question: How many stadiums are not in country "Russia"?
SQL: SELECT count(*) FROM stadium WHERE country != 'Russia'
Database: swimming
Question: Find the names of all swimmers, sorted by their 100 meter scores in ascending order.
SQL: SELECT name FROM swimmer ORDER BY meter_100
Database: swimming
Question: How many different countries are all the swimmers from?
SQL: SELECT count(DISTINCT nationality) FROM swimmer
Database: swimming
Question: List countries that have more than one swimmer.
SQL: SELECT nationality ,  count(*) FROM swimmer GROUP BY nationality HAVING count(*)  >  1
Database: swimming
Question: Find all 200 meter and 300 meter results of swimmers with nationality "Australia".
SQL: SELECT meter_200 ,  meter_300 FROM swimmer WHERE nationality  =  'Australia'
Database: swimming
Question: Find the names of swimmers who has a result of "win".
SQL: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  'Win'