Database: retails
Question: How many part supplies were nearly out of stock?
Evidence: supplies nearly out of stock refer to ps_partkey where ps_availqty < 10;
SQL: SELECT COUNT(ps_suppkey) FROM partsupp WHERE ps_availqty < 10

Database: olympics
Question: List out the id of event that achieve the gold medal.
Evidence: the gold medal refers to medal_name = 'Gold';
SQL: SELECT T2.event_id FROM medal AS T1 INNER JOIN competitor_event AS T2 ON T1.id = T2.medal_id WHERE T1.medal_name = 'Gold'

Database: retail_world
Question: What is the phone number for the employee in charge of the Portsmouth territory?
Evidence: phone refers to HomePhone; Portsmouth territory refers to TerritoryDescription = 'Portsmouth';
SQL: SELECT T1.HomePhone FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Portsmouth'

Database: simpson_episodes
Question: Indicate the name and category of the most recent award received by the show.
Evidence: most recent refers to MAX(year); received refers to result = 'Winner'; name of award refers to award; category refers to award_category
SQL: SELECT award, award_category FROM Award WHERE result = 'Winner' ORDER BY year DESC LIMIT 1;

Database: human_resources
Question: What is the maximum salary of position "Trainer"?
Evidence: maximum salary refers to maxsalary; Trainee is a positiontitle
SQL: SELECT maxsalary FROM position WHERE positiontitle = 'Trainee'

Database: authors
Question: What are the paper IDs of papers presented in conferences has a homepage starts with "http://www.informatik.uni-trier.de/~ley/db/conf/"?
Evidence: homepage starts with "http://www.informatik.uni-trier.de/~ley/db/conf/" refers to HomePage LIKE 'http://www.informatik.uni-trier.de/~ley/db/conf/%'
SQL: SELECT T1.Id FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.HomePage LIKE 'http://www.informatik.uni-trier.de/~ley/db/conf/%'

Database: legislator
Question: Among all the current legislators who have served for more than 4 terms, what is the percentage of them being female?
Evidence: have served for more than 4 years refers to count(bioguide) > 4; percentage = MULTIPLY(DIVIDE(SUM(gender_bio = 'F'), count(bioguide)), 100.0); female refers to gender_bio = 'F'
SQL: SELECT CAST(SUM(CASE WHEN gender_bio = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.bioguide) FROM ( SELECT T2.bioguide, T1.gender_bio FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide GROUP BY T2.bioguide HAVING COUNT(T2.bioguide) > 4 ) T3

Database: donor
Question: Please list the vendor providing resources for the projects of a school with the highest poverty level.
Evidence: highest poverty level refers to poverty_level = 'highest poverty';
SQL: SELECT T1.vendor_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.poverty_level = 'highest poverty'

Database: public_review_platform
Question: List the user ID, business ID with review length of the business which received the most likes in tips.
Evidence: business which received the most likes refers to business_id where MAX(likes);
SQL: SELECT T1.user_id, T1.business_id, T2.review_length FROM Tips AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id ORDER BY T1.likes DESC LIMIT 1

Database: food_inspection_2
Question: List the names of employees involved in an inspection with the Display of Inspection Report Summary category.
Evidence: name refers to first_name, last_name; Display of Inspection Report Summary category refers to category = 'Display of Inspection Report Summary'
SQL: SELECT DISTINCT T1.first_name, T1.last_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id INNER JOIN inspection_point AS T4 ON T3.point_id = T4.point_id WHERE T4.category = 'Display of Inspection Report Summary'

Database: authors
Question: What is the name of author with the ID of 1722?
SQL: SELECT Name FROM Author WHERE Id = 1722

Database: university
Question: Among universities that score below 80 in 2015, what is the percentage of international students?
Evidence: score below 80 refers to score < 80; in 2015 refers to year 2015; percentage of international students refers to DIVIDE(SUM(DIVIDE(MULTIPLY(num_students, pct_international_students), 100)), SUM(num_students))
SQL: SELECT SUM(CAST(T1.num_students * T1.pct_international_students AS REAL) / 100) / COUNT(*) * 100 FROM university_year AS T1 INNER JOIN university_ranking_year AS T2 ON T1.university_id = T2.university_id WHERE T2.score < 80 AND T1.year = 2015

Database: movie_platform
Question: Please list the titles of the movie lists user 32172230 created when he or she was eligible for trial.
Evidence: the user was eligible for trail when he created the list refers to user_eligile_for_trail = 1; user 32172230 refers to user_id = 32172230;
SQL: SELECT T1.list_title FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.user_id = 32172230 AND T2.user_eligible_for_trial = 1

Database: world_development_indicators
Question: What is the average number of passengers carried via air transport per year by Bulgaria between 1970 to 1980? Indicate the country's system of trade.
Evidence: average number refers to avg(value); passengers carried via air transport per year refers to value where IndicatorName = 'Air transport, passengers carried'; by Bulgaria refers to CountryName = 'Bulgaria'; between 1970 to 1980 refers to Year between 1970 and 1980
SQL: SELECT AVG(T1.Value), T2.SystemOfTrade FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IndicatorName = 'Air transport, passengers carried' AND T1.Year >= 1970 AND T1.Year < 1981 AND T1.CountryName = 'Bulgaria'

Database: app_store
Question: What is the average price for a dating application?
Evidence: average price = AVG(Price where Genre = 'Dating'); dating application refers to Genre = 'Dating';
SQL: SELECT AVG(Price) FROM playstore WHERE Genres = 'Dating'

Database: disney
Question: Among all Disney movies directed by Gary Trousdale, determine the percentage that earned over USD100m based on actual grossing.
Evidence: DIVIDE(COUNT(movie_title where director = 'Gary Trousdale' and total_gross > 100000000), COUNT(movie_title where director = 'Gary Trousdale')) as percentage;
SQL: SELECT CAST(COUNT(CASE WHEN CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) > 100000000 THEN T1.movie_title ELSE NULL END) AS REAL) * 100 / COUNT(T1.movie_title) FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Gary Trousdale'

Database: disney
Question: The main character Elsa is voiced by which actor and who is the director of the movie?
Evidence: Elsa is the main character of the movie which refers to hero = 'Elsa'; voiced by which actor refers to voice-actor;
SQL: SELECT T1.`voice-actor`, T3.director FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title INNER JOIN director AS T3 ON T2.movie_title = T3.name WHERE T2.hero = 'Elsa'

Database: public_review_platform
Question: Within the user who joined Yelp in 2004, explore the user ID with average star of 5 and it's review length on the business.
Evidence: user who joined Yelp in 2004 refers to user_id where user_yelping_since_year = 2014; user_average_stars = 5;
SQL: SELECT T2.user_id, T2.review_length FROM Users AS T1 INNER JOIN Reviews AS T2 ON T1.user_id = T2.user_id WHERE T1.user_yelping_since_year = 2004 AND T1.user_average_stars = 5

Database: music_tracker
Question: How many releases by the artist michael jackson are tagged "pop"?
Evidence: tag = 'pop';
SQL: SELECT COUNT(T1.groupName) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'pop' AND T1.artist = 'michael jackson'