Database: public_review_platform
Question: Among the Yelp_Businesses which are still running, how many of them fall under the category of "Food"?
Evidence: are still running refers to active = 'true'; the category of "Food" refers to category_name = 'Food'
SQL: SELECT COUNT(T3.business_id) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id INNER JOIN Tips AS T4 ON T3.business_id = T4.business_id WHERE T1.category_name LIKE 'Food' AND T3.active LIKE 'TRUE'

Database: bike_share_1
Question: When was the bike station from which the bike was borrowed on trip ID4069 installed?
Evidence: bike was borrowed from refers to start_station_id; when the bike station was installed refers to installation_date;
SQL: SELECT T2.installation_date FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.id = 4069

Database: simpson_episodes
Question: Among the episodes aired on April of 2009, how many episodes won an award?
Evidence: aired on refers to air_date, April refers to SUBSTR(air_date, 6, 2) = '04'; 2009 refers to SUBSTR (air_date, 0, 5) = '2009'
SQL: SELECT COUNT(T1.episode_id) FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE SUBSTR(T1.year, 1, 4) = '2009' AND T2.air_date LIKE '2009-04%';

Database: student_loan
Question: What is the total number of students in the school?
SQL: SELECT COUNT(name) FROM person

Database: talkingdata
Question: What is the average age of the users who use model device of R7?
Evidence: average age = AVG(age);
SQL: SELECT SUM(T1.age) / COUNT(T1.device_id) AS avg FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.device_model = 'R7'

Database: simpson_episodes
Question: In Season 20 Episode 11, how many times was Doofus included in the credit list?
Evidence: in Season 20 Episode 11 refers to episode_id = 'S20-E11'; 'Doofus' is the nickname of person; include in credit list refers to credited = 'true'
SQL: SELECT COUNT(*) FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T1.nickname = 'Doofus' AND T2.credited = 'true' AND T2.episode_id = 'S20-E11';

Database: retails
Question: Which supplier can provide the most number of "hot spring dodger dim light"? Please give the supplier's phone number.
Evidence: the most number refers to max(ps_availqty); "hot spring dodger dim light" refers to p_name = 'hot spring dodger dim light'; phone number refers to s_phone
SQL: SELECT T3.s_phone FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey WHERE T1.p_name = 'hot spring dodger dim light' ORDER BY T2.ps_availqty DESC LIMIT 1

Database: retails
Question: Which customer is the most in debt?
Evidence: customer refers to c_name; the most in debt refers to max(c_acctbal)
SQL: SELECT c_name FROM customer WHERE c_acctbal = ( SELECT MIN(c_acctbal) FROM customer )

Database: retails
Question: How many items were shipped on 4th December, 1993?
Evidence: items shipped on 4th December, 1993 refer to l_linenumber where l_shipdate = '1993-12-04';
SQL: SELECT COUNT(l_linenumber) FROM lineitem WHERE l_shipdate = '1993-12-04'

Database: ice_hockey_draft
Question: Among the players whose total NHL games played in their first 7 years of NHL career is no less than 500, what is the name of the player who committed the most rule violations?
Evidence: total NHL games played in their first 7 years of NHL career is no less than 500 refers to sum_7yr_GP > 500; name of the player refers to PlayerName; committed the most rule violations refers to MAX(PIM);
SQL: SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.sum_7yr_GP > 500 ORDER BY T2.PIM DESC LIMIT 1

Database: books
Question: How many of the books authored by Al Gore have less than 400 pages?
Evidence: "AI Gore" is the author_name; have less than 400 pages refers to num_pages < 400
SQL: SELECT COUNT(*) FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Al Gore' AND T1.num_pages < 400

Database: simpson_episodes
Question: What are the keywords of the episodes which have the air date in 2008?
Evidence: have air date in 2008 refers to air_date LIKE '2008%'
SQL: SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE SUBSTR(T1.air_date, 1, 4) = '2008';

Database: cookbook
Question: Describe the ingredients in the recipe with the highest vitamin that helps vision in dim light.
Evidence: the highest vitamin that helps vision in dim light refers to MAX(vitamin_a)
SQL: SELECT T1.name FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id INNER JOIN Nutrition AS T3 ON T3.recipe_id = T2.recipe_id ORDER BY T3.vitamin_a DESC LIMIT 1

Database: trains
Question: Trains that run in which direction have more rectangle-shaped cars in total?
Evidence: more rectangle-shaped cars refers to MAX(rectCarsNum)
SQL: SELECT T1.direction FROM trains AS T1 INNER JOIN ( SELECT train_id, COUNT(id) AS rectCarsNum FROM cars WHERE shape = 'rectangle' GROUP BY train_id ) AS T2 ON T1.id = T2.train_id ORDER BY T2.rectCarsNum DESC

Database: world
Question: What are the districts that belong to the country with the lowest surface area?
Evidence: lowest surface area refers to MIN(SurfaceArea);
SQL: SELECT T1.District FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code ORDER BY T2.SurfaceArea ASC LIMIT 1

Database: books
Question: Which country is 9 Green Ridge Point, Arendal located at?
Evidence: "9" is the street_number; 'Green Reidge Point' is the street_name; 'Arendal' is the city
SQL: SELECT T2.country_name FROM address AS T1 INNER JOIN country AS T2 ON T2.country_id = T1.country_id WHERE T1.street_number = 9 AND T1.street_name = 'Green Ridge Point' AND T1.city = 'Arendal'

Database: movie_3
Question: Indicate the percentage of inactive customers at store no.1.
Evidence: inactive refers to active = 0; store no.1 refers to store_id = 1; percentage = divide(count(customer_id where active = 0), count(customer_id)) * 100% where store_id = 1
SQL: SELECT CAST(SUM(CASE WHEN active = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(customer_id) FROM customer WHERE store_id = 1

Database: retail_world
Question: How much higher is the salary of Andrew Fuller than that of Nancy Davolio?
Evidence: how much higher = SUBTRACT(SUM(Salary WHERE LastName = 'Fuller' and FirstName = 'Andrew'), SUM(Salary WHERE LastName = 'Davolio' and FirstName = 'Nancy'));
SQL: SELECT ( SELECT Salary FROM Employees WHERE LastName = 'Fuller' AND FirstName = 'Andrew' ) - ( SELECT Salary FROM Employees WHERE LastName = 'Davolio' AND FirstName = 'Nancy' ) AS RESULT

Database: shipping
Question: Who is the driver that transported the lightest weight of shipment? Provide the full name of the driver.
Evidence: lightest weight refers to Min(weight); full name refers to first_name, last_name
SQL: SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id ORDER BY T1.weight ASC LIMIT 1

Database: movies_4
Question: When was the first movie released?
Evidence: when the first movie refers to release_date where min(release_date)
SQL: SELECT MIN(release_date) FROM movie WHERE movie_status = 'Released'