Database: mental_health_survey
Question: How many users answered "No" to the question "Would you bring up a mental health issue with a potential employer in an interview?" in 2014's survey?
Evidence: 2014 refer to SurveyID; Answered No refer to AnswerText = 'No'; Question refer to questiontext


SQL: SELECT COUNT(T2.UserID) FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID WHERE T1.questiontext = 'Would you bring up a mental health issue with a potential employer in an interview?' AND T2.SurveyID = 2014 AND T2.AnswerText LIKE 'NO'

Database: retail_complains
Question: List all the states in the South region.
SQL: SELECT state FROM state WHERE Region = 'South'

Database: retail_world
Question: List down the customer company names, addresses, phones and faxes which are located in London.
Evidence: in London refers to City = 'London'
SQL: SELECT CompanyName, Address, Phone, Fax FROM Customers WHERE City = 'London'

Database: books
Question: What are the language and title of the ordered books with price less than 20% of the average price of all ordered books?
Evidence: language refers to language_name; books with price less than 20% of the average price refers to price < Multiply (AVG(price), 0.2)
SQL: SELECT DISTINCT T3.language_name, T2.title FROM order_line AS T1 INNER JOIN book AS T2 ON T1.book_id = T2.book_id INNER JOIN book_language AS T3 ON T3.language_id = T2.language_id WHERE T1.price * 100 < ( SELECT AVG(price) FROM order_line ) * 20

Database: superstore
Question: Among all the orders made by Aimee Bixby, what was the longest shipment time?
Evidence: made by Aimee Bixby refers to "Customer Name" = 'Aimee Bixby'; longest shipment time refers to MAX(SUM(SUTRACT(julianday("Ship Date"), julianday("Order Date")), 1))
SQL: SELECT MAX(strftime('%J', `Ship Date`) - strftime('%J', `Order Date`)) AS longestTimeDays FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Aimee Bixby'

Database: olympics
Question: Who has participated in the most Olympic Games in the database?
Evidence: Who refers to full_name; participated in the most Olympic Games refers to MAX(COUNT(games_id));
SQL: SELECT T1.full_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id GROUP BY T2.person_id ORDER BY COUNT(T2.person_id) DESC LIMIT 1

Database: books
Question: How many orders got returned in 2022?
Evidence: orders got returned refers to status_value = 'Returned'; in 2022 refers to SUBSTR(status_date, 1, 4) = '2022'
SQL: SELECT COUNT(*) FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE T1.status_value = 'Returned' AND STRFTIME('%Y', T2.status_date) = '2022'

Database: beer_factory
Question: In which city is the brewery AJ Stephans Beverages located?
Evidence: AJ Stephans refers to BreweryName = 'AJ Stephans Beverages';
SQL: SELECT City FROM rootbeerbrand WHERE BreweryName = 'AJ Stephans Beverages'

Database: video_games
Question: What are the names of the games published by American Softworks?
Evidence: names of the games refers to game_name; American Softworks refers to publisher_name = 'American Softworks';
SQL: SELECT T3.game_name FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T1.publisher_name = 'American Softworks'

Database: shakespeare
Question: What is the chapter description where the paragraph "What, wilt thou hear some music, my sweet love?" belongs?
Evidence: paragraph "What, wilt thou hear some music, my sweet love?" refers to  PlainText = 'What, wilt thou hear some music, my sweet love?'
SQL: SELECT T1.id, T1.Description FROM chapters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.chapter_id WHERE T2.PlainText = 'What, wilt thou hear some music, my sweet love?'

Database: book_publishing_company
Question: List the type of the book for the order which was sold on 1993/5/29.
Evidence: sold on refers to ord_date
SQL: SELECT DISTINCT T1.type FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id WHERE STRFTIME('%Y-%m-%d', T2.ord_date) = '1993-05-29'

Database: soccer_2016
Question: How many matches in 2009 had win margins of less than 10?
Evidence: in 2009 refers to Match_Date like '2009%'; win margins of less than 10 refers to Win_Margin < 10;
SQL: SELECT COUNT(Match_Id) FROM `Match` WHERE Match_Date LIKE '2009%' AND Win_Margin < 10

Database: address
Question: Give the country and area code of the city with zip code 1116.
SQL: SELECT T2.county, T1.area_code FROM area_code AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T1.zip_code = 1116

Database: airline
Question: How many airports have a code starting with the letter C?
Evidence: code starting with the letter C refers to Code like 'C%';
SQL: SELECT COUNT(*) FROM Airports WHERE Code LIKE 'C%'

Database: university
Question: Among the universities with a score in teaching of over 90 in 2011, how many of them are in the United States of America?
Evidence: in 2011 refers to year 2011; in teaching refers to  criteria_name = 'Teaching'; score in teaching of over 90 refers to score > 90; in the United States of America refers to country_name = 'United States of America';
SQL: SELECT COUNT(*) FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T1.criteria_name = 'Teaching' AND T2.year = 2011 AND T2.score > 90

Database: books
Question: Please list the titles of all the books in British English.
Evidence: "British English" is the language_name of the book
SQL: SELECT T1.title FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T2.language_name = 'British English'

Database: soccer_2016
Question: Among all the matches SC Ganguly has played in, what is the highest winning margin?
Evidence: SC Ganguly refers to Player_Name = 'SC Ganguly'; the highest winning margin refers to max(Win_Margin)
SQL: SELECT MAX(T3.Win_Margin) FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Match AS T3 ON T2.Match_Id = T3.Match_Id WHERE T1.Player_Name = 'SC Ganguly'

Database: superstore
Question: What is the ship date of the order by the customer named Ann Chong in the central region?
Evidence: Ann Chong' is the "Customer Name"; Region = 'Central'
SQL: SELECT T2.`Ship Date` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Ann Chong' AND T1.Region = 'Central'

Database: professional_basketball
Question: What is the name of the coach during whose period of coaching, a team has the most numbers of games won in the post-season games?
Evidence: the most number of game won in post season refers to Max(post_wins); coach refers to coachID
SQL: SELECT coachID FROM coaches ORDER BY post_wins DESC LIMIT 1

Database: student_loan
Question: List all the navy students who are disabled.
Evidence: navy students refers to organ = 'navy'; disabled student refers to disabled.name
SQL: SELECT T1.name FROM disabled AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name WHERE T2.organ = 'navy'

Database: simpson_episodes
Question: How many episodes were aired between October and November 2008?
Evidence: between October and November 2008 refers to air_date BETWEEN '2008-10-01' and '2008-11-30'
SQL: SELECT COUNT(episode_id) FROM Episode WHERE air_date LIKE '2008-10%' OR air_date LIKE '2008-11%';

Database: books
Question: Identify by their id all the orders that have been cancelled.
Evidence: have been cancelled refers to status_value = 'cancelled'; id refers to order_id
SQL: SELECT T2.order_id FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE T1.status_value = 'Cancelled'