Database: world_development_indicators
Question: How many nations in East Asia and the Pacific have completed their external debt reporting on time?
Evidence: in East Asia and the Pacific refers to region = 'East Asia & Pacific'; have completed their external debt reporting on time refers to ExternalDebtReportingStatus = 'Estimate'
SQL: SELECT COUNT(CountryCode)  FROM Country WHERE Region = 'East Asia & Pacific' AND ExternalDebtReportingStatus = 'Estimate'

Database: restaurant
Question: Which street has the most restaurants?
Evidence: street refers to street_name; the most restaurants refers to max(count(street_name))
SQL: SELECT street_name FROM location GROUP BY street_name ORDER BY COUNT(street_name) DESC LIMIT 1

Database: mental_health_survey
Question: What is the oldest age of the users in 2014's survey?
Evidence: what is your age? refer to QuestionText; 2014 refer to SurveyID; oldest age refers to MAX(AnswerText)


SQL: SELECT T2.AnswerText FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID WHERE T1.questiontext = 'What is your age?' AND T2.SurveyID = 2014 ORDER BY T2.AnswerText DESC LIMIT 1

Database: public_review_platform
Question: Which business ID has the most reviews?
Evidence: the most reviews refer to MAX(user_id);
SQL: SELECT business_id FROM Reviews GROUP BY business_id ORDER BY COUNT(user_id) DESC LIMIT 1

Database: image_and_language
Question: What is the percentage of "surface" object samples in image No.2654?
Evidence: DIVIDE(SUM(OBJ_CLASS_ID where OBJ_CLASS = 'surface'), COUNT(OBJ_CLASS_ID)) as percentage where IMG_ID = 2654;
SQL: SELECT CAST(SUM(CASE WHEN T2.OBJ_CLASS = 'surface' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OBJ_CLASS_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 2654

Database: regional_sales
Question: Indicate order numbers with an order date after 1/1/2018.
Evidence: order date after 1/1/2018 refers to OrderDate > '1/1/2018'
SQL: SELECT DISTINCT T FROM ( SELECT CASE  WHEN OrderDate > '1/1/18' THEN OrderNumber ELSE NULL END AS T FROM `Sales Orders` ) WHERE T IS NOT NULL

Database: public_review_platform
Question: How many businesses in Glendale are reviewed by user with the ID of 20241?
Evidence: in Glendale refers to city = 'Glendale'
SQL: SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Glendale' AND T2.user_id = 20241

Database: world_development_indicators
Question: In 1970, how many Middle Eastern & North African countries whose value for CO2 emissions from gaseous fuel consumption (kt) indicator is more than 600?
Evidence: Year = 1970; Middle East & North Africa is the name of the region where Region = 'Middle East & North Africa'; CO2 emissions from gaseous fuel consumption (kt) is the name of indicator where IndicatorName = 'CO2 emissions from gaseous fuel consumption (kt)'
SQL: SELECT COUNT(T2.CountryCode)  FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Region = 'Middle East & North Africa' AND T1.IndicatorName = 'CO2 emissions FROM gaseous fuel consumption (kt)' AND T1.Year = 1970 AND T1.Value > 600

Database: olympics
Question: Which region has the most athletes?
Evidence: region refers to region_name; the most athletes refer to MAX(COUNT(region_name));
SQL: SELECT T2.region_name FROM person_region AS T1 INNER JOIN noc_region AS T2 ON T1.region_id = T2.id GROUP BY T2.region_name ORDER BY COUNT(T1.person_id) DESC LIMIT 1

Database: movielens
Question: Please calculate negative critical reception of American movies
Evidence: 'negative critical reception' refers to percentage of movies with a rating of 1, which = [count(rating = 1) / count(all movies)] * 100% 
SQL: SELECT CAST(SUM(IIF(T1.rating = 1, 1, 0)) AS REAL) * 100 / COUNT(T1.movieid) FROM u2base AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.country = 'USA'

Database: retail_complains
Question: What is the percentage of female clients in the Middle Atlantic?
Evidence: female refers to sex = 'Female'; the Middle Atlantic refers to division = 'Middle Atlantic'; percentage = divide(count(client_id where sex = 'Female' and division = 'Middle Atlantic') , count(client_id where division = 'Middle Atlantic')) * 100%
SQL: SELECT CAST(SUM(CASE WHEN T1.sex = 'Female' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.sex) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.division = 'South Atlantic'

Database: bike_share_1
Question: What is the ratio of customer to subscriber that making a trip inside Mountain View city?
Evidence: customer refers to subscription_type = 'customer'; subscriber refers to subscription_type = 'subscriber'; ratio = MULTIPLY(DIVIDE(COUNT(subscription_type = 'Customer'), COUNT(subscription_type = 'Subscriber'). 1.0)) AS ratio;
SQL: SELECT CAST(SUM(CASE WHEN T1.subscription_type = 'Customer' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T1.subscription_type = 'Subscriber' THEN 1 ELSE 0 END) FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.city = 'Mountain View'

Database: movielens
Question: Calculate the percentage of female actors and quality 2 who have appeared twice at the casting of the film 1672580.
Evidence: Female actors mean that a_gender = 'F'; percentage can be computed by [cast_num = 2 AND a_quality = 2 in female) / (all female actors)] * 100%
SQL: SELECT CAST(SUM(IIF(T2.cast_num = 2 AND T1.a_quality = 2, 1, 0)) AS REAL) * 100 / COUNT(T1.actorid) FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid WHERE T2.movieid = 1672580 AND T1.a_gender = 'F'

Database: public_review_platform
Question: Calculate the percentage of businesses who located in Mesa. What is attribute value of these businesses.
Evidence: percentage = divide(count(business where city = 'Mesa'), count(business)) * 100%
SQL: SELECT CAST(COUNT(T1.city) AS REAL) * 100 / ( SELECT COUNT(business_id) FROM Business ), T2.attribute_value FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Mesa'

Database: olympics
Question: In which city was the 1992 Summer Olympic Games held?
Evidence: In which city refers to city_name; 1992 Summer Olympic Games refer to games_name = '1992 Summer';
SQL: SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T3.games_name = '1992 Summer'

Database: human_resources
Question: How many "account representatives" are there in Chicago with a good performance?
Evidence: account representatives is a position title; Chicago refers to locationcity = 'Chicago'; good performance refers to performance = 'Good'
SQL: SELECT COUNT(*) FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID INNER JOIN position AS T3  ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Account Representative' AND T2.locationcity = 'Chicago' AND T1.performance = 'Good'

Database: computer_student
Question: List the ID and years in program for students taught by advisor with ID 5.
Evidence: advisor with ID 5 refers to p_id_dummy = 5
SQL: SELECT T1.p_id, T2.yearsInProgram FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T1.p_id_dummy = 5

Database: simpson_episodes
Question: What is the awarded category that the awarded character Lenny won?
Evidence: 

awarded category refers to award_category
SQL: SELECT DISTINCT T1.award_category FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T2.character = 'Lenny';

Database: book_publishing_company
Question: Which one is the cheapest business book?
Evidence: business books refers to type = 'business'; cheapest book refers to MIN(price)
SQL: SELECT title FROM titles WHERE type = 'business' ORDER BY price LIMIT 1