Database: retail_world
Question: Give the full name and contact number of employees in descending order of age.
Evidence: full name refers to FirstName LastName; contact number refers to HomePhone; descending order of age refers to order by BirthDate desc limit 1
SQL: SELECT FirstName, LastName, HomePhone FROM Employees ORDER BY BirthDate DESC

Database: authors
Question: Mention the name of author for paper id 5 and state the keyword of this page.
SQL: SELECT T1.Name, T3.Keyword FROM Author AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.AuthorId INNER JOIN Paper AS T3 ON T2.PaperId = T3.Id WHERE T2.PaperId = 5

Database: human_resources
Question: Please list the social security numbers of the male employees with a salary of over $70,000 a year.
Evidence: social security numbers refers to ssn; male employees refers to gender = 'M'; salary of over $70,000 a year refers to salary > '70000'
SQL: SELECT ssn FROM employee WHERE gender = 'M' AND CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL) > 70000

Database: video_games
Question: What is the name of the publisher that has published the most puzzle games?
Evidence: name of publisher refers to publisher_name; puzzle refers to genre_name = 'Puzzle'; the most puzzle games refers to max(count(game_id where genre_name = 'Puzzle'))
SQL: SELECT T.publisher_name FROM ( SELECT T3.publisher_name, COUNT(DISTINCT T1.id) FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id INNER JOIN genre AS T4 ON T1.genre_id = T4.id WHERE T4.genre_name = 'Puzzle' GROUP BY T3.publisher_name ORDER BY COUNT(DISTINCT T1.id) DESC LIMIT 1 ) t

Database: legislator
Question: List the full name of legislators whose born in 1960.
Evidence: full name refers to official_full_name; born in 1960 refers to birthday_bio like '1960%';
SQL: SELECT official_full_name FROM current WHERE birthday_bio LIKE '1960%'

Database: olympics
Question: For Peter Kohnke, show the name of his/her region.
Evidence: name of his/her region refers to region_name;
SQL: SELECT T1.region_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'Peter Kohnke'

Database: book_publishing_company
Question: List all titles published in year 1991. Also provide notes details of the title and the publisher's name.
Evidence: publisher name refers to pub_name; publication date refers to pubdate; published in year 1991 refers to YEAR(pubdate) = 1991
SQL: SELECT T1.title, T1.notes, T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE STRFTIME('%Y', T1.pubdate) = '1991'

Database: food_inspection_2
Question: What is the category of the inspection of the establishment named "J & J FOOD"?
Evidence: the establishment named "J & J FOOD" refers to dba_name = 'J & J FOOD'
SQL: SELECT DISTINCT T4.category FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id INNER JOIN inspection_point AS T4 ON T3.point_id = T4.point_id WHERE T1.dba_name = 'J & J FOOD'

Database: cookbook
Question: State the title of the recipe with most kinds of ingredients.
Evidence: the most kinds of ingredients refers to MAX(COUNT(recipe_id))
SQL: SELECT T1.title FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id GROUP BY T1.title ORDER BY COUNT(title) DESC LIMIT 1

Database: student_loan
Question: How many students in the Air Force?
Evidence: Air Force refers to organ = 'air_force';
SQL: SELECT COUNT(name) FROM enlist WHERE organ = 'air_force'

Database: world_development_indicators
Question: How many countries in the North America Region has completed the vital registration?
Evidence: has completed the vital registration refers to VitalRegistrationComplete = 'Yes'
SQL: SELECT COUNT(CountryCode) FROM Country WHERE VitalRegistrationComplete = 'Yes' AND Region = 'North America'

Database: retails
Question: Who is the clerk in charge of handling the item with the highest amount of extended price?
Evidence: clerk refers to o_clerk; the highest amount of extended price refers to max(l_extendedprice)
SQL: SELECT T1.o_clerk FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey ORDER BY T2.l_extendedprice DESC LIMIT 1

Database: software_company
Question: List down the geographic identifier with an income that ranges from 2100 to 2500.
Evidence: geographic identifier with an income that ranges from 2100 to 2500 refers to GEOID where INCOME_K BETWEEN 2100 AND 2500;
SQL: SELECT GEOID FROM Demog WHERE INCOME_K >= 2100 AND INCOME_K <= 2500

Database: retail_world
Question: How many employees in the UK takes charge of the sales in over 4 territories?
Evidence: UK refers to Country = 'UK'; employees with over 4 territories refers to EmployeeID WHERE TerritoryID > 4;
SQL: SELECT COUNT(COUNTEID) FROM ( SELECT T1.EmployeeID AS COUNTEID FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.Country = 'UK' GROUP BY T1.EmployeeID HAVING COUNT(T2.TerritoryID) > 4 ) T1

Database: movie_platform
Question: For all the users who gave "A Shot in the Dark" a rating, how many percent of them is a paying subscriber?
Evidence: "A Shot in the Dark" refers to movie_title = 'A Shot in the Dark'; paying subscriber refers to user_has_payment_method = 1; percentage refers to DIVIDE(COUNT(user_has_payment_method = 1),COUNT(user_has_payment_method))*100
SQL: SELECT CAST(SUM(CASE WHEN T1.user_has_payment_method = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN lists_users AS T3 ON T1.user_id = T3.user_id WHERE T2.movie_title = 'A Shot in the Dark'

Database: codebase_comments
Question: How many methods with solutions with path 'maravillas_linq-to-delicious\tasty.sln'?
Evidence: solution refers to SolutionId;
SQL: SELECT COUNT(T2.SolutionId) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'maravillas_linq-to-delicious\tasty.sln'

Database: software_company
Question: Find and list the id and geographic ID of the elderly customers with an education level below 3.
Evidence: elderly customers with an education level below 3 refer to age > 65 where EDUCATIONNUM < 3; geographic ID refers to GEOID;
SQL: SELECT ID, GEOID FROM Customers WHERE EDUCATIONNUM < 3 AND age > 65

Database: retails
Question: List the country name of the customers in the building marketing segment with an account balance greater than 80% of the average account balance of all customers.
Evidence: country name refers to n_name; building marketing segment refers to c_mktsegment = 'BUILDING'; account balance greater than 80% of the average account balance of all customers refers to c_acctbal > MULTIPLY(AVG(c_acctbal), 0.8);
SQL: SELECT T2.n_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey INNER JOIN ( SELECT AVG(c_acctbal) * 0.8 AS avg_acctbal FROM customer ) AS T3 WHERE T1.c_acctbal > T3.avg_acctbal

Database: retail_world
Question: What is the region where the customer who placed the order id 10276 located?
SQL: SELECT T1.Region FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.OrderID = 10276

Database: shipping
Question: Who was the driver of truck no.3 on 2016/9/19? Tell the full name.
Evidence: truck no. 3 refers to truck_id = 3; on 2016/9/19 refers to ship_date = '2016-09-19'; full name refers to first_name, last_name
SQL: SELECT T3.first_name, T3.last_name FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id INNER JOIN driver AS T3 ON T3.driver_id = T2.driver_id WHERE T1.truck_id = '3' AND T2.ship_date = '2016-09-19'