Database: books
Question: What is the title of the book in the order ID 931?
SQL: SELECT T1.title FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T2.order_id = 931

Database: public_review_platform
Question: What is the average number of stars for businesses in the Obstetricians & Gynecologists category?
Evidence: Obstetricians & Gynecologists category refers to category_name = 'Obstetricians & Gynecologists'; calculation = AVG(stars)
SQL: SELECT CAST(SUM(T1.stars) AS REAL) / COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T3.category_name = 'Obstetricians & Gynecologists'

Database: cookbook
Question: Among the recipes with sea bass, how many percent of recipes can serve 10 people and above?
Evidence: sea bass is a name of an ingredient; can serve 10 people and above refers to servings > = 10; calculation = MULTIPLY(DIVIDE(COUNT(servings > = 10 THEN recipe_id)), COUNT(recipe_id), 100)
SQL: SELECT CAST(SUM(CASE WHEN T1.servings >= 10 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T3.name = 'sea bass steak'

Database: university
Question: How many female students were there at Stanford University in 2011?
Evidence: in 2011 refers to year 2011; female students refers to DIVIDE(MULTIPLY(pct_female_students, num_students), 100); Stanford University refers to university_name = 'Stanford University';
SQL: SELECT CAST(T1.num_students * T1.pct_female_students AS REAL) / 100 FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2011 AND T2.university_name = 'Stanford University'

Database: legislator
Question: How many of the legislators are female?
Evidence: female refers to gender_bio = 'F';
SQL: SELECT COUNT(gender_bio) FROM current WHERE gender_bio = 'F'

Database: language_corpus
Question: What are the words that were paired with "John", list down 10 of them.
Evidence: pair with "John" refers to w1st.word = "John" or w2nd.word = "John"
SQL: SELECT w2nd FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'john' ) LIMIT 10

Database: retails
Question: List any five parts name in Medium Plated Brass.
Evidence: p_type = 'MEDIUM PLATED BRASS'; parts name refer to p_name;
SQL: SELECT p_name FROM part WHERE p_type = 'MEDIUM PLATED BRASS' LIMIT 5

Database: movie_3
Question: Please indicate the full name of actor id 5.
Evidence: full name refers to first_name, last_name
SQL: SELECT first_name, last_name FROM actor WHERE actor_id = 5

Database: food_inspection_2
Question: Provide the facility type and license number of establishments with the lowest risk level but failed the inspection.
Evidence: license number refers to license_no; the lowest risk level refers to min(risk_level); failed the inspection refers to results = 'Fail'
SQL: SELECT DISTINCT T1.facility_type, T1.license_no FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.risk_level = 1 AND T2.results = 'Fail'

Database: college_completion
Question: For the state which has the 113 2-year public schools, tell the number of graduated Asian students who seeks another type of degree or certificate at a 2-year institution in 2013.
Evidence: schools_count = 113; 2-year refers to level = '2-year'; public refers to control = 'public'; Asian refers to race = 'A'; seeks another type of degree or certificate at a 2-year institution refers to cohort = '2y all'; in 2013 refers to year = 2013;
SQL: SELECT COUNT(T2.grad_cohort) FROM state_sector_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.stateid = T1.stateid WHERE T2.level = '2-year' AND T2.control = 'Public' AND T2.gender = 'B' AND T2.race = 'A' AND T2.cohort = '2y all' AND T1.schools_count = 113

Database: food_inspection_2
Question: Provide the names and locations of the facilities that failed inspections on 29th July 2013.
Evidence: name refers to dba_name; location refers to latitude, longitude; failed inspections refers to results = 'Fail'; on 29th July 2013 refers to inspection_date = '2013-07-29'
SQL: SELECT T2.dba_name, T2.longitude, T2.latitude FROM inspection AS T1 INNER JOIN establishment AS T2 ON T1.license_no = T2.license_no WHERE T1.inspection_date = '2013-07-29' AND T1.results = 'Fail'

Database: student_loan
Question: What is the organization enlisted by student168?
Evidence: organization refers to organ; student168 is a name of student;
SQL: SELECT organ FROM enlist WHERE name = 'student168'

Database: retail_world
Question: Write down the top ten companies with the most total sales by amount.
Evidence: most total sales refers to Max(SaleAmount); companies refers to CompanyName
SQL: SELECT CompanyName FROM `Sales Totals by Amount` ORDER BY SaleAmount DESC LIMIT 10

Database: world
Question: Among the languages used in Baltic Countries, provide the languages which are used by over 80%.


Evidence: Baltic Countries refers to Region = 'Baltic Countries'; languages which are used by over 80% refers to Percentage > 80;
SQL: SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Region = 'Baltic Countries' AND T2.Percentage > 80

Database: book_publishing_company
Question: What is the publisher's information of New Moon Books?
Evidence: publisher name refers to pub_name; New Moon Books is a publisher name
SQL: SELECT T1.pr_info FROM pub_info AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.pub_name = 'New Moon Books'

Database: retail_complains
Question: What is the average number of complaints on credit cards filed by clients from New York in the 3 consecutive years starting from 2015?
Evidence: average = AVG(Complaint ID); credit cards refers to Product = 'Credit card'; New York refers to city = 'New York'; 3 consecutive years starting from 2015 refers to "Date received" BETWEEN 2015 AND 2017;
SQL: SELECT CAST(COUNT(T2.`Complaint ID`) AS REAL) / 3 AS average FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) BETWEEN '2015' AND '2017' AND T1.city = 'New York City' AND T2.Product = 'Credit card'

Database: airline
Question: How many cancelled flights are there?
Evidence: cancelled flights refers to CANCELLED = 1;
SQL: SELECT COUNT(*) FROM Airlines WHERE CANCELLED = 1

Database: retails
Question: Among all the orders made by a customer in the household segment, what is the highest total price?
Evidence: orders in household segment refer to o_orderkey where c_mktsegment = 'HOUSEHOLD'; the highest total price refers to MAX(o_totalprice);
SQL: SELECT MAX(T1.o_totalprice) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD'

Database: sales_in_weather
Question: What is the maximum and minimum temperature for station number 1 on 15 January 2012?
Evidence: station number 1 refers to station_nbr = 1 ; minimum temperature = tmin; maximum temperature = tmax; on 15 January 2012 refers to date = '2012-01-15'
SQL: SELECT tmax, tmin FROM weather WHERE station_nbr = 1 AND `date` = '2012-01-15'

Database: student_loan
Question: How many students belong to the navy department?
Evidence: belong to the navy department refers to organ = 'navy';
SQL: SELECT COUNT(name) FROM enlist WHERE organ = 'navy'

Database: retail_world
Question: What is the full address of Andr Fonseca?
Evidence: full address includes Address, City, Region, PostalCode and Country; ContactName = 'Andr Fonseca';
SQL: SELECT Address, City, Region, PostalCode, Country FROM Customers WHERE ContactName = 'Andr Fonseca'