Database: retails
Question: Calculate the percentage of part supply that costs more than 500.
Evidence: DIVIDE(COUNT(ps_suppkey where ps_supplycost > 500)), COUNT(ps_suppkey) as percentage;
SQL: SELECT CAST(SUM(IIF(ps_supplycost > 500, 1, 0)) AS REAL) * 100 / COUNT(ps_suppkey) FROM partsupp

Database: car_retails
Question: Compared with the orders happened on 2005-04-08 and two days later, which day's order had a higher value?
Evidence: 2005-04-08 and two days later refer to orderDate = '2005-04-08' and orderDate = '2005-04-10'; order with a higher value refers to MAX(Total price) = MULTIPLY(quantityOrdered, priceEach); 
SQL: SELECT T2.orderDate FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.orderNumber WHERE STRFTIME('%Y-%m-%d', T2.orderDate) = '2005-04-08' OR STRFTIME('%Y-%m-%d', T2.orderDate) = '2005-04-10' ORDER BY T1.quantityOrdered * T1.priceEach DESC LIMIT 1

Database: soccer_2016
Question: Of the wickets taken in the third overs, how many are without the involvement of fielders?
Evidence: third overs refers to Over_Id = 3; without the involvement of fielders refers to Fielders = ''
SQL: SELECT SUM(CASE WHEN Fielders = '' THEN 1 ELSE 0 END) FROM Wicket_Taken WHERE Over_Id = 3

Database: retail_world
Question: List the full name of employees and titles who have to report to Sales Manager.
Evidence: Sales Manager refers to Title = 'Sales Manager'; full name refers to FirstName, LastName
SQL: SELECT FirstName, LastName, Title FROM Employees WHERE ReportsTo = ( SELECT EmployeeID FROM Employees WHERE Title = 'Sales Manager' )

Database: computer_student
Question: How many teachers are faculty employees?
Evidence: teachers refers to professor = 1; faculty employees refers to hasPosition = 'Faculty_eme'
SQL: SELECT COUNT(*) FROM person WHERE hasPosition = 'Faculty_eme'

Database: talkingdata
Question: What is the device model of the device used by the oldest user?
Evidence: oldest user refers to MAX(age);
SQL: SELECT device_model FROM phone_brand_device_model2 WHERE device_id IN ( SELECT device_id FROM gender_age WHERE age = ( SELECT MAX(age) FROM gender_age ) )

Database: mental_health_survey
Question: Please list all the answers to the question "Any additional notes or comments" that are not null in 2014's survey.
Evidence: question refers to questiontext; the answers that are not null refers to AnswerText ! = -1

SQL: SELECT T2.AnswerText FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID WHERE T1.questiontext = 'Any additional notes or comments' AND T2.SurveyID = 2014 AND T2.AnswerText <> -1

Database: restaurant
Question: List every city in San Mateo County.
SQL: SELECT city FROM geographic WHERE county = 'san mateo county'

Database: airline
Question: Which flight carrier operator has the most cancelled flights?
Evidence: flight carrier operator refers to OP_CARRIER_AIRLINE_ID; most cancelled flights refers to MAX(COUNT(CANCELLED = 1));
SQL: SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID ORDER BY T2.CANCELLED DESC LIMIT 1

Database: chicago_crime
Question: Who is the commanding officer in the district with the highest number of reported crimes where no arrest has been made?
Evidence: where no arrest refers to arrest = 'FALSE'; highest number of crime refers to Max(Count(report_no)); commanding officer refers to commander
SQL: SELECT T2.commander FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no WHERE T1.arrest = 'FALSE' GROUP BY T2.commander ORDER BY COUNT(T1.report_no) DESC LIMIT 1

Database: movie
Question: Among the actors who starred in the movie Batman, which one of them is the tallest?
Evidence: movie Batman refers to title = 'Batman'; tallest refers to max(height_inches)
SQL: SELECT T3.Name FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Title = 'Batman' ORDER BY T3.`Height (Inches)` DESC LIMIT 1

Database: university
Question: What is the ID of the university that has only 1% of international students between 2011 to 2015?
Evidence: has only 1% of international students refers to pct_international_students = 1; between 2011 to 2015 refers to year BETWEEN 2011 AND 2015; ID of university refers to university_id
SQL: SELECT university_id FROM university_year WHERE pct_international_students = 1 AND year BETWEEN 2011 AND 2015

Database: european_football_1
Question: How many football divisions does England have?
Evidence: England is the name of country;
SQL: SELECT COUNT(division) FROM divisions WHERE country = 'England'

Database: movie_3
Question: List the actor's last name that starred the film with the description of "A Thoughtful Drama of a Composer And a Feminist who must Meet a Secret Agent in The Canadian Rockies".
SQL: SELECT T1.last_name FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.description = 'A Thoughtful Drama of a Composer And a Feminist who must Meet a Secret Agent in The Canadian Rockies'

Database: simpson_episodes
Question: How many keywords does the episode that was aired on 2008/10/19 have?
Evidence: aired on 2008/10/19 refers to air_date = '2008-10-19'
SQL: SELECT COUNT(T2.keyword) FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.air_date = '2008-10-19';

Database: soccer_2016
Question: Provide match ID which had the extra type of penalty.
Evidence: extra type of penalty refers to Extra_Name = 'penalty';
SQL: SELECT T1.Match_Id FROM Extra_Runs AS T1 INNER JOIN Extra_Type AS T2 ON T1.Extra_Type_Id = T2.Extra_Id WHERE T2.Extra_Name = 'penalty'

Database: chicago_crime
Question: How many cases have been arrested among the crimes that happened in the restaurant of Englewood?
Evidence: arrested refers to arrest = 'TRUE'; restaurant refers to location_description = 'RESTAURANT'; Englewood refers to district_name = 'Englewood'
SQL: SELECT SUM(CASE WHEN T1.arrest = 'TRUE' THEN 1 ELSE 0 END) FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no WHERE T2.district_name = 'Englewood' AND T1.location_description = 'RESTAURANT'

Database: world_development_indicators
Question: What are the sources for the data of children who finished primary school education in North American countries?
Evidence: North American is the name of the region; sources refer to Description; children who finished primary school education refer to IndicatorName = 'Out-of-school children of primary school age, both sexes (number)';
SQL: SELECT DISTINCT T3.Description FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode INNER JOIN CountryNotes AS T3 ON T2.CountryCode = T3.Countrycode WHERE T1.Region = 'North America' AND T2.IndicatorName = 'Out-of-school children of primary school age, both sexes (number)'

Database: donor
Question: Show the school id for the project 'Virtual Aquarium Needs Help!'.
Evidence: Virtual Aquarium Needs Help!' is the title;
SQL: SELECT T2.schoolid FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Virtual Aquarium Needs Help!'

Database: student_loan
Question: List out the number of female students who enlisted in the air force.
Evidence: enlisted in the air force refers to organ = 'air_force';
SQL: SELECT COUNT(name) FROM enlist WHERE organ = 'air_force' AND name NOT IN ( SELECT name FROM male )

Database: student_loan
Question: What are the names of the students who joined the Marines?
Evidence: Marines refers to organ = 'marines';
SQL: SELECT name FROM enlist WHERE organ = 'marines'

Database: computer_student
Question: How many courses were taught by more than 4 people?
Evidence: courses refers to taughtBy.course_id; more than 4 people refers to count(taughtBy.p_id) > 4
SQL: SELECT COUNT(*) FROM ( SELECT COUNT(course_id) FROM taughtBy GROUP BY course_id HAVING COUNT(course_id) > 4 )