Database: movies_4
Question: What is the name of the production company that made the most movies?
Evidence: name of the production company refers to company_name; most movies refers to max(count(company_name))
SQL: SELECT T1.company_name FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id ORDER BY COUNT(T2.movie_id) DESC LIMIT 1

Database: movie
Question: List down the movie ID of movie with a budget of 15000000 and a rating between 7 to 8.
Evidence: a budget of 15000000 refers to Budget = 15000000; rating between 7 to 8 refers to Rating BETWEEN 7 and 8
SQL: SELECT MovieID FROM movie WHERE Rating BETWEEN 7 AND 8 AND Budget = 15000000

Database: trains
Question: What are the ids of the train running east?
Evidence: east is a direction
SQL: SELECT id FROM trains WHERE direction = 'east'

Database: shipping
Question: What model year of truck delivered the ship ID 1233?
SQL: SELECT T1.model_year FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T2.ship_id = '1233'

Database: superstore
Question: Who ordered the Bush Mission Pointe Library in the Central Region?
Evidence: Bush Mission Pointe Library' is the "Product Name";
SQL: SELECT DISTINCT T2.`Customer Name` FROM central_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T3.`Product Name` = 'Bush Mission Pointe Library' AND T3.Region = 'Central'

Database: public_review_platform
Question: How many users have joined Yelp since the year 2012?
Evidence: since year 2012 refers to user_yelping_since_year = '2012'
SQL: SELECT COUNT(user_id) FROM Users WHERE user_yelping_since_year = 2012

Database: retail_world
Question: Of all the products ordered in order no. 10248, which product has the highest user satisfaction?
Evidence: order no. refers to OrderID; highest user satisfaction refers to MAX(ReorderLevel);
SQL: SELECT T1.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10248 ORDER BY T1.ReorderLevel DESC LIMIT 1

Database: computer_student
Question: Which professor taught the least amount of courses?
Evidence: professor refers to taughtBy.p_id; least amount of courses refers to min(count(course_id))
SQL: SELECT p_id FROM taughtBy GROUP BY p_id ORDER BY COUNT(course_id) ASC LIMIT 1

Database: simpson_episodes
Question: What award did the character Homer simpson 20 achieve in 2009?
Evidence: in 2009 refers to year = 2009
SQL: SELECT DISTINCT T1.award FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T1.year = 2009 AND T2.character = 'Homer Simpson';

Database: language_corpus
Question: How frequently did the words 1 and 25 appear together?
Evidence: How frequently refers to occurrences;  word 1 refers to wid = 1; word 25 refers to wid = 25; appear together means pair, which is a relationship of two words: w1st and w2nd, where w1st is word id of the first word and w2nd is a word id of the second word;  w1st or w2nd = wid = 1; w1st or w2nd = wid = 25;
SQL: SELECT occurrences FROM biwords WHERE w1st = 1 AND w2nd = 25

Database: music_tracker
Question: Find the average number of downloads for Single-Tables released by '2Pac' between 2001 and 2013.
Evidence: 2Pac is an artist; releaseType = 'single'; between 2001 and 2013 refers to groupYear between 2001 and 2013; average number of downloads = AVG(totalSnatched);
SQL: SELECT AVG(totalSnatched) FROM torrents WHERE artist LIKE '2Pac' AND releaseType LIKE 'Single' AND groupYear BETWEEN 2001 AND 2013

Database: ice_hockey_draft
Question: What is the percentage of Russian players who have a height of under 200 inch?
Evidence: percentage = MULTIPLY(DIVIDE(SUM(nation = 'Russia' WHERE height_in_cm < 200), COUNT(ELITEID)), 100); Russian refers to nation = 'Russia'; players refers to PlayerName; height of under 200 inch refers to height_in_cm < 200;
SQL: SELECT CAST(COUNT(CASE WHEN T1.height_in_cm < 200 AND T2.nation = 'Russia' THEN T2.ELITEID ELSE NULL END) AS REAL) * 100 / COUNT(T2.ELITEID) FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height

Database: shooting
Question: Among the 'Handgun' weapon used by subject, how many percent were 'Shoot and Miss'?
Evidence: 'Handgun' weapon refers to subject_weapon = 'Handgun'; 'Shoot and Miss' refers to subject_statuses = 'Shoot and Miss'; percent = divide(count(incidents where subject_statuses = 'Shoot and Miss'), count(incidents)) where subject_weapon = 'Handgun' * 100%
SQL: SELECT CAST(SUM(subject_statuses = 'Shoot and Miss') AS REAL) * 100 / COUNT(case_number) FROM incidents WHERE subject_weapon = 'Handgun'

Database: software_company
Question: In widowed male customers ages from 40 to 60, how many of them has an income ranges from 3000 and above?
Evidence: widowed male customers ages from 40 to 60 refer to SEX = 'Male' where age BETWEEN 40 AND 60 and MARITAL_STATUS = 'Widowed'; income ranges from 3000 and above refers to INCOME_K BETWEEN 2000 AND 3000;
SQL: SELECT COUNT(T1.ID) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.age >= 40 AND T1.age <= 60 AND T1.MARITAL_STATUS = 'Widowed' AND T1.SEX = 'Male' AND T2.INCOME_K >= 2000 AND T2.INCOME_K <= 3000

Database: address
Question: How many zip codes are under Barre, VT?
Evidence: "Barre, VT" is the CBSA_name
SQL: SELECT COUNT(T2.zip_code) FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_name = 'Barre, VT'

Database: sales
Question: How many employees sold "ML Road Frame-W - Yellow, 40"?
Evidence: ML Road Frame-W - Yellow, 40' is name of product;
SQL: SELECT COUNT(T2.SalesPersonID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'ML Road Frame-W - Yellow, 40'

Database: world
Question: List all the cities in the country where there is high life expectancy at birth.
Evidence: high life expectancy at birth refers to MAX(LifeExpectancy);
SQL: SELECT T2.Name FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T1.LifeExpectancy DESC LIMIT 1

Database: authors
Question: Write down the name of authors for paper with id from 101 to 105.
Evidence: paper with ID from 101 to 105 refers to Id BETWEEN 100 AND 106
SQL: SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Id > 100 AND T1.Id < 106

Database: sales
Question: What is the name of the product that is most sold by sale person id 20?
Evidence: most sold refers to MAX(Quantity);
SQL: SELECT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.SalesPersonID = 20 ORDER BY T2.Quantity DESC LIMIT 1

Database: trains
Question: Please list the IDs of all the trains with at least one car in a non-regular shape.
Evidence: non-regular shape refers to shape in ('elipse', 'bucket')
SQL: SELECT train_id FROM cars WHERE shape IN ('elipse', 'bucket') GROUP BY train_id

Database: synthea
Question: Among the patients with prediabetes, how many are female?
Evidence: patients with prediabetes refer to PATIENT from conditions where DESCRIPTION = 'Prediabetes'; female refers to gender = 'F';
SQL: SELECT COUNT(DISTINCT T2.patient) FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.gender = 'F' AND T1.DESCRIPTION = 'Prediabetes'

Database: regional_sales
Question: Calculate the average net profit for bakeware product.
Evidence: net profit can be computed as SUBTRACT(Unit Price, Unit Cost); AVG(net profit) where Product Name = 'Bakeware';
SQL: SELECT AVG(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', ''))  FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Bakeware'