Database: video_games
Question: Which game has sold the fewest units?
Evidence: which game refers to game_name; sold the fewest units refers to MIN(num_sales);
SQL: SELECT T.game_name FROM ( SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id INNER JOIN region_sales AS T4 ON T3.id = T4.game_platform_id ORDER BY T4.num_sales LIMIT 1 ) t

Database: world_development_indicators
Question: Please provide full name of any two countries using special trade system.
Evidence: full name refers to longname; using special trade system refers to systemoftrade = 'Special trade system'
SQL: SELECT LongName FROM Country WHERE SystemOfTrade = 'Special trade system' LIMIT 2

Database: world_development_indicators
Question: How many annual indicators use the Sum aggregation method from 2001 to 2003?
Evidence: Annual refers to Periodicity; from 2001 to 2003 implies Year = 'YR2001', Year = 'YR2002' , Year = 'YR2003';
SQL: SELECT COUNT(DISTINCT T2.SeriesCode)  FROM Footnotes AS T1 INNER JOIN Series AS T2 ON T1.Seriescode = T2.SeriesCode WHERE T1.Year IN ('YR2001', 'YR2002', 'YR2003') AND T2.Periodicity = 'Annual' AND T2.AggregationMethod = 'Sum'

Database: sales
Question: List down the product id for products with the highest quantity.
Evidence: highest quantity refers to MAX(Quantity);
SQL: SELECT DISTINCT ProductID FROM Sales WHERE Quantity = ( SELECT MAX(Quantity) FROM Sales )

Database: retails
Question: How much is the part supply cost for the medium metallic grey dodger linen?
Evidence: part supply cost refers to ps_supplycost; medium metallic grey dodger linen refers to p_name = 'medium metallic grey dodger linen'
SQL: SELECT T2.ps_supplycost FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T1.p_name = 'medium metallic grey dodger linen'

Database: music_tracker
Question: List the group name has the most downloaded that have released jazz genres from 1982 or later.
Evidence: the most downloaded refers to MAX(totalSnatched); tag = 'jazz'; from 1982 or later refers to groupYear ≥ 1982;
SQL: SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'jazz' AND T1.groupYear >= 1982 ORDER BY T1.totalSnatched DESC LIMIT 1

Database: video_games
Question: Which publisher published the most games?
Evidence: publisher refers to publisher_name; the most games refers to max(count(publisher_id))
SQL: SELECT T.publisher_name FROM ( SELECT T2.publisher_name, COUNT(DISTINCT T1.game_id) FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id GROUP BY T2.publisher_name ORDER BY COUNT(DISTINCT T1.game_id) DESC LIMIT 1 ) t

Database: university
Question: How many female students did Stanford University have in 2011?
Evidence: in 2011 refers to year 2011; female students refers to DIVIDE(MULTIPLY(pct_female_students, num_students), 100); Stanford University refers to university_name = 'Stanford University';
SQL: SELECT CAST(T1.num_students * T1.pct_female_students AS REAL) / 100 FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2011 AND T2.university_name = 'Stanford University'

Database: language_corpus
Question: How many Wikipedia pages with over 4000 different words are there on the Catalan language?
Evidence: lid = 1 means it's Catalan language; over 4000 different words means words > 4000; Wikipedia pages refers to pid
SQL: SELECT COUNT(lid) FROM pages WHERE lid = 1 AND words > 4000

Database: shakespeare
Question: How many paragraphs are there in Act 1, Scene 1 in Twelfth Night?
Evidence: Twelfth Night refers to Title = 'Twelfth Night'
SQL: SELECT SUM(T3.ParagraphNum) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id WHERE T2.Act = 1 AND T2.Scene = 1 AND T1.Title = 'Twelfth Night'

Database: world_development_indicators
Question: How many country uses the 2008 System of National Accounts methodology? List our their table name.
SQL: SELECT TableName  FROM Country WHERE SystemOfNationalAccounts = 'Country uses the 2008 System of National Accounts methodology.'

Database: soccer_2016
Question: Count the matches with a total of two innings.
Evidence: total of two innings refers to innings_no = 2;
SQL: SELECT COUNT(Match_Id) FROM Wicket_Taken WHERE innings_no = 2

Database: computer_student
Question: How many professors are teaching course ID 18?
Evidence: professors refers to taughtBy.p_id; course ID 18 refers to taughtBy.course_id
SQL: SELECT COUNT(DISTINCT p_id) FROM taughtBy WHERE course_id = 18

Database: soccer_2016
Question: Who among the players won both "Man of the Series" and "Orange Cap" in the same season?
Evidence: Who refers to Player_Name;
SQL: SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Season AS T2 ON T1.Player_Id = T2.Man_of_the_Series = T2.Orange_Cap

Database: student_loan
Question: State name of unemployed students who have the longest duration of absense from school.
Evidence: longest duration of absense refers to MAX(month)
SQL: SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN unemployed AS T2 ON T1.name = T2.name ORDER BY T1.month DESC LIMIT 1

Database: disney
Question: Please list the villains of all the movies directed by Wolfgang Reitherman.
Evidence: Wolfgang Reitherman refers to director = 'Wolfgang Reitherman';
SQL: SELECT T2.villian FROM director AS T1 INNER JOIN characters AS T2 ON T1.name = T2.movie_title WHERE T1.director = 'Wolfgang Reitherman' AND T2.villian IS NOT NULL

Database: image_and_language
Question: How many images have "picture" as their attribute class and "bear" as their object class?
Evidence: "picture" as attribute class refers to ATT_CLASS = 'picture'; "bear" as object class refers to OBJ_CLASS = 'bear'; images refer to IMG_ID;
SQL: SELECT COUNT(T2.IMG_ID) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T1.ATT_CLASS = 'picture' AND T4.OBJ_CLASS = 'bear'

Database: movie_3
Question: Among all the customers of store no.1, how many of them are active?
Evidence: active refers to active = 1
SQL: SELECT COUNT(customer_id) FROM customer WHERE active = 1 AND store_id = 1

Database: book_publishing_company
Question: Among the titles with royalty percentage, which title has the greatest royalty percentage. State it's minimum range to enjoy this royalty percentage.
Evidence: minimum range is synonym for low range which refers to lorange
SQL: SELECT T1.title, T2.lorange FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id ORDER BY T2.royalty DESC LIMIT 1

Database: movie_3
Question: Calculate the average rent amount paid by the customer with customer id 15.
Evidence: average rent amount refers to AVG(amount)
SQL: SELECT AVG(amount) FROM payment WHERE customer_id = 15

Database: cars
Question: What is the percentage of Japanese cars in the database?
Evidence: Japanese car refers to country = 'Japan'; percentage = divide(count(ID where country = 'Japan'), count(ID)) * 100%
SQL: SELECT CAST(SUM(CASE WHEN T2.country = 'Japan' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin

Database: shakespeare
Question: What is the long title of the Shakespeare's work with Act 4 Scene 5 described as "Mytilene. A street before the brothel."?
Evidence: described as "Mytilene. A street before the brothel." refers to chapters.Description = 'Mytilene. A street before the brothel.'
SQL: SELECT T1.LongTitle FROM works AS T1 RIGHT JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Description = 'Mytilene. A street before the brothel.'