Database: restaurant
Question: Which street in San Francisco has the most burger restaurants?
Evidence: street refers to street_name; San Francisco refers to city = 'san francisco'; burger restaurant refers to food_type = 'burgers'; the most burger restaurants refers to max(count(street_name where food_type = 'burgers' and city = 'san francisco'))
SQL: SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T1.food_type = 'burgers' GROUP BY T2.street_name ORDER BY COUNT(T2.id_restaurant) DESC LIMIT 1

Database: retails
Question: Among the products under the type "promo brushed steel", how many of them are manufactured by Manufacturer#5?
Evidence: type "promo brushed steel" refers to p_type = 'PROMO BRUSHED STEEL'; Manufacturer#5 refers to p_mfgr = 'Manufacturer#5'
SQL: SELECT COUNT(p_partkey) FROM part WHERE p_type = 'PROMO BRUSHED STEEL' AND p_mfgr = 'Manufacturer#5'

Database: synthea
Question: What is the average body weight of Asian patients?
Evidence: average = AVG(observations.VALUE WHERE observations.DESCRIPTION = 'Body Weight' AND observations.UNITS = 'kg'); body weight refers to observations.DESCRIPTION = 'Body Weight'; Asian refers to race = 'asian';
SQL: SELECT SUM(T2.VALUE) / COUNT(T1.patient) FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.race = 'asian' AND T2.DESCRIPTION = 'Body Weight' AND T2.UNITS = 'kg'

Database: movie_3
Question: Please list the titles of the top 3 films with the highest replacement cost.
Evidence: highest replacement_cost refers to Max (replacement_cost); film refers to title
SQL: SELECT title FROM film WHERE replacement_cost = ( SELECT MAX(replacement_cost) FROM film ) LIMIT 3

Database: disney
Question: Which character is the villain of the most popular movie?
Evidence: the most popular movie refers to movie_title where MAX(total_gross);
SQL: SELECT T2.villian FROM `movies_total_gross` AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title ORDER BY T1.total_gross DESC LIMIT 1

Database: soccer_2016
Question: How many matches did team Mumbai Indians win in 2008?
Evidence: team Mumbai Indians refers to Team_Name = 'Mumbai Indians'; in 2008 refers to Match_Date like '2008%'
SQL: SELECT COUNT(T.Match_Id) FROM ( SELECT T2.Match_Id FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner INNER JOIN Player_Match AS T3 ON T1.Team_Id = T3.Team_Id WHERE T1.Team_Name = 'Mumbai Indians' AND T2.Match_Date LIKE '2008%' GROUP BY T2.Match_Id ) T

Database: sales
Question: Among customers named Kate, who has the highest quantity?
Evidence: highest quantity refers to MAX(Quantity);
SQL: SELECT T2.FirstName, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.FirstName = 'Kate' ORDER BY T1.Quantity DESC LIMIT 1

Database: video_games
Question: How many games were released in the year 2001?
Evidence: released in the year 2001 refers to release_year = 2001;
SQL: SELECT COUNT(id) FROM game_platform AS T WHERE T.release_year = 2001

Database: talkingdata
Question: Among the male users, how many users use device model of Desire 820?
Evidence: male refers to gender = 'M';
SQL: SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.device_model = 'Desire 820' AND T1.gender = 'M'

Database: movie_3
Question: List down all of the film IDs with highest rental duration.
Evidence: highest rental duration refers to max(rental_duration)
SQL: SELECT film_id FROM film WHERE rental_duration = ( SELECT MAX(rental_duration) FROM film )

Database: retails
Question: Lists all parts supplied by Supplier#000000034.
Evidence: part refers to p_name; Supplier#000000034 refers to s_name = 'Supplier#000000034'
SQL: SELECT T3.p_name FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T2.s_name = 'Supplier#000000034'

Database: simpson_episodes
Question: What is The simpson 20s: Season 20 average awards winning rate?
Evidence: average awards winning rate refers to DIVIDE(SUM(result = 'winner'), COUNT(award));
SQL: SELECT CAST(SUM(CASE WHEN result = 'Winner' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(award) AS rate FROM Award;

Database: donor
Question: How many schools in Brooklyn with urban metro and donations for an honoree have requested TT992 - Refill Pack for Safety Name Tags as a resource?
Evidence: in Brooklyn refers to school_city = 'Brooklyn'; urban metro refers to school_metro = 'urban'; donations for an honoree refers to for_honoree = 't'; requested TT992 - Refill Pack for Safety Name Tags refers to item_name = 'TT992 - Refill Pack for Safety Name Tags'
SQL: SELECT COUNT(T2.schoolid) FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid WHERE T2.school_city = 'Brooklyn' AND T2.school_metro = 'urban' AND T3.for_honoree = 't' AND T1.item_name = 'TT992 - Refill Pack for Safety Name Tags'

Database: airline
Question: Among the flights with air carrier "Southwest Airlines Co.: WN", provide the tail number of flights with an actual elapsed time lower than the 80% of the average actual elapsed time of listed flights.
Evidence: Southwest Airlines Co.: WN refers to Description = 'Southwest Airlines Co.: WN'; tail number refers to TAIL_NUM; actual elapsed time lower than the 80% of the average actual elapsed time refers to ACTUAL_ELAPSED_TIME < (MULTIPLY AVG(ACTUAL_ELAPSED_TIME), 0.8);
SQL: SELECT T2.TAIL_NUM FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Southwest Airlines Co.: WN' AND T2.ACTUAL_ELAPSED_TIME < ( SELECT AVG(ACTUAL_ELAPSED_TIME) * 0.8 FROM Airlines )

Database: language_corpus
Question: Among the title with single digit word count, list down 5 revision page ID of these titles.
Evidence: single digit word count refers to words < 10
SQL: SELECT revision FROM pages WHERE words < 10 LIMIT 5

Database: regional_sales
Question: How much more is the Florida store's computer product unit price than the Texas store?
Evidence: "Florida" and "Texas" are both the name of State; Computer product refers to Product Name = 'Computers; difference in unit price = Subtract (Unit Price where State = 'Florida', Unit Price where State = 'Texas')
SQL: SELECT SUM(CASE WHEN T3.State = 'Florida' THEN T2.`Unit Price` ELSE 0 END) - SUM(CASE WHEN T3.State = 'Texas' THEN T2.`Unit Price` ELSE 0 END) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID INNER JOIN `Store Locations` AS T3 ON T3.StoreID = T2._StoreID WHERE T1.`Product Name` = 'Computers'

Database: public_review_platform
Question: For users with average ratings of 3, what kind of tip length they mostly left?
Evidence: average ratings of 3 refer to user_average_stars = 3; kind of tip length they mostly left refers to tip_length where MAX(COUNT(user_id));
SQL: SELECT T2.tip_length FROM Users AS T1 INNER JOIN Tips AS T2 ON T1.user_id = T2.user_id WHERE T1.user_average_stars = 3 GROUP BY T2.tip_length ORDER BY COUNT(T2.tip_length) DESC LIMIT 1

Database: donor
Question: Among the schools donated by donor "000eebf28658900e63b538cf8a73afbd",how many schools whose poverty level are highest?
Evidence: donor "000eebf28658900e63b538cf8a73afbd" refers to donor_acctid = '000eebf28658900e63b538cf8a73afbd'; highest poverty level refers to poverty_level = 'highest poverty';
SQL: SELECT COUNT(T1.schoolid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.poverty_level = 'highest poverty' AND T2.donor_acctid = '000eebf28658900e63b538cf8a73afbd'