Database: books
Question: Among the books published by publisher ID 1929, how many of them have over 500 pages?
Evidence: books have over 500 pages refers to num_pages > 500
SQL: SELECT COUNT(*) FROM book WHERE publisher_id = 1929 AND num_pages > 500

Database: codebase_comments
Question: How many solutions whose repository's stars are a third more than forks?
Evidence: solutions refers to Solution.Id; repository stars are a third more than forks = (MULTIPLY(Stars, 1/3))>Forks;
SQL: SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks < T1.Stars * 1 / 3

Database: soccer_2016
Question: How many players have won at least 5 man of the match awards?
Evidence: won at least 5 man of the match awards refers to COUNT(Match_Id) > = 5
SQL: SELECT COUNT(Match_Id) FROM `Match` GROUP BY Man_of_the_Match HAVING COUNT(Match_Id) >= 5

Database: books
Question: How many customers ordered Stephen King's first book?
Evidence: "Stephen King" is the author_name; first book refers to Min(publication_date)
SQL: SELECT COUNT(T1.publication_date) FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id INNER JOIN order_line AS T4 ON T4.book_id = T1.book_id WHERE T3.author_name = 'Stephen King' ORDER BY T1.publication_date ASC LIMIT 1

Database: european_football_1
Question: How many teams that played in the 2012 season belong to any of the English divisions and what percentage play in each of the divisions?
Evidence: matches = Div
SQL: SELECT ( SELECT COUNT(T1.Div) AS total FROM matchs T1 INNER JOIN divisions T2 ON T2.division = T1.Div WHERE T2.country = 'England' AND T1.season = 2012 ) AS num , CASE WHEN 1 THEN T.result END AS percentage FROM ( SELECT 100.0 * COUNT(T1.Div) / ( SELECT COUNT(T1.Div) FROM matchs T1 INNER JOIN divisions T2 ON T2.division = T1.Div WHERE T2.country = 'England' AND T1.season = 2012 ) AS result FROM matchs T1 INNER JOIN divisions T2 ON T2.division = T1.Div WHERE T2.country = 'England' AND T1.season = 2012 GROUP BY T2.division ) AS T

Database: food_inspection
Question: How many eateries had low risk for violation with unpermitted food facility description?
Evidence: eateries represent business; low risk for violation refers to risk_category = 'Low Risk';
SQL: SELECT COUNT(DISTINCT business_id) FROM violations WHERE risk_category = 'Low Risk' AND description = 'Unpermitted food facility'

Database: cars
Question: Among the cars over 3000lbs, how many of them cost less than $30000?
Evidence: over 3000lbs refers to weight > 3000; cost less than $30000 refers to price < 30000
SQL: SELECT COUNT(T1.car_name) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.weight > 3000 AND T2.price < 30000

Database: books
Question: What is the status of the orders placed on 04/10/2022?
Evidence: placed on 04/10/2022 refers to SUBSTR(order_date, 1, 10) = '2022-04-10'; status of order refers to status_value
SQL: SELECT DISTINCT T1.status_value FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id WHERE T3.order_date LIKE '2022-04-10%'

Database: books
Question: How many orders were returned in the year 2020?
Evidence: returned refers to status_value = 'Returned'; in the year 2020 refers to status_date LIKE '%2020%'
SQL: SELECT COUNT(*) FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE T1.status_value = 'Returned' AND STRFTIME('%Y', T2.status_date) = '2020'

Database: coinmarketcap
Question: What is the name of the coin that creates the most total value in the past 24 hours?
Evidence: creates the most total value in the past 24 hours refers to max(volume_24h)
SQL: SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.volume_24h = ( SELECT MAX(volume_24h) FROM historical )

Database: regional_sales
Question: How many online orders were shipped during the month of June 2018?
Evidence: online orders refers to Sales Channel = 'Online'; shipped during the month of June 2018 refers to SUBSTR(ShipDate, 1, 1) = '6' AND SUBSTR(ShipDate,-2) = '18'
SQL: SELECT SUM(IIF(ShipDate LIKE '6/%/18' AND `Sales Channel` = 'Online', 1, 0)) FROM `Sales Orders`

Database: cars
Question: What is the name of the most expensive car?
Evidence: name of the car refers to car_name; the most expensive refers to max(price)
SQL: SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 1

Database: sales
Question: What is the full name of customers who dealt with sales person with id 5?
Evidence: full name = FirstName, MiddleInitial, LastName;
SQL: SELECT T1.FirstName, T1.MiddleInitial, T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.SalesPersonID = 5

Database: university
Question: Provide the university name and ID of the university found in Turkey.
Evidence: found in Turkey refers to country_name = 'Turkey';
SQL: SELECT T1.university_name, T1.id FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Turkey'

Database: student_loan
Question: How many students has the longest absense from school for 5 months?
Evidence: absense from school for 5 month refers to month = 5
SQL: SELECT COUNT(name) FROM longest_absense_from_school WHERE month = 5

Database: simpson_episodes
Question: How many episodes have more than 1000 votes?
Evidence: more than 1000 votes refers to votes > 1000
SQL: SELECT COUNT(episode_id) FROM Episode WHERE votes > 1000;

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 teenagers?
Evidence: RESPONSE = 'true'; teenagers are people aged between 13 and 19 years;
SQL: SELECT COUNT(T1.ID) FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID WHERE T1.age >= 13 AND T1.age <= 19 AND T2.RESPONSE = 'true'

Database: simpson_episodes
Question: What award did the episode that aired on 11/30/2008 win?
Evidence: aired on 11/30/2008 refers to air_date = '11/30/2008'; win refers to result = 'Winner'
SQL: SELECT T1.award FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.result = 'Winner' AND T2.air_date = '2008-11-30';

Database: ice_hockey_draft
Question: Name the player and his team who made the playoffs in the 2006-2007 season of SuperElit league with the highest points.
Evidence: name of the player refers to PlayerName; playoffs refers to GAMETYPE = 'Playoffs'; highest points refers to MAX(P); 2006-2007 season refers to SEASON = '2006-2007'; SuperElit league refers to LEAGUE = 'SuperElit';
SQL: SELECT T2.PlayerName, T1.TEAM FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2006-2007' AND T1.GAMETYPE = 'Playoffs' AND T1.LEAGUE = 'SuperElit' ORDER BY T1.P DESC LIMIT 1

Database: authors
Question: How many author published papers in the 'IEEE Computer' journal?
Evidence: IEEE Computer refer to FullName; How many author published papers refer to COUNT(PaperAuthor.Name) where FullName = ’IEEE Computer’
SQL: SELECT COUNT(T2.Name) FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T3.FullName = 'IEEE Computer'

Database: olympics
Question: Compute the average height of competitors whose age ranges from 22 to 28.
Evidence: AVG(height) where age BETWEEN 22 AND 28;
SQL: SELECT AVG(T1.height) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id WHERE T2.age BETWEEN 22 AND 28

Database: disney
Question: Name actors who voiced more than five Disney characters.
Evidence: Actors who voiced refer to voice-actor;
SQL: SELECT 'voice-actor' FROM `voice-actors` GROUP BY 'voice-actor' HAVING COUNT(movie) > 5