Database: talkingdata
Question: What is the most common age group among all device users?
Evidence: most common age group refers to MAX(COUNT(`group`));
SQL: SELECT T.num FROM ( SELECT `group`, COUNT(`group`) AS num FROM gender_age GROUP BY `group` ) T

Database: address
Question: Provide the zip codes and CBSA officers of the postal point in Oxford.
Evidence: CBSA officers refer to CBSA_name; postal point refers to zip_code; Oxford is the city;
SQL: SELECT T2.zip_code, T1.CBSA_name FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T2.city = 'Oxford'

Database: simpson_episodes
Question: Please list all the keywords of the episode Lost Verizon.
Evidence: "Lost Verizon" is the title of episode
SQL: SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Lost Verizon';

Database: retail_world
Question: Find the total production amount and product names which had "10 - 500 g pkgs." as quantity per unit.
Evidence: total production amount refers to ADD(UnitsInstock, UnitsOnOrder)
SQL: SELECT UnitsInStock + UnitsOnOrder, ProductName FROM Products WHERE QuantityPerUnit = '10 - 500 g pkgs.'

Database: legislator
Question: How many historical legislators were born in 1973?
Evidence: born in 1973 refers to birthday_bio = 1973
SQL: SELECT COUNT(*) FROM historical WHERE CAST(birthday_bio AS date) = 1973

Database: synthea
Question: List the procedures received by Emmy Waelchi.
Evidence: procedures refer to DESCRIPTION from procedures;
SQL: SELECT T2.DESCRIPTION FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Emmy' AND T1.last = 'Waelchi'

Database: university
Question: Calculate the average number of students of all universities in 2012.
Evidence: average number of students refers to avg(num_students); in 2012 refers to year = 2012
SQL: SELECT AVG(num_students) FROM university_year WHERE year = 2012

Database: book_publishing_company
Question: In which city is the store with the highest total sales quantity located?
Evidence: qty is abbreviation for quantity; highest sales quantity refers to MAX(qty)
SQL: SELECT T2.city FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id GROUP BY T2.city ORDER BY SUM(T1.qty) DESC LIMIT 1

Database: student_loan
Question: Provide the names of the students enlisted in the fire department.
Evidence: department refers to organ; organ = 'fire_department';
SQL: SELECT name FROM enlist WHERE organ = 'fire_department'

Database: superstore
Question: Provide the names, cities, and countries of the customers who ordered the Plantronics single ear headset.
Evidence: Plantronics Single Ear Headset' is the "Product Name"; name refers to "Customer Name";
SQL: SELECT DISTINCT T2.`Customer Name`, T2.City, T2.Country FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T3.`Product Name` = 'Plantronics Single Ear Headset'

Database: chicago_crime
Question: Among the crimes happened in the neighborhood called "Avalon Park", what is the percentage of crimes that happened inside the house?
Evidence: "Avalon Park" is the neghborhood_name; happened inside the house refers to location_description = 'HOUSE'; percentage = Divide (Count(location_description = 'HOUSE'), Count(location_description)) * 100
SQL: SELECT CAST(SUM(CASE WHEN T2.location_description = 'HOUSE' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.location_description) AS persent FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no INNER JOIN Neighborhood AS T3 ON T2.community_area_no = T3.community_area_no WHERE T3.neighborhood_name = 'Avalon Park'

Database: language_corpus
Question: Please list all the biwords pairs with "àbac" as its first word.
Evidence: àbac refers to word = 'àbac'; first word refers to w1st
SQL: SELECT T1.word AS W1, T3.word AS W2 FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st INNER JOIN words AS T3 ON T3.wid = T2.w2nd WHERE T1.word = 'àbac'

Database: law_episode
Question: What is the title of the episode that got the most 10-star votes?
Evidence: the most refers to max(votes); 10-star refers to stars = 10
SQL: SELECT T1.title FROM Episode AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id WHERE T2.stars = 10 ORDER BY T2.votes DESC LIMIT 1

Database: synthea
Question: What kind of allergy is most common among white people?
Evidence: kind of allergy is most common refers to MAX(COUNT(DESCRIPTION)) from allergies; white refers to race = 'white';
SQL: SELECT T2.DESCRIPTION FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T1.race = 'white' GROUP BY T2.DESCRIPTION ORDER BY COUNT(T2.DESCRIPTION) DESC LIMIT 1

Database: menu
Question: Among the menu pages on which the dish "Chicken gumbo" had appeared, what is the menu ID of the one with the biggest width?
Evidence: Chicken gumbo is a name of dish; biggest width refers to MAX(full_width);
SQL: SELECT T1.id FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id INNER JOIN Dish AS T3 ON T2.dish_id = T3.id WHERE T3.name = 'Chicken gumbo' ORDER BY T1.full_width DESC LIMIT 1

Database: bike_share_1
Question: How many subscribers are in the zip code of 94301 and what is the hottest temperature recorded on that zip code?
Evidence: hottest temperature refers to MAX(max_temperature_f);
SQL: SELECT COUNT(T3.zip_code), T3.max_temperature_f FROM trip AS T2 INNER JOIN weather AS T3 ON T3.zip_code = T2.zip_code WHERE T3.zip_code = 94301 AND T2.subscription_type = 'Subscriber' ORDER BY T3.max_temperature_f DESC LIMIT 1

Database: app_store
Question: List the top 5 shopping apps with the most reviews.
Evidence: shopping apps refers to Genre = 'Shopping'; most reviews refers to MAX(Reviews);
SQL: SELECT DISTINCT App FROM playstore WHERE Genres = 'Shopping' GROUP BY App ORDER BY COUNT(App) DESC LIMIT 5

Database: professional_basketball
Question: What division did the team coached by the winner of the 1977 NBA Coach of the Year award play in in 1976?
Evidence: "NBA Coach of the Year" is the award; in 1977 refers to year = 1977; in 1976 refers to year = 1976; division refers to divisionID
SQL: SELECT DISTINCT T3.divID FROM awards_coaches AS T1 INNER JOIN coaches AS T2 ON T1.coachID = T2.coachID INNER JOIN teams AS T3 ON T2.tmID = T3.tmID WHERE T1.year = 1977 AND T1.award = 'NBA Coach of the Year' AND T3.year = 1976

Database: retails
Question: Among the customers in Asia, how many customers are in debt?
Evidence: customers in Asia refer to n_name where r_name = 'ASIA'; customers in debt refer to c_acctbal < 0;
SQL: SELECT COUNT(T1.n_name) FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.c_acctbal < 0 AND T3.r_name = 'ASIA'

Database: retail_complains
Question: Among the female clients that age between 20 to 40, list the date when their complaints were received.
Evidence: female refers to sex = 'Female'
SQL: SELECT DISTINCT T3.`Date received` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID INNER JOIN callcenterlogs AS T3 ON T2.`Complaint ID` = T3.`Complaint ID` WHERE T1.age BETWEEN 20 AND 40 AND T1.sex = 'Female'

Database: address
Question: Among the postal points in the District of Columbia, how many of them have an area with above 20000 black population?
Evidence: District of Columbia refers to county = 'DISTRICT OF COLUMBIA'; postal points refer to zip_code; area with above 20000 black population refers to black_population > 20000;
SQL: SELECT COUNT(T1.zip_code) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.county = 'DISTRICT OF COLUMBIA' AND T2.black_population > 20000