Database: menu
Question: What is the average page number of the menus that have the dish "Clear green turtle"?
Evidence: average page number = AVG(page_number); Clear green turtle is a name of dish;
SQL: SELECT AVG(T1.page_number) FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id INNER JOIN Dish AS T3 ON T2.dish_id = T3.id WHERE T3.name = 'Clear green turtle'

Database: bike_share_1
Question: List the name and city of starting stations which has an above-average duration trips.
Evidence: starting stations refers to start_station_name; above average duration trips = DIVIDE(SUM(duration), COUNT(main_trip.id))<duration;
SQL: SELECT DISTINCT T1.start_station_name, T2.city FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.duration > ( SELECT AVG(T1.duration) FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name )

Database: regional_sales
Question: How many orders that Medsep Group had made?
Evidence: Medsep Group is the name of the customer; orders refer to OrderNumber;
SQL: SELECT SUM(CASE WHEN T1.`Customer Names` = 'Medsep Group' THEN 1 ELSE 0 END) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID

Database: chicago_crime
Question: What is the difference between the number of communities that are located on the north and south sides with a population of more than 30,000?
Evidence: population of more than 30000 refers to Population > 30000; 'North' and 'South' both are the side; different number of community refers to Subtract(Count(Community_area_no where side = 'South'), Count(Community_area_no where side = 'North'))
SQL: SELECT SUM(CASE WHEN side = 'South ' THEN 1 ELSE 0 END) - SUM(CASE WHEN side = 'North' THEN 1 ELSE 0 END) AS DIFF FROM Community_Area WHERE population > 300000

Database: simpson_episodes
Question: How many episodes was Dell Hake not included in the credit list?
Evidence: "Dell Hake" is the person; not included in the credit list refers to credited = ''
SQL: SELECT COUNT(*) FROM Credit WHERE person = 'Dell Hake' AND credited = 'false';

Database: soccer_2016
Question: What are the names of players who had been man of the match more than 5 times in season year 2008?
Evidence: man of the match more than 5 times refers to COUNT(Man_of_the_Match) > 5; in season year 2008 refers to Season_Year = 2008; name of player refers to Player_Name;
SQL: SELECT CASE WHEN COUNT(T2.Man_of_the_Match) > 5 THEN T1.Player_Name ELSE 0 END FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match INNER JOIN Player_Match AS T3 ON T3.Player_Id = T1.Player_Id INNER JOIN Season AS T4 ON T2.Season_Id = T4.Season_Id WHERE T4.Season_Year = 2008

Database: olympics
Question: How many athletes playing in Canoeing fall into overweight BMI category in the 2008 Summer games?
Evidence: fall into overweight BMI category refers to DIVIDE(weight), MULTIPLY(height, height) < 30; Canoeing refers to a sport name; the 2008 Summer games refer to games_name = '2008 Summer';
SQL: SELECT COUNT(T5.id) FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id INNER JOIN competitor_event AS T3 ON T2.id = T3.event_id INNER JOIN games_competitor AS T4 ON T3.competitor_id = T4.id INNER JOIN person AS T5 ON T4.person_id = T5.id INNER JOIN games AS T6 ON T4.games_id = T6.id WHERE T1.sport_name = 'Canoeing' AND T6.games_name = '2008 Summer' AND T5.weight * 10000.0 / (T5.height * T5.height) BETWEEN 25.0 AND 30

Database: student_loan
Question: Among the male students, list down the names of students with payment due.
Evidence: male students are mentioned in male.name; with payment due refers to bool = 'pos';
SQL: SELECT T1.name FROM male AS T1 INNER JOIN no_payment_due AS T2 ON T1.name = T2.name WHERE T2.bool = 'pos'

Database: law_episode
Question: Who is the narrator of the "Flight" episode?
Evidence: who refers to name; narrator refers to role = 'Narrator'; the "Flight" episode refers to title = 'Flight'
SQL: SELECT T3.name FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T1.title = 'Flight' AND T2.role = 'Narrator'

Database: olympics
Question: Tell the number of swimming related events.
Evidence: swimming refers to sport_name = 'Swimming';
SQL: SELECT COUNT(T2.event_name) FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id WHERE T1.sport_name = 'Swimming'

Database: sales_in_weather
Question: How many units of item no.5 were sold in store no.3 in total on days with a total precipitation of over 0.05?
Evidence: item no. 5 refers to item_nbr = 5; store no.3 refers to store_nbr = 3; with a total precipitation of over 0.05 refers to preciptotal > 0.05
SQL: SELECT SUM(CASE WHEN T3.preciptotal > 0.05 THEN units ELSE 0 END) AS sum FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND T1.item_nbr = 5

Database: car_retails
Question: If I'm from the Muscle Machine Inc, to which e-mail adress should I write a letter if I want to reach the superior of my sales representitive?
Evidence: Muscle Machine Inc is name of customer; superior refers to 'reportsTO', who is the leader of the 'employeeNumber'
SQL: SELECT t2.email FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t1.customerName = 'Muscle Machine Inc'

Database: music_tracker
Question: Which artist has id "16"? Provide her or his tag genre.
Evidence: FALSE;
SQL: SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.id = 16

Database: shakespeare
Question: What is the long title of the work with the highest number of scenes in act 1?
Evidence: highest number of scenes refers to max(count(Scene))
SQL: SELECT T2.LongTitle FROM chapters AS T1 INNER JOIN works AS T2 ON T1.work_id = T2.id WHERE T1.Act = 1 ORDER BY T1.Scene DESC LIMIT 1

Database: movies_4
Question: How many movies were directed by Michael Bay?
Evidence: directed by refers to job = 'Director'
SQL: SELECT COUNT(T2.movie_id) FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Michael Bay' AND T2.job = 'Director'

Database: ice_hockey_draft
Question: Identify the name and position of the player who has committed the most rule violations.
Evidence: name of the player refers to PlayerName; position of the player refers to position_info; committed the most rule violations refers to MAX(PIM);
SQL: SELECT T2.PlayerName, T2.position_info FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.PIM = ( SELECT MAX(PIM) FROM SeasonStatus )

Database: car_retails
Question: Which countries do the top 5 highest paying customers in a single payment come from? Indicate their entire address.
Evidence: highest paying customer refers to MAX(amount); entire address = addressLine1+addressLine2;
SQL: SELECT DISTINCT T2.country, T2.addressLine1, T2.addressLine2 FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber ORDER BY T1.amount DESC LIMIT 5

Database: law_episode
Question: How many awards has Julia Roberts been nominated for?
Evidence: been nominated refers to result = 'Nominee'
SQL: SELECT COUNT(T2.award_id) FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T1.name = 'Julia Roberts' AND T2.result = 'Nominee'

Database: public_review_platform
Question: How many stars on average does a Yelp_Business in Anthem get from a user review?
Evidence: in Anthem refers to city = 'Anthem'; stars on average = avg(review_stars)
SQL: SELECT AVG(T2.review_stars) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city LIKE 'Anthem'