Database: food_inspection_2
Question: How many of the restaurants with the lowest risk level failed the complaint inspection type?
Evidence: restaurant refers to facility_type = 'Restaurant'; the lowest risk level refers to min(risk_level); failed refers to results = 'Fail'; the complaint inspection type refers to inspection_type = 'Complaint'
SQL: SELECT COUNT(DISTINCT 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.inspection_type = 'Complaint' AND T1.facility_type = 'Restaurant' AND T2.results = 'Fail'

Database: social_media
Question: How many tweets have the male users posted in total?
Evidence: male users refers to Gender = 'Male'; total tweets refers to Count(TweetID)
SQL: SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male'

Database: food_inspection
Question: List owner's name of businesses with a 100 score.
Evidence: owner's name of businesses refers to owner_name;
SQL: SELECT DISTINCT T2.owner_name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.score = 100

Database: address
Question: For the city with the most elders, what's its area code?
Evidence: city with most elders refers to Max(over_65)
SQL: SELECT T2.area_code FROM zip_data AS T1 INNER JOIN area_code AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.area_code ORDER BY T1.over_65 DESC LIMIT 1

Database: car_retails
Question: What is the full address of the office where 4 people work and one of them is Sales Representation?
Evidence: full address = addressLine1+addressLine2; Sales Manager is a job title;
SQL: SELECT T1.addressLine1, T1.addressLine2 FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T2.jobTitle = 'Sales Rep'

Database: authors
Question: What is the ratio of author with affiliation and without affiliation?
Evidence: with affiliation refers to Affiliation is not Null; without affiliation refers to Affiliation IS NULL; Ration = Count(Id(Affiliation is NOT NULL)) : Count (Id (Affiliation IS NULL))
SQL: SELECT CAST(SUM(CASE WHEN Affiliation IS NULL THEN 1 ELSE 0 END) AS REAL) / COUNT(*) FROM Author

Database: shakespeare
Question: Who is the daughter of Capulet?
Evidence: daughter of Capulet refers to characters.Description = 'Daughter to Capulet'
SQL: SELECT CharName FROM characters WHERE Description = 'Daughter to Capulet'

Database: world
Question: What is the percentage of English used in Australia?
Evidence: English refers to Language = 'English'; Australia is a name of country;
SQL: SELECT T2.Percentage FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Australia' AND T2.Language = 'English'

Database: image_and_language
Question: State the total number of the attribute classes.
Evidence: attribute classes refers to ATT_CLASS
SQL: SELECT COUNT(ATT_CLASS_ID) FROM ATT_CLASSES

Database: retail_complains
Question: What was the serve time for the complaint call from client "C00007127" on 2017/2/22?
Evidence: serve time refers to ser_time; longer ser_time means more verbose or longer complaint; on 2017/2/22 refers to "Date received" = '2017-02-22';
SQL: SELECT T1.ser_time FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.Client_ID = 'C00007127' AND T1.`Date received` = '2017-02-22'

Database: university
Question: Indicate the university's name with the highest ranking score in Teaching.
Evidence: university's name refers to university_name; highest ranking score refers to MAX(score); in Teaching refers to criteria_name = 'Teaching'
SQL: SELECT T1.university_name FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id INNER JOIN ranking_criteria AS T3 ON T3.id = T2.ranking_criteria_id WHERE T3.criteria_name = 'Teaching' ORDER BY T2.score DESC LIMIT 1

Database: disney
Question: Who is the voice actor of the character "Binkie Muddlefoot"?
Evidence: FALSE;
SQL: SELECT `voice-actor` FROM `voice-actors` WHERE character = 'Binkie Muddlefoot'

Database: beer_factory
Question: In the reviews of September 2014. Which brand of beers obtained the highest star ratings?
Evidence: September 2014 refers to ReviewDate LIKE '2014-09%'; brand of beers refers to BrandName; highest star ratings refers to MAX(StarRating);
SQL: SELECT DISTINCT T1.BrandName FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T2.StarRating = 5 AND T2.ReviewDate BETWEEN '2014-09-01' AND '2014-09-30'

Database: video_games
Question: In 2004, what are the names of the platforms where Codemasters publish its games?
Evidence: name of platform refers to platform_name; Codemasters refers to publisher_name = 'Codemasters'; in 2004 refers to release_year = 2004
SQL: SELECT T4.platform_name FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id INNER JOIN platform AS T4 ON T3.platform_id = T4.id WHERE T3.release_year = 2004 AND T1.publisher_name = 'Codemasters'

Database: soccer_2016
Question: In the players, how many were out by hit wicket?
Evidence: out by hit wicket refers to Out_Name = 'hit wicket'
SQL: SELECT Player_Out FROM Wicket_Taken AS T1 INNER JOIN Out_Type AS T2 ON T1.Kind_Out = T2.Out_Id WHERE Out_Name = 'hit wicket'

Database: soccer_2016
Question: Provide the winning team's name in the match with the point of winning margin of 7 on May 7, 2009.
Evidence: the winning team refers to Team_Id = Match_Winner; the point of winning margin of 7 refers to Win_Margin = 7; on May 7 2009 refers to Match_Date = '2009-05-07'
SQL: SELECT T1.Team_Name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.Team_Id = T2.Match_Winner WHERE T2.Match_Date = '2009-05-07' AND T2.Win_Margin = 7

Database: cookbook
Question: List the names of recipes that can lead to constipation.
Evidence: lead to constipation refers to iron > 20
SQL: SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.iron > 20

Database: books
Question: What is the average of English books among all books published by Carole Marsh Mysteries?
Evidence: English book refers to language_name = 'English'; 'Carole Marsh Mysteries' is the publisher_name; average = Divide (Count(language_name = 'English'), Count(book_id))
SQL: SELECT CAST(SUM(CASE WHEN T1.language_name = 'English' THEN 1 ELSE 0 END) AS REAL) / COUNT(*) FROM book_language AS T1 INNER JOIN book AS T2 ON T1.language_id = T2.language_id INNER JOIN publisher AS T3 ON T3.publisher_id = T2.publisher_id WHERE T3.publisher_name = 'Carole Marsh Mysteries'

Database: retail_complains
Question: State the first name of male clients who did not receive timely response from the call center.
Evidence: first name refers to first; male refers to sex = 'Male'; did not receive timely response refers to Timely response? = 'No'
SQL: SELECT T1.first FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'No' AND T1.sex = 'Male'

Database: soccer_2016
Question: What is the total number of players born between 1970 to 1975?
Evidence: born between 1970 to 1975 refers to strftime('%Y',DOB) between '1970' and '1975'
SQL: SELECT COUNT(Player_Id) FROM Player WHERE strftime('%Y', DOB) BETWEEN '1970' AND '1975'

Database: books
Question: What is the language of the book with ISBN 23755004321?
Evidence: "23755004321" is the isbn13; language refers to language_name
SQL: SELECT T2.language_name FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T1.isbn13 = 23755004321