Database: superstore
Question: Among the orders made by Aimee Bixby, how many of them included at least one kind of product under the category "Furniture"?
Evidence: made by Aimee Bixby refers to "Customer Name" = 'Aimee Bixby';
SQL: SELECT COUNT(DISTINCT T2.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T3.Category = 'Furniture' AND T1.`Customer Name` = 'Aimee Bixby'

Database: simpson_episodes
Question: How many persons were born in New York, USA?
Evidence: "New York" is the birth_place; 'USA' is the birth_region
SQL: SELECT COUNT(name) FROM Person WHERE birth_place = 'New York City' AND birth_country = 'USA';

Database: software_company
Question: In geographic identifier from 20 to 50, how many of them has a number of inhabitants below 20?
Evidence: geographic identifier from 20 to 50 refers to GEOID BETWEEN 20 AND 50; number of inhabitants below 20 refers to INHABITANTS_K < 20;
SQL: SELECT COUNT(GEOID) FROM Demog WHERE INHABITANTS_K < 20 AND GEOID >= 20 AND GEOID <= 50

Database: books
Question: What are the books published by "Harper Collins"?
Evidence: "Harper Collins" is the publisher_name; books refers to title
SQL: SELECT T1.title FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Harper Collins'

Database: public_review_platform
Question: How many "5" star reviews does the Yelp business No. "10682" get?
Evidence: 5 star reviews refers to review_stars = 5; business No. refers to business_id;
SQL: SELECT COUNT(review_length) FROM Reviews WHERE business_id = 10682 AND review_stars = 5

Database: movie_3
Question: Where does the staff Jon Stephens live?
Evidence: location refers to address, address2, district
SQL: SELECT T1.address, T1.address2 FROM address AS T1 INNER JOIN staff AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = 'Jon' AND T2.last_name = 'Stephens'

Database: cs_semester
Question: Among the most important courses, what is the name of the most difficult course?
Evidence: Higher credit means more important in which most important refers to MAX(credit); diff refers to difficulty; the most difficult course refers to MAX(diff);
SQL: SELECT name FROM course WHERE credit = ( SELECT MAX(credit) FROM course ) AND diff = ( SELECT MAX(diff) FROM course )

Database: professional_basketball
Question: Give the player id of the man who had the most turnovers whose team missed the playoffs in year 1988.
Evidence: the most turnovers refers to max(turnovers); missed the playoffs refers to PostGP = 0; in year 1988 refers to year = 1988
SQL: SELECT T2.playerID FROM players_teams AS T1 INNER JOIN players AS T2 ON T1.playerID = T2.playerID WHERE T1.PostGP = 0 AND T1.year = 1988 ORDER BY T1.turnovers DESC LIMIT 1

Database: authors
Question: Which conference has the longest name?
Evidence: the longest name refers to MAX(length(FullName))
SQL: SELECT FullName FROM Conference ORDER BY LENGTH(FullName) DESC LIMIT 1

Database: soccer_2016
Question: Who is the eldest player and where did he/she come from?
Evidence: eldest player refers to MIN(DOB); where he/she come from refers to Country_Name
SQL: SELECT T1.Player_Name, T2.Country_Name FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_Id ORDER BY T1.DOB LIMIT 1

Database: retails
Question: Among the suppliers providing parts under the type "promo brushed steel", how many of them are in debt?
Evidence: type "promo brushed steel" refers to p_type = 'PROMO BRUSHED STEEL'; in debt refers to s_acctbal < 0
SQL: SELECT COUNT(T3.s_name) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey WHERE T3.s_acctbal < 0 AND T1.p_type = 'PROMO BRUSHED STEEL'

Database: talkingdata
Question: How many apps are labeled 7?
Evidence: labeled 7 refers to label_id = 7;
SQL: SELECT COUNT(app_id) FROM app_labels WHERE label_id = 7

Database: public_review_platform
Question: Calculate the average review star from users in businesses located in South Carolina and California state.
Evidence: "South Carolina" and "California" are both state; average review stars from users = Divide((Sum(review_stars(state = 'SC')) + Sum(review_stars(state = 'CA'))), Sum(stars))
SQL: SELECT 1.0 * (( SELECT SUM(T1.stars) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.state = 'SC' ) + ( SELECT SUM(T1.stars) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.state = 'CA' )) / ( SELECT SUM(T1.stars) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id ) AS reslut

Database: public_review_platform
Question: Among the businesses with a category of Accessories, what is the percentage of the business with less than 4 stars?
Evidence: category of Accessories refers to category_name = 'Accessories'; percentage of the business with less than 4 stars = divide(count(Business.business_id(stars < 4)), count(Business.business_id)) * 100%
SQL: SELECT CAST(SUM(CASE WHEN T1.stars < 4 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.stars) AS "percentage" FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id WHERE T3.category_name LIKE 'Accessories'

Database: retail_world
Question: Which of Cooperativa de Quesos 'Las Cabras' products have a unit price greater than 20?
Evidence: Cooperativa de Quesos 'Las Cabras'' is a CompanyName; unit price greater than 20 refers to UnitPrice > 20
SQL: SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName LIKE 'Cooperativa de Quesos%' AND T1.UnitPrice > 20

Database: movie_3
Question: Who are the actors that act in the ACADEMY DINOSAUR film?
Evidence: Who are the actors refers to full name; full name refers to first_name, last_name; 'ACADEMY DINOSAUR' is a title of a film
SQL: SELECT T1.first_name, T1.last_name FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'ACADEMY DINOSAUR'

Database: retail_world
Question: Give the full name of employee who handled the order id 10280.
Evidence: full name refers to FirstName, LastName
SQL: SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10280

Database: video_games
Question: Show the id of the game platform with the most sales in region 2.
Evidence: id of the game platform refers to game_platform_id; the most sales refers to max(num_sales); region 2 refers to region_id = '2'
SQL: SELECT T1.game_platform_id FROM ( SELECT T.game_platform_id, SUM(T.num_sales) FROM region_sales AS T WHERE T.region_id = 2 GROUP BY T.game_platform_id ORDER BY SUM(T.num_sales) DESC LIMIT 1 ) T1

Database: student_loan
Question: How many female students are enlisted in the Navy organization?
Evidence: female students refers to enlist.name who are NOT in male.name; organization refers to organ; organ = 'navy';
SQL: SELECT COUNT(name) FROM enlist WHERE organ = 'navy' AND name NOT IN ( SELECT name FROM male )

Database: retails
Question: Of the orders with a lower delivery priority, how many have an urgent priority order?
Evidence: an urgent priority order refers to o_orderkey where o_orderpriority = '1-URGENT'; earlier orderdate have higher priority in delivery; lower delivery priority refers to MAX(o_orderdate);
SQL: SELECT COUNT(o_orderkey) FROM orders WHERE o_orderpriority = '1-URGENT' GROUP BY o_orderdate ORDER BY o_orderdate DESC LIMIT 1