Database: simpson_episodes
Question: How many nominations have Billy Kimball received in 2010 for The simpson 20s: Season 20?
Evidence: in 2010 refers to year = 2010; nominations refers to result = 'Nominee'
SQL: SELECT COUNT(award_id) FROM Award WHERE person = 'Billy Kimball' AND SUBSTR(year, 1, 4) = '2010' AND result = 'Nominee';

Database: car_retails
Question: Between 8/1/2003 and 8/30/2004, how many checks were issued by Mini Gifts Distributors Ltd.? Please list their check numbers.
Evidence: paymentDate BETWEEN '2003-08-01' AND '2004-08-30'; Mini Gifts Distributors Ltd. Is a customer name;
SQL: SELECT T1.checkNumber FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.paymentDate >= '2003-08-01' AND T1.paymentDate <= '2004-08-30' AND T2.customerName = 'Mini Gifts Distributors Ltd.'

Database: professional_basketball
Question: What is the first and last name of the player with the highest field goal made rate in 1973?
Evidence: in 1973 refers to year = 1973; player with highest field goal made refers to Max(Divide(fgMade, fgAttempted))
SQL: SELECT T1.firstName, T1.lastName FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE year = 1973 ORDER BY CAST(T2.fgMade AS REAL) / T2.fgAttempted DESC LIMIT 1

Database: retails
Question: How many European suppliers are there?
Evidence: European suppliers refer to s_suppkey where r_name = 'EUROPE';
SQL: SELECT COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey INNER JOIN supplier AS T3 ON T1.n_nationkey = T3.s_nationkey WHERE T2.r_name = 'EUROPE'

Database: talkingdata
Question: Please list any three events that have the longitude and latitude of 0.
SQL: SELECT event_id FROM events WHERE longitude = 0 AND latitude = 0 LIMIT 3

Database: synthea
Question: What is the id of the patient who has the longest allergy period?
Evidence: id of the patient refers to PATIENT from allergies where STOP is not null; the longest allergy period refers to MAX(SUBTRACT((SUBSTR(STOP, - 2, 1)! = '9' then substr(STOP, length(STOP) - 1) + 2000 end), (SUBSTR(START, - 2, 1) = '9' then substr(START, length(START) - 1) + 1900 else substr(START, length(START) - 1) + 2000 end)));

SQL: SELECT PATIENT FROM allergies WHERE STOP IS NOT NULL GROUP BY PATIENT ORDER BY CASE WHEN SUBSTR(STOP, -2, 1) != '9' THEN SUBSTR(STOP, LENGTH(STOP) - 1) + 2000 END - CASE WHEN SUBSTR(START, -2, 1) = '9' THEN SUBSTR(START, LENGTH(START) - 1) + 1900 ELSE SUBSTR(START, LENGTH(START) - 1) + 2000 END LIMIT 1

Database: airline
Question: Among the airports whose destination is Logan International, what is the airline id of the carrier operator with the highest delay in minutes due to security?
Evidence: destination refers to DEST; Logan International refers to Description = 'Boston, MA: Logan International'; airline id of the carrier operator refers to OP_CARRIER_AIRLINE_ID; highest delay in minutes due to security refers to MAX(SECURITY_DELAY);
SQL: SELECT T2.OP_CARRIER_AIRLINE_ID FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST WHERE T1.Description = 'Boston, MA: Logan International' AND T2.DEST = 'BOS' ORDER BY T2.SECURITY_DELAY DESC LIMIT 1

Database: movie_3
Question: Which continent is the mother country of Clarksville city in?
Evidence: "Clarksville" is the city;
SQL: SELECT T1.country FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id WHERE T2.city = 'Clarksville'

Database: car_retails
Question: Determine the email and Code of employee who are working at United State, state MA
Evidence: code of employee refers to employeeNumber; United States of America refers to country = 'USA';
SQL: SELECT T1.email, T1.employeeNumber FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T2.state = 'MA' AND T2.country = 'USA'

