Database: car_retails
Question: Which different vendor has the most amount of orders? Calculate the total estimated earnings.
Evidence: amount of order refers to quantityOrdered; most amount of orders refers to SUM(QuantityOrdered); estimated earnings refers to expected profits; expected profits = SUBTRACT(msrp, buyPrice);
SQL: SELECT DISTINCT T1.productVendor, T1.MSRP - T1.buyPrice FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode GROUP BY T1.productVendor, T1.MSRP, T1.buyPrice ORDER BY COUNT(T2.quantityOrdered) DESC LIMIT 1

Database: movie_3
Question: Calculate customers' total payment amount in August, 2005.
Evidence: in August 2005 refers to payment_date like '2005-08%'; total payment amount refers to Sum(amount)
SQL: SELECT SUM(amount) FROM payment WHERE SUBSTR(payment_date, 1, 7) = '2005-08'

Database: music_platform_2
Question: Which category is the podcast "Scaling Global" under?
Evidence: "Scaling Global" is the title of podcast
SQL: SELECT category FROM categories WHERE podcast_id IN ( SELECT podcast_id FROM podcasts WHERE title = 'Scaling Global' )

Database: donor
Question: How many donors who donated to the city of Pocatello are not teachers?
Evidence: city of Pocatello refers to donor_city = 'Pocatello'; not teachers refers to is_teacher_acct = 'f'
SQL: SELECT COUNT(donationid) FROM donations WHERE donor_city = 'Pocatello' AND is_teacher_acct = 'f'

Database: professional_basketball
Question: How many percent of points were scored by NBA players who belonged to 'LAL' team and had performed steals movement.
Evidence: NBA refers to lgID = 'NBA'; 'LAL' team refers to tmID = 'LAL'; performed steals movement refers to steals > 0; percent = divide(count(playerID where steals > 0), count(playerID)) where lgID = 'NBA' and tmID = 'LAL' * 100%
SQL: SELECT CAST(SUM(IIF(T2.steals IS NOT NULL AND T1.tmID = 'LAL', 1, 0)) AS REAL) * 100 / COUNT(T1.tmID) FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year

Database: movie_platform
Question: What percentage of users rated the movie "Patti Smith: Dream of Life" by more than 3?
Evidence: Patti Smith: Dream of Life' is movie_title; more than 3 refers to rating_score >3; percentage = Divide(Count(rating_score where rating_score >3), Count(rating_score))*100
SQL: SELECT CAST(SUM(CASE WHEN T1.rating_score > 3 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.rating_score) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title LIKE 'Patti Smith: Dream of Life'

Database: donor
Question: Among the donations with a portion using account credits redemption, how many of them are for projects created by teachers working in a public year-round school?
Evidence: portion using account credits redemption refers to payment_included_acct_credit = 't'; year-round school refers to school_year_round = 't';
SQL: SELECT COUNT(T1.projectid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.payment_included_acct_credit = 't' AND T1.school_year_round = 't'

Database: world_development_indicators
Question: From 1960 to 1965, which country had the highest Death rate, crude (per 1,000 people)?
Evidence: IndicatorName = 'Death rate, crude (per 1,000 people)'; the highest refers to MAX(Value); from 1960 to 1965 refers to Year between '1960' and '1965'; country refers to CountryName;
SQL: SELECT CountryName FROM Indicators WHERE Year BETWEEN 1960 AND 1965 AND IndicatorName = 'Death rate, crude (per 1,000 people)' ORDER BY Value DESC LIMIT 1

Database: retail_complains
Question: Pick 5 clients with 0 priority and write down their last name.
Evidence: 0 priority refers to priority = 0; last name refers to last
SQL: SELECT T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.priority = 0 LIMIT 5

Database: video_games
Question: Show the number of games which were released on X360 in 2010.
Evidence: on X360 refers to platform_name = 'X360'; in 2010 refers to release_year = '2010'
SQL: SELECT COUNT(DISTINCT T3.game_id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id WHERE T1.platform_name = 'X360' AND T2.release_year = 2010

Database: donor
Question: Have the teacher "42d43fa6f37314365d08692e08680973" acquired P.h.D or doctor degree?
Evidence: teacher "42d43fa6f37314365d08692e08680973" refers to teacher_acctid = '42d43fa6f37314365d08692e08680973';
SQL: SELECT CASE WHEN teacher_prefix = 'Dr.' THEN 'Yes' ELSE 'NO' END FROM projects WHERE teacher_acctid = '42d43fa6f37314365d08692e08680973'

Database: college_completion
Question: What is the total male graduates in 2012 in the state whereby the institute with the highest average amount of student aid going to undergraduate recipients is located?
Evidence: male refers to gender = 'M'; graduates refers to grad_cohort; in 2012 refers to year = 2012; highest average amount of student aid going to undergraduate recipients refers to MAX(aid_value);
SQL: SELECT COUNT(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T1.state = T2.state WHERE T2.year = 2012 AND T2.gender = 'M' ORDER BY T1.aid_value DESC LIMIT 1

Database: retail_world
Question: Give the reorder level for the products from the supplier "Nord-Ost-Fisch Handelsgesellschaft mbH".
Evidence: supplier "Nord-Ost-Fisch Handelsgesellschaft mbH" refers to CompanyName = 'Nord-Ost-Fisch Handelsgesellschaft mbH'
SQL: SELECT T1.ReorderLevel FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Nord-Ost-Fisch Handelsgesellschaft mbH'

Database: movie_3
Question: How many customers have an address in Abu Dhabi city? List those customer names.
Evidence: name refers to first_name, last_name
SQL: SELECT COUNT(T1.city_id) FROM city AS T1 INNER JOIN address AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T2.address_id = T3.address_id WHERE T1.city = 'Abu Dhabi'

Database: simpson_episodes
Question: State the name of director for the 'Treehouse of Horror XIX' episode.
Evidence: "Treehouse of Horror XIX" is the title of episode; 'director' is the role of person; name refers to person
SQL: SELECT T2.person FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Treehouse of Horror XIX' AND T2.role = 'director';

Database: cars
Question: Which car is the cheapest? Provide its acceleration, number of cylinders, and producing year.
Evidence: the cheapest refers to min(price); number of cylinders refers to cylinders; producing year refers to model_year
SQL: SELECT T1.acceleration, T1.cylinders, T2.model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN price AS T3 ON T3.ID = T2.ID ORDER BY T3.price ASC LIMIT 1

Database: student_loan
Question: Among the students enrolled in UCLA, what is the percentage of male students in the air force department?
Evidence: UCLA refers to school = 'ucla'; percentage = MULTIPLY(DIVIDE(COUNT(male.name), COUNT(person.name)), 100); male students are mentioned in male.name; department refers to organ; organ = 'air_force';
SQL: SELECT CAST(COUNT(T4.name) AS REAL) * 100 / COUNT(T2.name) FROM enlist AS T1 INNER JOIN person AS T2 ON T1.name = T2.name INNER JOIN enrolled AS T3 ON T3.name = T2.name LEFT JOIN male AS T4 ON T2.name = T4.name WHERE T3.school = 'ucla' AND T1.organ = 'air_force'

Database: movies_4
Question: Please list the names of all the crew members of the movie "Pirates of the Caribbean: At World's End".
Evidence: names refers to person_name; "Pirates of the Caribbean: At World's End" refers to title = 'Pirates of the Caribbean: At World''s End'
SQL: SELECT T3.person_name FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T1.title LIKE 'Pirates of the Caribbean: At World%s End'