Database: world_development_indicators
Question: Among the countries with note on the series code SM.POP.TOTL, how many of them are in the low-income group?
Evidence: countries refer to Countrycode; low-income group refers to incomegroup = 'Low income'; with notes refers to description IS NOT NULL; series code SM.POP.TOTL refers to Seriescode = 'SM.POP.TOTL'
SQL: SELECT COUNT(T1.Countrycode) FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Seriescode = 'SM.POP.TOTL' AND T1.IncomeGroup = 'Low income'

Database: restaurant
Question: Which country has the most restaurants with Italian food?
Evidence: Italian food refers to food_type = 'Italian'
SQL: SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type = 'Italian' GROUP BY T2.county ORDER BY COUNT(T1.id_restaurant) DESC LIMIT 1

Database: superstore
Question: What is the shipment duration for order number CA-2011-134103?
Evidence: shipment duration = subtract("Ship Date", "Order Date"); order number CA-2011-134103 refers to "Order ID" = 'CA-2011-134103'
SQL: SELECT DISTINCT strftime('%J', `Ship Date`) - strftime('%J', `Order Date`) AS duration FROM central_superstore WHERE `Order ID` = 'CA-2011-134103'

Database: professional_basketball
Question: What is the difference in the average age of players when they are drafted in the ABA vs when they are drafted in the NBA between the years 1970 and 1970?
Evidence: ABA refers to lgID = 'ABA'; NBA refers to lgID = 'NBA'; between the years 1970 and 1970 refers to draftYear between 1970 and 1970; difference = subtract(avg(subtract(1970, year(birthDate)) where lgID = 'ABA'), avg(subtract(1970, year(birthDate)) where lgID = 'NBA'))
SQL: SELECT CAST(SUM(IIF(T2.lgID = 'ABA', 1970 - strftime('%Y', T3.birthDate), 0)) AS REAL) / COUNT(IIF(T2.lgID = 'ABA', 1, 0)) - CAST(SUM(IIF(T2.lgID = 'NBA', 1970 - strftime('%Y', T3.birthDate), 0)) AS REAL) / COUNT(IIF(T2.lgID = 'NBA', 1, 0)) FROM draft AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID INNER JOIN players AS T3 ON T2.playerID = T3.playerID WHERE T1.draftYear BETWEEN 1970 AND 1970

Database: retail_world
Question: Of the 10 products with the highest unit price, identify by their ID the ones that have generated the least satisfaction.
Evidence: High reorder level generally means high user satisfaction of the product and vice versa; the least satisfaction refers to MIN(ReorderLevel); the highest unit price refers to MAX(UnitPrice);
SQL: SELECT ProductID FROM Products ORDER BY ReorderLevel ASC, UnitPrice DESC LIMIT 1

Database: books
Question: How many books did A.R. Braunmuller write?
Evidence: "A.R. Braunmuller" is the author_name
SQL: SELECT COUNT(*) FROM author AS T1 INNER JOIN book_author AS T2 ON T1.author_id = T2.author_id WHERE T1.author_name = 'A.R. Braunmuller'

Database: soccer_2016
Question: Who is the player who received the man of the match award during the last match of Season 9?
Evidence: Who refers to Player_Name; last match of Season 9 refers to max(Match_Date) where Season_Id = 9
SQL: SELECT T1.Player_name FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match WHERE T2.Season_Id = 9 ORDER BY T2.Match_Date DESC LIMIT 1

Database: address
Question: In the state where Lisa Murkowski is the representative, how many cities have zero employees?
Evidence: zero employee refers to employees = 0
SQL: SELECT COUNT(T3.city) FROM congress AS T1 INNER JOIN state AS T2 ON T1.abbreviation = T2.abbreviation INNER JOIN zip_data AS T3 ON T2.abbreviation = T3.state WHERE T1.first_name = 'Murkowski' AND T1.last_name = 'Lisa' AND T3.employees = 0

Database: soccer_2016
Question: What is the difference in the average number of players out by lbw and runout in the matches?
Evidence: out by lbw refers to Out_Id = 4; runout refers to Out_Id = 3; average out by lbw refers to  avg(Player_Out when Out_Id = 4); average out by runout refers to  avg(Player_Out when Out_Id = 3)
SQL: SELECT AVG(T1.Player_Out) FROM Wicket_Taken AS T1 INNER JOIN Out_Type AS T2 ON T1.Kind_Out = T2.Out_Id WHERE T2.Out_Name = 'lbw'

Database: movie_3
Question: What is the average duration time of the films starring PENELOPE GUINESS?
Evidence: average duration time = AVG(length)
SQL: SELECT AVG(T3.length) 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 T1.first_name = 'PENELOPE' AND T1.last_name = 'GUINESS'

Database: olympics
Question: How many Summer games are there that were held in Paris?
Evidence: Summer games refer to games_id where season = 'Summer'; Paris refers to city_name = 'Paris';
SQL: SELECT COUNT(T3.id) FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T2.city_name = 'Paris' AND T3.season = 'Summer'

Database: legislator
Question: What is the district number that Chris Van Hollen serving?
Evidence: Chris Van Hollen is an official_full_name
SQL: SELECT T2.district FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Chris Van Hollen' AND T2.district IS NOT NULL GROUP BY T2.district

Database: world_development_indicators
Question: Which European countries had the highest private expenditure on health in 2005? List the top ten countries in descending order and find the source of the data.
Evidence: Year = 2005; private expenditure on health refers to IndicatorName = 'Out-of-pocket health expenditure (% of private expenditure on health)'; the highest refers to MAX(Value); source refers to Description;
SQL: SELECT DISTINCT T1.CountryCode, T3.Description FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode INNER JOIN CountryNotes AS T3 ON T1.CountryCode = T3.Countrycode WHERE T2.IndicatorName = 'Out-of-pocket health expenditure (% of private expenditure on health)' AND T2.Value > 0 AND T2.year = 2005 ORDER BY T2.Value DESC LIMIT 10

Database: car_retails
Question: Which customer made the order No. 10160? Give the contact name.
SQL: SELECT t2.contactFirstName, t2.contactLastName FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t1.orderNumber = '10160'

Database: car_retails
Question: Please calculate the average total price of shipped orders from German customers.
Evidence: average total price = DIVIDE(MULTIPLY(quantityOrdered, priceEach)), COUNT(orderNumber)); German is a nationality of country = 'Germany'; shipped orders refers to status = 'Shipped';
SQL: SELECT SUM(T3.quantityOrdered * T3.priceEach) / COUNT(T2.orderNumber) FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2.customerNumber INNER JOIN orderdetails AS T3 ON T2.orderNumber = T3.orderNumber WHERE T2.status = 'Shipped' AND T1.country = 'Germany'

Database: food_inspection_2
Question: What is the full name of the employee who gave the highest amount of fine of all time?
Evidence: full name refers to first_name, last_name; the highest amount of fine refers to max(sum(fine))
SQL: SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, SUM(T3.fine) 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 GROUP BY T1.first_name, T1.last_name ORDER BY SUM(T3.fine) DESC LIMIT 1 ) t

Database: retails
Question: What are the names of the parts that have a part supply cost of at least 1,000?
Evidence: name of the part refers to p_name; part supply cost of at least 1,000 refers to ps_supplycost > 1000
SQL: SELECT T1.p_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T2.ps_supplycost > 1000