Database: chicago_crime
Question: How many districts are there in the police district building with a zip code of 60608?
Evidence: district refers to district_name
SQL: SELECT COUNT(*) AS cnt FROM District WHERE zip_code = 60608

Database: retail_complains
Question: What is the average number of stars given by Oregon clients in their reviews?
Evidence: average = DIVIDE(SUM(State = 'Oregon'), COUNT(district_id)); Oregon refers to state = 'Oregon';
SQL: SELECT CAST(SUM(T3.Stars) AS REAL) / COUNT(T3.Stars) AS average FROM state AS T1 INNER JOIN district AS T2 ON T1.StateCode = T2.state_abbrev INNER JOIN reviews AS T3 ON T2.district_id = T3.district_id WHERE T1.State = 'Oregon'

Database: public_review_platform
Question: How many active businesses are opened during late afternoon in the Phoenix city? List out the top 3 categories name for these businesses.
Evidence: opened during late afternoon refers to Business_Hours where opening_time ≥ '5PM'; active businesses refer to business_id where active = 'true';
SQL: SELECT DISTINCT T4.category_name FROM Business_Hours AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T2.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T2.active = 'true' AND T2.city = 'Phoenix' AND T1.opening_time >= '5PM' LIMIT 3

Database: menu
Question: List the positions of the dish "breaded veal cutlet with peas" on every menu where it appeared.
Evidence: positions = xpos, ypos; breaded veal cutlet with peas is a name of dish;
SQL: SELECT T2.xpos, T2.ypos FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.name = 'breaded veal cutlet with peas'

Database: talkingdata
Question: Which behavior category does user number 5902120154267990000 belong to?
Evidence: behavior category refers to category; number refers to app_id; app_id = 5902120154267990000;
SQL: SELECT T1.category FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id WHERE T2.app_id = 5902120154267990000

Database: simpson_episodes
Question: Describe name, birth country, role in episode and age in 2022 of the oldest crew member..
Evidence: age in 2022 refers to SUBTRACT(2022, substr(birthdate, 0, 5)); oldest refers to MIN(birthdate)
SQL: SELECT T1.name, T1.birth_place, T2.role, 2022 - CAST(SUBSTR(T1.birthdate, 1, 4) AS int) AS age FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T1.birthdate IS NOT NULL ORDER BY T1.birthdate LIMIT 1;

Database: menu
Question: What is the average number of dishes per menu page of menu ID12882?
Evidence: average number of dishes per menu = DIVIDE(COUNT(dish_id), COUNT(page_count));
SQL: SELECT CAST(COUNT(dish_id) AS REAL) / COUNT(T3.page_count) FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id WHERE T2.menu_id = 12882

Database: superstore
Question: Provide the shipping dates and products of the orders by Gene Hale.
Evidence: Gene Hale' refers to "Customer Name"; shipping date refers to "Ship Date"; products refers to "Product Name"
SQL: SELECT DISTINCT T2.`Ship Date`, T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Gene Hale'

Database: food_inspection
Question: What is the description of the low risk violation of Tiramisu Kitchen on 2014/1/14?
Evidence: Tiramisu Kitchen is the name of the business; 2014/1/14 refers to date = '2014-01-14'; low risk violations refer to risk_category = 'Low Risk';
SQL: SELECT T1.description FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.`date` = '2014-01-14' AND T2.name = 'Tiramisu Kitchen' AND T1.risk_category = 'Low Risk'

Database: public_review_platform
Question: How many Yelp businesses are there in 'AZ' with less than "3" stars?
Evidence: AZ refers to state = 'AZ'; stars < 3;
SQL: SELECT COUNT(business_id) FROM Business WHERE state LIKE 'AZ' AND stars < 3

Database: human_resources
Question: How many employees whose performance is poor have a salary of over $50,000 per year?
Evidence: performance is poor refers to performance = 'Poor'; salary of over $50,000 refers to salary > '50000'
SQL: SELECT COUNT(*) FROM employee WHERE performance = 'Poor' AND CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL) > 50000

Database: ice_hockey_draft
Question: Among the players that weigh more than 90 kg, what is the name of the player that has the most attendance in the player's first 7 years of NHL career?
Evidence: weigh more than 90 kg refers to weight_in_kg > 90; name of the player refers to PlayerName; most attendance in the player's first 7 years of NHL career refers to MAX(sum_7yr_GP);
SQL: SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_kg > 90 AND T1.sum_7yr_GP = ( SELECT MAX(T1.sum_7yr_GP) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_kg > 90 )

Database: donor
Question: What is the latitude and longitude of the school where the teacher who wrote "Smile for the Camera!!!" teaches?
Evidence: wrote "Smile for the Camera!!!" refers to title = 'Smile for the Camera!!!'; latitude refers to school_latitude; longitude refers to school_longitude
SQL: SELECT T1.school_latitude, T1.school_longitude FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title = 'Smile for the Camera!!!'

Database: computer_student
Question: What is the sum of year 1 and year 2 students?
Evidence: year 1 and year 2 students refers to yearsInProgram = 'Year_1' and yearsInProgram = 'Year_2' and student = 1
SQL: SELECT COUNT(*) FROM person WHERE yearsInProgram = 'Year_1' OR yearsInProgram = 'Year_2'

Database: retail_world
Question: Is (206) 555-1189 the home phone number for Laura Callahan?
Evidence: "Laura Callahan" refers to FirstName = 'Laura AND LastName = 'Callahan
SQL: SELECT CASE WHEN HomePhone = '(206) 555-1189' THEN 'YES' ELSE 'NO' END FROM Employees WHERE FirstName = 'Laura' AND LastName = 'Callahan'

Database: movie_3
Question: Who among the actors starred in a NC-17 rated film? Provide only the last name of the actors.
Evidence: NC-17 rated refers to rating = 'NC-17'
SQL: SELECT T1.last_name FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.rating = 'NC-17'

Database: sales
Question: List the full names of customers who have purchased products in quantity over 600.
Evidence: full names of customers = FirstName, LastName; quantity over 600 refers to quantity > 600;
SQL: SELECT T1.FirstName, T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Quantity > 600

Database: beer_factory
Question: Among the users that permit the company to send regular emails to them, how many of them had made a transaction with a Visa card in July, 2014?
Evidence: users permit the company to send regular emails to them refers to subscribedtoemaillist = 'TRUE'; Visa card refers to creditcardtype = 'Visa'; in July, 2014 refers to SUBSTR(TransactionDate, 1, 4) = '2014' AND SUBSTR(TransactionDate, 6, 2) = '07';
SQL: SELECT COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.SubscribedToEmailList = 'TRUE' AND T2.CreditCardType = 'Visa' AND STRFTIME('%Y-%m', T2.TransactionDate) = '2014-07'