Database: food_inspection_2
Question: What is the risk level of the establishment that Bob Benson inspected?
SQL: SELECT DISTINCT T3.risk_level FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id INNER JOIN establishment AS T3 ON T2.license_no = T3.license_no WHERE T1.first_name = 'Bob' AND T1.last_name = 'Benson'

Database: legislator
Question: State the number of female legislators in the list.
Evidence: female refers to gender_bio = 'F'
SQL: SELECT COUNT(*) FROM current WHERE gender_bio = 'F'

Database: synthea
Question: What medication did Elly Koss take when she had Streptococcal sore throat?
Evidence: medication refers to DESCRIPTION from medications; Streptococcal sore throat refers to REASONDESCRIPTION like 'Streptococcal sore throat%';
SQL: SELECT T2.description FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.reasondescription = 'Streptococcal sore throat (disorder)'

Database: food_inspection_2
Question: How many inspections were done under the personnel category?
Evidence: under the personnel category refers to category = 'Personnel'
SQL: SELECT COUNT(T1.inspection_id) FROM violation AS T1 INNER JOIN inspection_point AS T2 ON T1.point_id = T2.point_id WHERE T2.category = 'Personnel'

Database: movie_3
Question: Provide any 5 customers' full names who have rented from Mike Hillyer.
Evidence: full name refers to first_name, last_name; 'Mike Hillyer' is a full name of a staff;
SQL: SELECT T3.first_name, T3.last_name FROM staff AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id INNER JOIN customer AS T3 ON T2.address_id = T3.address_id WHERE T1.first_name = 'Mike' AND T1.last_name = 'Hillyer' LIMIT 5

Database: world_development_indicators
Question: Find the countries in south Asia which are in the low-income group. What is the source of their recent income and expenditure data? List it alongside the table name of the countries.
Evidence: South Asia is the name of the region; IncomeGroup = 'Low income';
SQL: SELECT TableName, SourceOfMostRecentIncomeAndExpenditureData FROM Country WHERE Region = 'South Asia' AND IncomeGroup = 'Low income'

Database: chicago_crime
Question: What is the exact location of the crimes that occurred in the Belmont Cragin community?
Evidence: Belmont Cragin community refers to community_area_name = 'Belmont Cragin'; exact location refers to latitude, longitude
SQL: SELECT T2.latitude, T2.longitude FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T2.community_area_no = T1.community_area_no WHERE T1.community_area_name = 'Belmont Cragin' GROUP BY T2.latitude, T2.longitude

Database: world_development_indicators
Question: Among the countries in the High income: OECD group whose currency unit is Euro, how many of them have a note on the series code SP.DYN.AMRT.FE?
Evidence: countries refer to Countrycode; in the high income refers to incomegroup = 'High'; with notes refers to description IS NOT NULL; series code SP.DYN.AMRT.FE refers to Seriescode = 'SP.DYN.AMRT.FE'
SQL: SELECT COUNT(T1.Countrycode) FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.IncomeGroup = 'High income: OECD' AND T1.CurrencyUnit = 'Euro' AND T2.Seriescode = 'SP.DYN.AMRT.FE'

Database: retail_world
Question: What is the contact name and phone number of the customer who has made the most total payment on the order to date?
Evidence: most total payment = Max(Multiply(Quantity, UnitPrice, Subtract(1, Discount)))
SQL: SELECT T1.ContactName, T1.Phone FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID GROUP BY T2.OrderID, T1.ContactName, T1.Phone ORDER BY SUM(T3.UnitPrice * T3.Quantity * (1 - T3.Discount)) DESC LIMIT 1

Database: synthea
Question: Calculate the average age of the male patients that have hypertension.
Evidence: average age = AVG(DIVIDE(SUBTRACT(deathdate is null WHERE (julianday(substr(datetime('now'), 1, 10)))), julianday(patients.birthdate)), 365); male refers to gender = 'M'; hypertension refers to conditions.DESCRIPTION = 'Hypertension'
SQL: SELECT SUM(CASE WHEN T2.deathdate IS NULL THEN ROUND((strftime('%J', date('now')) - strftime('%J', T2.birthdate)) / 365) ELSE ROUND((strftime('%J', T2.deathdate) - strftime('%J', T2.birthdate)) / 365) END) / COUNT(T2.patient) FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Hypertension' AND T2.gender = 'M'

Database: bike_share_1
Question: How many bike stations are installed after August, 2013 in San Jose?
Evidence: installed after August, 2013 refers to year(installation_date)>2013; in San Jose refers to city = 'San Jose';
SQL: SELECT COUNT(installation_date) FROM station WHERE city = 'San Jose' AND (SUBSTR(CAST(installation_date AS TEXT), 1, INSTR(installation_date, '/') - 1) IN ('8', '9', '10', '11', '12') AND SUBSTR(CAST(installation_date AS TEXT), -4) = '2013') OR SUBSTR(CAST(installation_date AS TEXT), -4) > '2013'

Database: public_review_platform
Question: List all the tires businesses that are opened everyday.
Evidence: tires businesses refers to category_name = 'Tires'; opened everyday refers to COUNT(distinct opening_time) = 7;
SQL: SELECT DISTINCT T2.business_id FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id INNER JOIN Business_Hours AS T4 ON T3.business_id = T4.business_id WHERE T1.category_name = 'Tires' GROUP BY T2.business_id HAVING COUNT(day_id) = 7

Database: language_corpus
Question: What is the pair of words that is repeated the most times? Identify them by their ID.
Evidence: repeated the most times refer to MAX(occurrences); pair 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;
SQL: SELECT w1st, w2nd FROM biwords WHERE occurrences = ( SELECT MAX(occurrences) FROM biwords )

Database: beer_factory
Question: How many transactions were made in Sac State Union using the American Express credit card in 2014?
Evidence: Sac State Union refers to LocationName = 'Sac State Union'; American Express credit card refers to CreditCardType = 'American Express'; in 2014 refers to TransactionDate LIKE '2014%';
SQL: SELECT COUNT(T1.TransactionID) FROM `transaction` AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.LocationName = 'Sac State Union' AND T1.CreditCardType = 'American Express' AND T1.TransactionDate BETWEEN '2014-01-01' AND '2014-12-31'

Database: disney
Question: Who directed the movie with the most voice actors?
Evidence: who directed refers director;
SQL: SELECT T2.director, COUNT(DISTINCT T1.`voice-actor`) FROM `voice-actors` AS T1 INNER JOIN director AS T2 ON T1.movie = T2.name GROUP BY T2.director ORDER BY COUNT(DISTINCT T1.`voice-actor`) DESC LIMIT 1

Database: books
Question: What is the full name of the customer who ordered the most books of all time?
Evidence: customer who ordered the most book refers to customer_id where Max(count(order_id)); full name refers to first_name, last_name
SQL: SELECT T1.first_name, T1.last_name FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.first_name, T1.last_name ORDER BY COUNT(*) DESC LIMIT 1

Database: movies_4
Question: What is the language ID of the movie "Walk the Line"?
Evidence: movie "Walk the Line" refers to title = 'Walk the Line'
SQL: SELECT T2.language_id FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'Walk the Line'