Database: beer_factory
Question: Please list the full names of the customers who have purchased at least one root beer produced by AJ Stephans Beverages.
Evidence: full name = First, Last; customers who have purchased at least one root beer refers to CustomerID > = 1; produced by AJ Stephans Beverages refers to BreweryName = 'AJ Stephans Beverages';
SQL: SELECT T1.First, T1.Last FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeer AS T3 ON T2.RootBeerID = T3.RootBeerID INNER JOIN rootbeerbrand AS T4 ON T3.BrandID = T4.BrandID WHERE T4.BreweryName = 'AJ Stephans Beverages'

Database: image_and_language
Question: List all the attribute classes of the image ID "15".
Evidence: attribute classes of the image ID "15" refer to ATT_CLASS where IMG_ID = 15;
SQL: SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T2.IMG_ID = 15

Database: movie_3
Question: What are the names of the movies which Laura Brody starred in?
Evidence: name of movie refers to title
SQL: SELECT T3.title 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 T1.first_name = 'Laura' AND T1.last_name = 'Brody'

Database: food_inspection
Question: Please list the names of all the restaurants that have met all requirements in one inspection.
Evidence: met all requirements refers to inspections where score = 100;
SQL: SELECT DISTINCT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.score = 100

Database: image_and_language
Question: Name the most common predicate class of image ID 4434.
Evidence: the most common predicate class of image ID 4434 MAX(PRED_CLASS) where IMG_ID = 4434;
SQL: SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 4434 ORDER BY T2.PRED_CLASS DESC LIMIT 1

Database: sales_in_weather
Question: How many stores belong to the most windy station?
Evidence: most windy station refers to Max(avgspeed)
SQL: SELECT COUNT(store_nbr) FROM relation WHERE station_nbr = ( SELECT station_nbr FROM weather ORDER BY avgspeed DESC LIMIT 1 )

Database: chicago_crime
Question: Give the detailed description of all the crimes against society.
Evidence: crime against society refers to crime_against = 'Society'
SQL: SELECT description FROM FBI_Code WHERE crime_against = 'Society'

Database: chicago_crime
Question: What is the district address associated with the case JB107731?
Evidence: case JB107731 refers to case_number = 'JB107731'
SQL: SELECT T1.address FROM District AS T1 INNER JOIN Crime AS T2 ON T2.district_no = T1.district_no WHERE T2.case_number = 'JB107731'

Database: human_resources
Question: What is the education required for David Whitehead to reach his current position?
Evidence: David Whitehead is the full name of an employee; full name = firstname, lastname
SQL: SELECT T2.educationrequired FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T1.firstname = 'David' AND T1.lastname = 'Whitehead' AND T1.gender = 'M'

Database: public_review_platform
Question: How many "cool" compliments did user number 33 receive?
Evidence: cool compliments refers to compliment_type = 'cool'; user number refers to user_id;
SQL: SELECT COUNT(T2.compliment_type) FROM Users_Compliments AS T1 INNER JOIN Compliments AS T2 ON T1.compliment_id = T2.compliment_id WHERE T1.user_id = 33 AND T2.compliment_type LIKE 'cool'

Database: public_review_platform
Question: Count the active businesses that has an attribute of Wi-Fi with medium review count.
Evidence: active business refers to active = 'true'; 'Wi-Fi' is the attribute_name; medium review count refers to review_count = 'Medium'
SQL: SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T3.attribute_name LIKE 'Wi-Fi' AND T1.active LIKE 'TRUE' AND T1.review_count LIKE 'Medium'

Database: address
Question: What is the name of the state with the most counties?
Evidence: the most counties refer to MAX(COUNT(county));
SQL: SELECT T1.name FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state GROUP BY T2.state ORDER BY COUNT(T2.county) DESC LIMIT 1

Database: university
Question: What is the country ID of the University of Tokyo?
Evidence: University of Tokyo refers to university_name = 'University of Tokyo';
SQL: SELECT country_id FROM university WHERE university_name = 'University of Tokyo'

Database: talkingdata
Question: How many users who are under 30 years old use device model of Galaxy Note 2?
Evidence: under 30 refers to age < 30;
SQL: SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.device_model = 'Galaxy Note 2' AND T1.age < 30

Database: public_review_platform
Question: Calculate the difference between running business in Glendale City and Mesa City.
Evidence: running business refers to business where active = 'true';
SQL: SELECT SUM(CASE WHEN city = 'Glendale' THEN 1 ELSE 0 END) - SUM(CASE WHEN city = 'Mesa' THEN 1 ELSE 0 END) AS diff FROM Business WHERE active = 'true'

Database: public_review_platform
Question: How many stars does each of the 3 top users with the most likes in their reviews have?
Evidence: more likes mean this tip is more valuable; the most likes refers to MAX(likes); stars refers to users_average_stars
SQL: SELECT T2.user_average_stars FROM Tips AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id GROUP BY T2.user_id ORDER BY SUM(T1.likes) DESC LIMIT 3

Database: authors
Question: How many authors finished the paper "An Improved Active Suspension Model for Attitude Control of Electric Vehicles" together?
Evidence: authors refers to AuthorId; 'An Improved Active Suspension Model for Attitude Control of Electric Vehicles' is the Title of a paper; A paper can have more than one author. Co-authorship can be derived from (paper ID, author ID) pair.
SQL: SELECT COUNT(T2.AuthorId) FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'An Improved Active Suspension Model for Attitude Control of Electric Vehicles'

Database: video_games
Question: State the game publisher IDs of the games with a platform ID of 16.
SQL: SELECT T.game_publisher_id FROM game_platform AS T WHERE T.platform_id = 16

Database: soccer_2016
Question: How many players were born in the 80s and have bowling skill of 2?
Evidence: born in the 80s refers to DOB like '198%'; have bowling skill of 2 refers to Bowling_skill = 2;
SQL: SELECT COUNT(Player_Name) FROM Player WHERE DOB LIKE '198%' AND Bowling_skill = 2

Database: soccer_2016
Question: Give me the match ID and date of the matches that were held in Kingsmead for three consecutive days.
Evidence: date of the matches refers to Match_Date; held in Kingsmead refers to Venue_Name = 'Kingsmead'
SQL: SELECT T1.Match_Id, T1.Match_Date FROM `Match` AS T1 INNER JOIN Venue AS T2 ON T1.Venue_Id = T2.Venue_Id WHERE T2.Venue_Name = 'Kingsmead'

Database: university
Question: Please list the IDs of the universities with the top 3 female students percentage in 2011.
Evidence: in 2011 refers to year 2011; top 3 female students percentage refers to MAX(pct_female_students) LIMIT 3; ID of the university refers to university_id
SQL: SELECT university_id FROM university_year WHERE year = 2011 ORDER BY pct_female_students DESC LIMIT 3

Database: talkingdata
Question: How many events have happened on the device of the youngest female user?
Evidence: youngest refers to MIN(age); female refers to gender = 'F';
SQL: SELECT COUNT(T1.event_id) FROM events AS T1 INNER JOIN gender_age AS T2 ON T1.device_id = T2.device_id WHERE T2.gender = 'F' GROUP BY T1.event_id, T2.age ORDER BY T2.age LIMIT 1