Database: retails
Question: Among all the parts under the type "promo brushed steel", how many of them have a total available quantity from all suppliers of under 5000?
Evidence: type "promo brushed steel" refers to p_type = 'PROMO BRUSHED STEEL'; a total available quantity of under 5000 refers to sum(ps_availqty) < 5000
SQL: SELECT SUM(num) FROM ( SELECT COUNT(T3.s_name) AS num FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey WHERE T1.p_type = 'PROMO BRUSHED STEEL' GROUP BY T2.ps_partkey HAVING SUM(T2.ps_availqty) < 5000 ) T

Database: cookbook
Question: Which recipes contain almond extract?
Evidence: almond extract is a name of an ingredient
SQL: SELECT T1.title FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T3.name = 'almond extract'

Database: software_company
Question: Of the first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department, how many of them are divorced males?
Evidence: RESPONSE = 'true'; SEX = 'Male'; MARITAL_STATUS = 'Divorced';
SQL: SELECT COUNT(T1.ID) FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID WHERE T1.SEX = 'Male' AND T1.MARITAL_STATUS = 'Divorced' AND T2.RESPONSE = 'true'

Database: soccer_2016
Question: In which country do the majority of the players are from?
Evidence: country refers to Country_Name; the majority of the players  refers to max(count(Country_Name))
SQL: SELECT T1.Country_Name FROM Country AS T1 INNER JOIN Player AS T2 ON T1.Country_Id = T2.Country_Name GROUP BY T2.Country_Name ORDER BY COUNT(T2.Country_Name) DESC LIMIT 1

Database: shipping
Question: How many shipments did Holger Nohr transport to North Las Vegas overall?
Evidence: "North Las Vegas" is the city_name
SQL: SELECT COUNT(*) FROM driver AS T1 INNER JOIN shipment AS T2 ON T1.driver_id = T2.driver_id INNER JOIN city AS T3 ON T3.city_id = T2.city_id WHERE T1.first_name = 'Holger' AND T1.last_name = 'Nohr' AND T3.city_name = 'North Las Vegas'

Database: movie_platform
Question: How many films did Åke Sandgren direct?
Evidence: Ake Sandgren is the director name;  film refers to movie
SQL: SELECT COUNT(movie_title) FROM movies WHERE director_name = 'Åke Sandgren'

Database: mental_health_survey
Question: How many respondents of the mental health survey were diagnosed with 'Substance Use Disorder'?
Evidence: respondents' and 'users' are synonyms
SQL: SELECT COUNT(AnswerText) FROM Answer WHERE AnswerText LIKE 'Substance Use Disorder'

Database: retail_world
Question: Among all the orders, which products sold for the most amount?
Evidence: the most amount refers to max(sum(Quantity))
SQL: SELECT ProductID FROM `Order Details` GROUP BY ProductID ORDER BY SUM(Quantity) DESC LIMIT 1

Database: ice_hockey_draft
Question: Identify the players with the same height as Brian Gionta. How tall are they?
Evidence: players refers to PlayerName; height refers to height_in_cm;
SQL: SELECT T2.PlayerName, T1.height_in_cm FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height WHERE T2.height = ( SELECT height FROM PlayerInfo WHERE PlayerName = 'Brian Gionta' )

Database: public_review_platform
Question: Which Yelp_Business in Arizona gets the most number of reviews?
Evidence: Arizona refers to state = 'AZ'; gets the most number of reviews refers to max(count(Reviews.business_id))
SQL: SELECT T1.user_id FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T2.state LIKE 'AZ' GROUP BY T1.user_id ORDER BY COUNT(T1.user_id) DESC LIMIT 1

Database: music_platform_2
Question: Provide the itunes id and url for podcast titled 'Brown Suga Diaries'.
Evidence: url refers to itunes_url; 'Brown Suga Diaries' is the title of podcast
SQL: SELECT itunes_id, itunes_url FROM podcasts WHERE title = 'Brown Suga Diaries'

Database: talkingdata
Question: What is the percentage of female OPPO users against the male OPPO users?
Evidence: percentage = DIVIDE(MULTIPLY(CONCAT(COUNT(device_id WHERE phone_brand = 'OPPO' AND gender = 'F'), 100), COUNT(device_id)), '%') AS 'the percentage of female OPPO users'; DIVIDE(MULTIPLY(CONCAT(COUNT(device_id WHERE phone_brand = 'OPPO' AND gender = 'M'), 100), COUNT(device_id)), '%') AS 'the percentage of male OPPO users';
SQL: SELECT SUM(IIF(T2.gender = 'F', 1, 0)) * 100 / COUNT(T2.device_id) AS perFemale , SUM(IIF(T2.gender = 'M', 1, 0)) * 100 / COUNT(T2.device_id) AS perMale FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id WHERE T1.phone_brand = 'OPPO'

Database: beer_factory
Question: From which cities are the customers who gave 5 stars in their reviews in November 2012?
Evidence: 5 stars refers to StarRating = 5; in November 2012 refers to ReviewDate LIKE '2012-11%';
SQL: SELECT DISTINCT T1.City FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.StarRating = 5 AND T2.ReviewDate BETWEEN '2012-11-01' AND '2012-11-30'

Database: video_games
Question: What genre is the game 2010 FIFA World Cup South Africa?
Evidence: genre refers to genre_name; 2010 FIFA World Cup South Africa refers to game_name = '2010 FIFA World Cup South Africa';
SQL: SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = '2010 FIFA World Cup South Africa'

Database: student_loan
Question: How many male stuents do not have payment due?
Evidence: do not have payment due refers to bool = 'neg';
SQL: SELECT COUNT(T1.name) FROM male AS T1 INNER JOIN no_payment_due AS T2 ON T1.name = T2.name WHERE T2.bool = 'neg'

Database: regional_sales
Question: List out the discount levels applied for all orders from Ole Group.
Evidence: Ole Group is the name of the customer; discount levels applied refer to Discount Applied NOT NULL;
SQL: SELECT T FROM ( SELECT DISTINCT CASE  WHEN T1.`Customer Names` = 'Ole Group' THEN T2.`Discount Applied` END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL

Database: language_corpus
Question: What is the total occurrence of the biwords pairs with "àbac" as its first word?
Evidence: occurrence refers to occurrences; àbac refers to word = 'àbac'; first word refers to w1st
SQL: SELECT COUNT(T2.w1st) FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st INNER JOIN words AS T3 ON T3.wid = T2.w2nd WHERE T1.word = 'àbac'

Database: world_development_indicators
Question: What country have the series code of SP.DYN.CBRT.IN?
Evidence: what country refers to ShortName
SQL: SELECT T1.ShortName FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.SeriesCode = 'SP.DYN.CBRT.IN'

Database: public_review_platform
Question: In users yelping since 2010 to 2012, how many of them has an low fans?
Evidence: user yelping since 2010 to 2012 refers to user_yelping_since_year > = '2010' AND user_yelping_since_year < '2013'; low fans refers to user_fans = 'Low'
SQL: SELECT COUNT(user_id) FROM Users WHERE user_yelping_since_year BETWEEN 2010 AND 2012 AND user_fans LIKE 'Low'

Database: movie_3
Question: Calculate the total payment amount of customers in Nagasaki district.
Evidence: the total payment amount refers to sum(amount)
SQL: SELECT SUM(T1.amount) FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id INNER JOIN address AS T3 ON T3.address_id = T2.address_id WHERE T3.district = 'Nagasaki'