Database: address
Question: What are the states with an above-average female population?
Evidence: above-average female population refers to female_population > DIVIDE(SUM(female_population), COUNT(state));
SQL: SELECT DISTINCT T2.state FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T2.female_population > ( SELECT AVG(female_population) FROM zip_data )

Database: regional_sales
Question: How many sales channels does the sales team have in the Midwest?
Evidence: "Midwest" is the Region
SQL: SELECT COUNT(T1.`Sales Channel`) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.Region = 'Midwest'

Database: public_review_platform
Question: How many businesses with the category named Stadiums & Arenas are rated highest?
Evidence: rated highest refers to MAX(stars); category_name = 'Stadiums & Arenas';
SQL: SELECT COUNT(T1.business_id) FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id WHERE T2.category_name = 'Stadiums & Arenas' AND T3.stars = ( SELECT MAX(stars) FROM Business )

Database: donor
Question: What is the total donated amount for projects created by a teacher working in a school in Brooklyn?
Evidence: school in Brooklyn refers to school_city = 'Brooklyn'; total donated amount refers to donation_total;
SQL: SELECT SUM(T2.donation_total) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.school_city = 'Brooklyn'

Database: beer_factory
Question: How many transactions had Frank-Paul Santangelo made in July, 2014?
Evidence: in July, 2014 refers to SUBSTR(TransactionDate, 1, 4) = '2014' AND SUBSTR(TransactionDate, 6, 2) = '07';
SQL: SELECT COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Frank-Paul' AND T1.Last = 'Santangelo' AND STRFTIME('%Y-%m', T2.TransactionDate) = '2014-07'

Database: world
Question: What is the district of Zaanstad?
Evidence: Zaanstad is a name of city;
SQL: SELECT District FROM City WHERE name = 'Zaanstad'

Database: retail_complains
Question: What percentage of consumers from Houston disputed complaints?
Evidence: percentage = MULTIPLY(DIVIDE(SUM("Consumer disputed?" = 'Yes' AND city = 'Houston'), COUNT(client_id)), 1.0); Houston refers to city = 'Houston';
SQL: SELECT CAST(SUM(CASE WHEN T2.`Consumer disputed?` = 'Yes' AND T1.city = 'Houston' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID

Database: world
Question: Who is the head of the state where the most crowded city belongs?
Evidence: head of the state refers to HeadOfState; most crowded city refers to MAX(Population);
SQL: SELECT T1.HeadOfState FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T2.Population DESC LIMIT 1

Database: retails
Question: Among the customers from the United States, which market segment has the highest number of customers?
Evidence: the highest number of customers refer to MAX(COUNT(c_custkey)); the United States is the name of the nation which refers to n_name = 'UNITED STATES'; market segment refers to c_mktsegment;
SQL: SELECT T.c_mktsegment FROM ( SELECT T1.c_mktsegment, COUNT(T1.c_custkey) AS num FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'UNITED STATES' GROUP BY T1.c_mktsegment ) AS T ORDER BY T.num DESC LIMIT 1

Database: cookbook
Question: How many servings does the recipe with the highest unsaturated fat have?
Evidence: with the highest unsaturated fat refers MAX(SUBTRACT(total_fat, sat_fat))
SQL: SELECT COUNT(T1.title) FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id ORDER BY T2.total_fat - T2.sat_fat DESC LIMIT 1

Database: codebase_comments
Question: What are the "en" methods with solutions from repository "1093"
Evidence: en methods refers to lang = 'en'; solution refers to Solution.Id; repository refers to RepoId; RepoId = 1093;
SQL: SELECT DISTINCT T2.id FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.RepoId = 1093 AND T2.Lang = 'en'

Database: cookbook
Question: Please list the titles of all the recipes that may lead to constipation, feeling sick or stomach pain.
Evidence: may lead to constipation, feeling sick or stomach pain refers to iron > 20
SQL: SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.iron > 20

Database: retails
Question: Please list the phone numbers of all the suppliers in Germany.
Evidence: phone number refers to s_phone; Germany refers to n_name = 'Germany'
SQL: SELECT T1.s_phone FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T2.n_name = 'Germany'

Database: movielens
Question: How many distinct movies in English stars a male actor who acts the best?
Evidence: Male actors mean that a_gender = 'M'; isEnglish = 'T' means movies in English
SQL: SELECT COUNT(DISTINCT T1.actorid) FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid INNER JOIN movies AS T3 ON T2.movieid = T3.movieid WHERE T3.isEnglish = 'T' AND T1.a_gender = 'M' AND T1.a_quality = 5

Database: computer_student
Question: What is the average number of professional or master/undergraduate courses being taught by each professor?
Evidence: professional or master/undergraduate courses refers to courseLevel = 'Level_500'; average number = divide(count(taughtBy.course_id), count(taughtBy.p_id))
SQL: SELECT CAST(COUNT(T1.course_id) AS REAL) / COUNT(DISTINCT T2.p_id) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Level_500'

Database: movie_3
Question: What is the rental price per day of the most expensive children's film?
Evidence: children's film refers to name = 'Children'; average price per day of most expensive film = Max(Divide(rental_rate, rental_duration))
SQL: SELECT T1.rental_rate FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'Children' ORDER BY T1.rental_rate / T1.rental_duration DESC LIMIT 1

Database: soccer_2016
Question: Which country is the oldest player from?
Evidence: country refers to Country_Name; the oldest refers to min(DOB)
SQL: SELECT T1.Country_Name FROM Country AS T1 INNER JOIN Player AS T2 ON T2.Country_Name = T1.Country_Id WHERE T2.Country_Name IS NOT NULL ORDER BY T2.DOB LIMIT 1

Database: disney
Question: What is the Motion Picture Association of America rating for the movie featuring a villain named Turbo?
Evidence: The Motion Picture Association of America rating refers to MPAA_rating; villian = 'Turbo';
SQL: SELECT T1.MPAA_rating FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T2.movie_title = T1.movie_title WHERE T2.villian = 'Turbo'

Database: book_publishing_company
Question: How many levels are there left for Diego W Roel to reach if he/she could go to the max level for his/her position?
Evidence: max level for his position refers to max_lvl; job level refers to job_lvl; level left to reach the max = SUBTRACT(max_lvl, job_lvl)
SQL: SELECT T2.max_lvl - T1.job_lvl FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.fname = 'Diego' AND T1.minit = 'W' AND T1.lname = 'Roel'