Database: computer_student
Question: List the course IDs and levels of person IDs from 40 to 50.
Evidence: course IDs and levels refers to course.course_id and courseLevel; person IDs from 40 to 50 refers to taughtBy.p_id between 40 and 50
SQL: SELECT T1.course_id, T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id BETWEEN 40 AND 50

Database: student_loan
Question: What is the percentage of male students in the navy department?
Evidence: in the navy department refers to organ = 'navy'; percentage refers to DIVIDE(COUNT(name where organ = 'navy'), COUNT(name))
SQL: SELECT CAST(COUNT(T2.name) AS REAL) * 100 / COUNT(T1.name) FROM enlist AS T1 LEFT JOIN male AS T2 ON T1.`name` = T2.`name` WHERE T1.organ = 'navy'

Database: restaurant
Question: How many Thai restaurants can be found in San Pablo Ave, Albany?
Evidence: Thai restaurant refers to food_type = 'thai'; San Pablo Ave Albany refers to street_name = 'san pablo ave' AND T1.city = 'albany'
SQL: SELECT COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.food_type = 'thai' AND T1.city = 'albany' AND T2.street_name = 'san pablo ave'

Database: olympics
Question: What is the name of all the sports Chin Eei Hui has competed in?
Evidence: name of the sport refers to sport_name;
SQL: SELECT DISTINCT T1.sport_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id INNER JOIN competitor_event AS T3 ON T2.id = T3.event_id INNER JOIN games_competitor AS T4 ON T3.competitor_id = T4.id INNER JOIN person AS T5 ON T4.person_id = T5.id WHERE T5.full_name = 'Chin Eei Hui'

Database: retails
Question: What is the largest supplier's account balance?
Evidence: the largest supplier's account balance refers to max(s_acctbal)
SQL: SELECT MAX(s_acctbal) FROM supplier

Database: retails
Question: Calculate the average profit of prom brushed steel products.
Evidence: prom brushed steel refers to p_type = 'PROMO BRUSHED STEEL'; average profit = divide(sum(subtract(multiply(l_extendedprice, subtract(1, l_discount)), multiply(ps_supplycost, l_quantity))), count(ps_partkey))
SQL: SELECT SUM(T2.l_extendedprice * (1 - T2.l_discount) - T1.ps_supplycost * T2.l_quantity) / COUNT(T1.ps_partkey) FROM partsupp AS T1 INNER JOIN lineitem AS T2 ON T1.ps_suppkey = T2.l_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T3.p_type = 'PROMO BRUSHED STEEL'

Database: movie_platform
Question: What is the name of the movie whose critic received the highest number of likes related to the critic made by the user rating the movie?
Evidence: number of likes received refers to critic likes; received the highest number of likes refers to MAX(critic_likes);
SQL: SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id ORDER BY T1.critic_likes DESC LIMIT 1

Database: shakespeare
Question: On average, how many scenes are there in each of the comedy works written by Shakespeare?
Evidence: comedy refers to GenreType = 'Comedy'; average = divide(sum(count(Scene)), count(work.id))
SQL: SELECT CAST(SUM(T2.Scene) AS REAL) / COUNT(T1.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.GenreType = 'Comedy'

Database: retail_world
Question: Name all products supplied by Zaanse Snoepfabriek.
Evidence: products refers to ProductName; 'Zaanse Snoepfabriek' is a CompanyName
SQL: SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Zaanse Snoepfabriek'

Database: address
Question: Among the cities with an area code 939, which city has the highest Asian population?
Evidence: highest asian population refers to Max(asian_population)
SQL: SELECT T2.city FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 939 ORDER BY T2.asian_population DESC LIMIT 1

Database: language_corpus
Question: Which Wikipedia page number has the highest number of words in the Catalan language?
Evidence: Wikipedia page number refers to page;  the highest number of words in the Catalan language refers to MAX(lid = 1);
SQL: SELECT page FROM pages WHERE words = ( SELECT MAX(words) FROM pages )

Database: olympics
Question: How many athlete from China participate in the 2016 Summer Olympics?
Evidence: athletes from China refer to person_id where region_name = 'China'; the 2016 Summer Olympics refer to games_name = '2016 Summer';
SQL: SELECT COUNT(T3.id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id INNER JOIN person_region AS T4 ON T3.id = T4.person_id INNER JOIN noc_region AS T5 ON T4.region_id = T5.id WHERE T1.games_name = '2016 Summer' AND T5.region_name = 'China'

Database: synthea
Question: Among the patients with viral sinusitis condition, which patient's gender is most affected? Provide the number for each respectively.
Evidence: viral sinusitis condition refers to conditions.DESCRIPTION = 'Viral sinusitis (disorder)'; gender that is most affected refers to MAX(COUNT(gender WHERE conditions.DESCRIPTION = 'Viral sinusitis (disorder)'));
SQL: SELECT SUM(CASE WHEN T1.gender = 'F' THEN 1 ELSE 0 END), SUM(CASE WHEN T1.gender = 'M' THEN 1 ELSE 0 END) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Viral sinusitis (disorder)'

Database: bike_share_1
Question: What is the maximum humidity in Powell Street BART when bike 496 was borrowed from the station on 8/29/2013?
Evidence: Powell Street refers to start_station_name; bike 496 refers to bike_id = '496'; start_date = '8/29/2013';
SQL: SELECT T2.max_humidity FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T1.start_date LIKE '8/29/2013%' AND T1.bike_id = 496 AND T1.start_station_name = 'Powell Street BART'

Database: computer_student
Question: Please list the IDs of the advisors of the students who are in the 5th year of their program.
Evidence: IDs of the advisors refers to p_id_dummy; in the 5th year of their program refers to yearsInProgram = 'Year_5'
SQL: SELECT T1.p_id_dummy FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram = 'Year_5'

Database: olympics
Question: How many gold medals does Henk Jan Zwolle have?
Evidence: gold medals refer to medal_name = 'Gold';
SQL: SELECT COUNT(T1.id) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN competitor_event AS T3 ON T2.id = T3.competitor_id INNER JOIN medal AS T4 ON T3.medal_id = T4.id WHERE T1.full_name = 'Henk Jan Zwolle' AND T4.medal_name = 'Gold'

Database: soccer_2016
Question: Provide the point of the winning margin in a match between Mumbai Indians and Royal Challengers Bangalore on May 28, 2008.
Evidence: point of the winning margin refers to Win_Margin; Mumbai Indians refers to Team_Name = 'Mumbai Indians'; Royal Challengers Bangalore refers to Team_Name = 'Royal Challengers Bangalore'; on May 28 2008 refers to Match_Date = '2008-05-28'
SQL: SELECT T1.Win_Margin FROM Match AS T1 INNER JOIN Team AS T2 ON T2.Team_Id = T1.Team_1 INNER JOIN Team AS T3 ON T3.Team_Id = T1.Team_2 WHERE (T2.Team_Name = 'Mumbai Indians' AND T3.Team_Name = 'Royal Challengers Bangalore' AND T1.Match_Date = '2008-05-28') OR (T2.Team_Name = 'Royal Challengers Bangalore' AND T3.Team_Name = 'Mumbai Indians' AND T1.Match_Date = '2008-05-28')

Database: music_tracker
Question: What are the tags of the top 5 least downloaded live albums?
Evidence: least downloaded album refers to MIN(totalSnatched where releaseType = 'album');
SQL: SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'album' ORDER BY T1.totalSnatched LIMIT 5