Database: video_games
Question: How many games in the database belong to the genre of sports?
Evidence: the genre of sports refers to genre_name = 'Sports'
SQL: SELECT COUNT(T1.id) FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T2.genre_name = 'Sports'

Database: restaurant
Question: Among the restaurants located on the street number ranges from 1000 to 2000, what is the percentage of Afghani restaurants are there?
Evidence: street number ranges from 1000 to 2000 refers to 1000 < = street_num < = 2000; Afghani restaurant refers to food_type = 'afghani'; percentage = divide(count(id_restaurant where food_type = 'afghani'), count(id_restaurant)) * 100%
SQL: SELECT CAST(SUM(IIF(T2.food_type = 'afghani', 1, 0)) AS REAL) * 100 / COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE 1000 <= T1.street_num <= 2000

Database: public_review_platform
Question: How many elite users have reviewed Yelp_Business no.1?
Evidence: Yelp_Business no.1 refers to business_id = 1
SQL: SELECT COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id INNER JOIN Reviews AS T3 ON T1.user_id = T3.user_id WHERE T3.business_id = 1

Database: cars
Question: Provide the engine displacement status of the $37443.85589 car.
Evidence: engine displacement status refers to displacement; the $37443.85589 car refers to price = 37443.85589
SQL: SELECT T1.displacement FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price = '37443.85589'

Database: talkingdata
Question: List down the labels' IDs and categories of the app ID "5758400314709850000".
SQL: SELECT T1.label_id, T2.category FROM app_labels AS T1 INNER JOIN label_categories AS T2 ON T1.label_id = T2.label_id WHERE T1.app_id = 5758400314709850000

Database: codebase_comments
Question: Please provide the id of the respository that received the most forks among the respositories that receive 21 stars.
Evidence: repository that received the most forks refers to MAX(Forks);
SQL: SELECT Id FROM Repo WHERE Stars = 21 AND Forks = ( SELECT MAX(Forks) FROM Repo WHERE Stars = 21 )

Database: public_review_platform
Question: Count the active businesses that has an attribute of BYOB with high review count.
Evidence: active business ID refers to active = 'true'; category of Food refers to category_name = 'Food'; attribute of BYOB refers to attribute_name = 'BYOB'; high review count refers to review_count = 'High'
SQL: SELECT COUNT(DISTINCT T1.business_id) FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T3.attribute_name = 'BYOB' AND T1.review_count = 'High' AND T1.active = 'true'

Database: soccer_2016
Question: In what percentage of games played at the Dr DY Patil Sports Academy venue did the winning team win by a margin of less than 10?
Evidence: Dr DY Patil Sports Academy venue refers to Venue_Name = 'Dr DY Patil Sports Academy'; win by a margin of less than 10 refers to Win_Margin < 10; percentage = divide(count(Venue_Id) when Win_Margin < 10, sum(Venue_Id)) as percentage
SQL: SELECT CAST(COUNT(CASE WHEN T2.Win_Margin < 10 THEN 1 ELSE 0 END) AS REAL) * 100 / TOTAL(T1.Venue_Id) FROM Venue AS T1 INNER JOIN Match AS T2 ON T1.Venue_Id = T2.Venue_Id WHERE T1.Venue_Name = 'Dr DY Patil Sports Academy'

Database: sales_in_weather
Question: How many units of item no.5 were sold in store no.3 on the day in 2012 when the max temperature was the highest?
Evidence: item no.5 refers to item_nbr = 5; store no. 3 refers to store_nbr = 3; when the max temperature was highest refers to Max(tmax); in 2012 refers to SUBSTR(date, 1, 4) = '2012'
SQL: SELECT T1.units FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND SUBSTR(T1.`date`, 1, 4) = '2012' AND T1.item_nbr = 5 ORDER BY tmax DESC LIMIT 1