Database: menu
Question: Please list the IDs of all the menus in which the dish "Clear green turtle" had appeared.
Evidence: Clear green turtle is a name of dish;
SQL: SELECT T1.menu_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 = 'Clear green turtle'

Database: human_resources
Question: What is the full office location address where most of the employees work at?
Evidence: full office location address = address, locationcity, state, zipcode; location where most employees work at refers to MAX(locationID)
SQL: SELECT T2.address, T2.locationcity, T2.state, T2.zipcode FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID GROUP BY T2.address, T2.locationcity, T2.state, T2.zipcode ORDER BY COUNT(*) DESC LIMIT 1

Database: cars
Question: Provide the ID of cars from Japan worth greater than 35000 and have an acceleration of 14.
Evidence: from Japan refers to country = 'Japan'; worth greater than 35000 refers to price > 35000; have an acceleration of 14 refers to acceleration = 14
SQL: SELECT T4.ID FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country INNER JOIN data AS T4 ON T4.ID = T1.ID WHERE T3.country = 'Japan' AND T1.price > 3500 AND T4.acceleration = 14

Database: college_completion
Question: How many more students in total graduated from Central Alabama Community College in 2012 than in 2011?
Evidence: how many more = SUBTRACT(SUM(grad_cohort WHERE year = 2012)), (sum(grad_cohort WHERE year = 2011)); Central Alabama Community College refers to chronname = 'Central Alabama Community College'; in 2012 refers to year = 2012; in 2011 refers to year = 2011;
SQL: SELECT SUM(CASE WHEN T2.year = 2012 THEN T2.grad_cohort ELSE 0 END) - SUM(CASE WHEN T2.year = 2011 THEN T2.grad_cohort ELSE 0 END) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname = 'Central Alabama Community College'

Database: student_loan
Question: How many students enlisted in the fire-department?
Evidence: enlisted in the fire-department refers to organ = 'fire_department';
SQL: SELECT COUNT(name) FROM enlist WHERE organ = 'fire_department'

Database: professional_basketball
Question: Which state has the most players selected as all stars?
Evidence: state refers to birthState; the most players refers to max(count(playerID))
SQL: SELECT T1.birthState FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID GROUP BY T1.birthState ORDER BY COUNT(DISTINCT T1.playerID) DESC LIMIT 1

Database: legislator
Question: List down the open secrets and thomas ID of the democrat senators of New Jersey.
Evidence: open secrets refers to opensecrets_id; democrat refers to party = democrat; senators refers to type = 'sen'; New Jersey refers to state = 'NJ';
SQL: SELECT T1.opensecrets_id, T1.thomas_id FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.type = 'sen' AND T2.state = 'NJ' GROUP BY T1.opensecrets_id, T1.thomas_id

Database: legislator
Question: How many current legislators were born after the year 1960?
Evidence: born after the year 1960 refers to birthday_bio > '1960-01-01'
SQL: SELECT COUNT(bioguide_id) FROM current WHERE birthday_bio >= '1961-01-01'

Database: retail_world
Question: Find the percentage of discontinued products in Northwind's portfolio of products.
Evidence: discontinued products refers to Discontinued = 1; calculation = DIVIDE(SUM(Discontinued = 1), COUNT(ProductID)) * 100
SQL: SELECT CAST(COUNT(CASE WHEN Discontinued = 1 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(ProductID) FROM Products

Database: public_review_platform
Question: How many cities have businesses with active life category? Find the percentage of the city where the review count that is low in total review count.
Evidence: category refers to category_name; percentage = MULTIPLY(DIVIDE(SUM(category_name = 'Active Life'), SUM(review_count = 'LOW')), 1.0);
SQL: SELECT SUM(CASE WHEN T2.category_name LIKE 'Active Life' THEN 1 ELSE 0 END) AS "num" , CAST(SUM(CASE WHEN T3.city LIKE 'Phoenix' THEN 1 ELSE 0 END) AS REAL) * 100 / ( SELECT COUNT(T3.review_count) 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 T3.review_count LIKE 'Low' ) 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

Database: university
Question: What is the university ID with the most students in 2011?
Evidence: most students refers to MAX(num_students), in 2011 refers to year = 2011
SQL: SELECT university_id FROM university_year WHERE year = 2011 ORDER BY num_students DESC LIMIT 1

Database: coinmarketcap
Question: What's the percentage of coins that is higher than the price 1 hour ago in May 29,2013? List the names of these coins.
Evidence: percentage that is higher than the price 1 hour ago refers to percent_change_1h>0; in May 29,2013 refers to date = '2013-05-29'
SQL: SELECT T1.NAME FROM coins AS T1 INNER JOIN historical AS T2 ON T1.ID = T2.coin_id WHERE T2.DATE = '2013-05-29' AND T2.percent_change_1h > 0

Database: food_inspection_2
Question: Calculate the total salary for employees who did inspection from ID 52270 to 52272.
Evidence: inspection from ID 52270 to 52272 refers to inspection_id between 52270 and 52272
SQL: SELECT SUM(T2.salary) FROM inspection AS T1 INNER JOIN employee AS T2 ON T1.employee_id = T2.employee_id WHERE T1.inspection_id BETWEEN 52270 AND 52272

Database: food_inspection_2
Question: When did restaurant John Schaller has its first inspection in 2010?
Evidence: John Schaller refers to dba_name = 'JOHN SCHALLER'; first inspection refers to min(inspection_date); in 2010 refers to inspection_date like '2010%'
SQL: SELECT MIN(T2.inspection_date) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.dba_name = 'JOHN SCHALLER' AND strftime('%Y', T2.inspection_date) = '2010'

Database: app_store
Question: How much is the size of Browser 4G and how many users have a pretty positive favorability on it?
Evidence: Browser 4G is the App; pretty positive favorability refers to Sentiment_Polarity score = 0.5
SQL: SELECT T1.Size, COUNT(T1.App) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Browser 4G' AND T2.Sentiment_Polarity >= 0.5

Database: soccer_2016
Question: How many matches did Rajasthan Royals play in Season 8?
Evidence:  Season 8 refers to Season_Id = 8
SQL: SELECT SUM(CASE WHEN T1.Season_Id = 8 THEN 1 ELSE 0 END) FROM `Match` AS T1 INNER JOIN Team AS T2 ON T1.Team_1 = T2.Team_Id OR T1.Team_2 = T2.Team_Id WHERE T2.Team_Name = 'Rajasthan Royals'

Database: synthea
Question: How many of the patients who have stopped taking medication for 'coronary heart disease' are still alive?
Evidence: patients who have stopped taking medication for 'coronary heart disease' refer to PATIENT where REASONDESCRIPTION = 'Coronary Heart Disease' and STOP is not null from medications; if deathdate is null, it means this patient is still alive;
SQL: SELECT COUNT(DISTINCT T2.patient) FROM medications AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.REASONDESCRIPTION = 'Coronary Heart Disease' AND T1.STOP IS NOT NULL AND T2.deathdate IS NULL

Database: chicago_crime
Question: Among the crimes with no arrest made, how many of them happened in the ward represented by alderman Pat Dowell?
Evidence: no arrest has been made refers to arrest = 'FALSE'
SQL: SELECT SUM(CASE WHEN T1.alderman_last_name = 'Dowell' THEN 1 ELSE 0 END) FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE T2.arrest = 'FALSE' AND T1.alderman_first_name = 'Pat'