Database: mental_health_survey
Question: What is the average age of the survey respondents in the United States?
Evidence: Average age refer to AVG(AnswerText) where questionid = 1; respondents in the United States refers to AnswerText = 'United States' where questionid = 3
SQL: SELECT CAST(SUM(T1.AnswerText) AS REAL) / COUNT(T1.UserID) FROM Answer AS T1 INNER JOIN ( SELECT T1.UserID FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questionid = 3 AND T1.AnswerText = 'United States' ) AS T2 ON T1.UserID = T2.UserID INNER JOIN Question AS T3 ON T1.QuestionID = T3.questionid WHERE T3.questionid = 1

Database: restaurant
Question: List the restaurant's ID that has a review greater than the 70% of average review of all American restaurants with street number greater than 2000.
Evidence: American restaurant refers to food_type = 'american'; street number greater than 2000 refers to street_num > 2000; review greater than the 70% of average review refers to review > multiply(avg(review), 0.7)
SQL: SELECT T1.id_restaurant FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.food_type = 'american' AND T1.street_num > 2000 GROUP BY T1.id_restaurant ORDER BY AVG(T2.review) * 0.7 DESC

Database: simpson_episodes
Question: List out the star scores of episode which has title of "How the Test Was Won".
Evidence: star scores refers to stars
SQL: SELECT T2.stars FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.title = 'How the Test Was Won';

Database: retail_world
Question: What is the average quantity of product that have been shipped by Federal Shipping in November 1996?
Evidence: Federal Shipping refers to CompanyName = 'Federal Shipping'; DIVIDE(SUM(Quantity), COUNT(ProductID)) where CompanyName = 'Federal Shipping' and ShippedDate > = '1996-11-01 00:00:00' AND ShippedDate < '1996-12-01 00:00:00';
SQL: SELECT CAST(SUM(T2.Quantity) AS REAL) / COUNT(T2.OrderID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Shippers AS T3 ON T1.ShipVia = T3.ShipperID WHERE T1.ShippedDate LIKE '1996-11%' AND T3.CompanyName = 'Federal Shipping'

Database: disney
Question: From 2000 to 2010, in which year did the studio entertainment segment make the most revenue?
Evidence: From 2000 to 2010 refers to Year between 2000 and 2010; the most revenue refers to MAX("Studio Entertainment[NI 1]");
SQL: SELECT `Year` FROM revenue WHERE `Year` BETWEEN 2000 AND 2010 ORDER BY `Studio Entertainment[NI 1]` DESC LIMIT 1

Database: bike_share_1
Question: Calculate the difference between the number of customers and the number of subscribers who did the trip in June 2013.
Evidence: customer refers to subscription_type = 'Customer'; subscribers refers to subscription_type = 'Subscriber'; difference = SUBTRACT(SUM(subscription_type = 'Subscriber' t), SUM(subscription_type = 'Customer')); trip in June 2013 refers to start_date BETWEEN '6/1/2013 0:00'AND '6/31/2013 12:59';
SQL: SELECT SUM(IIF(subscription_type = 'Subscriber', 1, 0)) - SUM(IIF(subscription_type = 'Customer', 1, 0)) FROM trip WHERE start_date LIKE '6/%/2013%'

Database: world_development_indicators
Question: Please list the full names of any three countries that have their series code with a description of UN Energy Statistics (2014).
Evidence: full name refers to longname
SQL: SELECT DISTINCT T2.LongName FROM CountryNotes AS T1 INNER JOIN Country AS T2 ON T1.Countrycode = T2.CountryCode WHERE T1.Description = 'Sources: UN Energy Statistics (2014)' LIMIT 3

Database: codebase_comments
Question: Are the comments for the method "HtmlSharp.HtmlParser.Feed" in XML format?
Evidence: the comment for this method is not XML refers to CommentsXML = 0; the comments for this method is XML refers to CommentsXML = 1
SQL: SELECT CASE WHEN CommentIsXml = 0 THEN 'No' WHEN CommentIsXml = 1 THEN 'Yes' END isXMLFormat FROM Method WHERE Name = 'HtmlSharp.HtmlParser.Feed'

Database: beer_factory
Question: How many transactions were made at Sac State Union?
Evidence: Sac State Union refers to LocationName = 'Sac State Union';
SQL: SELECT COUNT(T1.TransactionID) FROM `transaction` AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.LocationName = 'Sac State Union'

Database: authors
Question: How many papers were published in International Workshop on Inductive Logic Programming from 2001 to 2009?
Evidence: From 2001 to 2009 refer to Year 2001 BETWEEN 2009; 'International Workshop on Inductive Logic Programming' refer to Conference.FullName

SQL: SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'International Workshop on Inductive Logic Programming' AND T1.Year BETWEEN 2001 AND 2009

Database: ice_hockey_draft
Question: What is the birthplace of Aaron Gagnon?
Evidence: FALSE;
SQL: SELECT birthplace FROM PlayerInfo WHERE PlayerName = 'Aaron Gagnon'

Database: simpson_episodes
Question: What was the first award won by the cast or crew member of the show? Give the name of the person who won the said award.
Evidence: won refers to result = 'Winner'; first award refers to Min(year)
SQL: SELECT T2.award, T1.name FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.result = 'Winner' ORDER BY T2.year LIMIT 1;

Database: movie_platform
Question: What are the movie popularity of the movies released in 2021 that were directed by Steven Spielberg? List the names of the movies and their corresponding popularity.
Evidence: movie released in 2021 refers to movie_release_year = 2021; popularity refers to movie_popularity;
SQL: SELECT movie_title, movie_popularity FROM movies WHERE movie_release_year = 2021 AND director_name = 'Steven Spielberg'

Database: world_development_indicators
Question: Which country has had the highest proportion of CO2 emissions from transport?
Evidence: the highest proportion of CO2 emissions from transport refers to max(value where indicatorname = 'CO2 emissions from transport (% of total fuel combustion)')
SQL: SELECT CountryName FROM Indicators WHERE IndicatorName LIKE 'CO2 emissions FROM transport%' ORDER BY Value DESC LIMIT 1

Database: cars
Question: How many times was Ford Maverick introduced to the market?
Evidence: Ford Maverick refers to car_name = 'ford maverick';
SQL: SELECT COUNT(T2.model_year) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'ford maverick'

Database: olympics
Question: Who is the youngest competitor that participated in 2014 Winter?
Evidence: the youngest competitor refers to full_name where MIN(age); in 2014 Winter refers to games_name = '2014 Winter';
SQL: SELECT T3.full_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.games_name = '2014 Winter' ORDER BY T2.age LIMIT 1

Database: address
Question: Name the country with the largest number of households in a residential area.
Evidence: the largest number of households refers to MAX(households);
SQL: SELECT T1.county FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code GROUP BY T1.county ORDER BY T2.households DESC LIMIT 1

Database: retail_world
Question: Among the USA employess, how many of them has PhD title of courtesy?
Evidence: "USA" is the Country; PhD title of courtesy refers to TitleOfCourtesy = 'Dr.'
SQL: SELECT COUNT(Country) FROM Employees WHERE TitleOfCourtesy = 'Dr.' AND Country = 'USA'

Database: legislator
Question: Please list the full official names of all the current legislators who served the term that started on 2013/1/3.
Evidence: term that started on 2013/1/3 refers to start = '2013-01-03';
SQL: SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.start = '2013-01-03'