Database: address
Question: Give the name of the country and state of the city with elevation of 1039.
Evidence: elevation of 1039 refers to elevation = 1039
SQL: SELECT DISTINCT T1.name, T2.state FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state INNER JOIN zip_data AS T3 ON T2.zip_code = T3.zip_code WHERE T3.elevation = 1039

Database: movie
Question: In romantic movies, how many of them starred by John Travolta?
Evidence: romantic movies refers to Genre = 'Romance'; starred by John Travolta refers to Name = 'John Travolta'
SQL: SELECT COUNT(*) FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Genre = 'Romance' AND T3.Name = 'John Travolta'

Database: sales_in_weather
Question: List out dates when haze is recorded in store 35.
Evidence: store 35 refers to store_nbr = 35; haze is recorded refers to codesum like '%'||'HZ'||'%'
SQL: SELECT T1.`date` FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 35 AND T1.codesum LIKE '%' OR 'HZ' OR '%'

Database: movie_3
Question: What is the average replacement cost of the films under the category of "Horror"?
Evidence: "Horror" is the name of category; average replacement cost = Divide (Sum(replacement_cost), Count(film_id where name = Horror))
SQL: SELECT AVG(T3.replacement_cost) FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id INNER JOIN film AS T3 ON T1.film_id = T3.film_id WHERE T2.name = 'Horror'

Database: donor
Question: Among the projects whose donators are teachers, what is the percentage of projects that affected more than 30 students?
Evidence: donors are teachers refers to is_teacher_acct = 't'; affect more than 30 students refers to students_reached>30; Percentage = Divide(Count(students_reached>30), Count(students_reached))*100
SQL: SELECT CAST(SUM(CASE WHEN T1.students_reached > 30 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.projectid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.is_teacher_acct = 't'

Database: address
Question: What are the top 3 states with the highest Asian population? List the full names of all the representatives in the said states.
Evidence: city with highest asian population refers to Max(Sum(asian_population)); full name refers to first_name, last_name
SQL: SELECT t.state, T1.first_name, T1.last_name FROM zip_data AS T INNER JOIN congress AS T1 ON t.state = T1.abbreviation GROUP BY t.state ORDER BY SUM(t.asian_population) DESC LIMIT 3

Database: law_episode
Question: In which episodes was Anthony Azzara not credited?
Evidence: which episode refers to title; not credited refers to credited = ''
SQL: SELECT T1.title 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 T2.credited = 'false' AND T3.name = 'Anthony Azzara'

Database: codebase_comments
Question: How many liked by people does the solution path "ninject_Ninject\Ninject.sln
" have?
Evidence: how many liked by people refers to Stars; solution path refers to Path; Path = 'ninject_Ninject\Ninject.sln';
SQL: SELECT DISTINCT T1.Stars FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Path = 'ninject_NinjectNinject.sln'

Database: law_episode
Question: What is the title of the episode with the most nominations?
Evidence: the most nominations refers to max(count(episode_id where result = 'Nominee'))
SQL: SELECT T2.title FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.result = 'Nominee' GROUP BY T2.episode_id ORDER BY COUNT(T1.result) DESC LIMIT 1

Database: mental_health_survey
Question: How many users believed that their productivity is ever affected by a mental health issue overall?
Evidence: Users who believed that their productivity is affected by a mental health issues overall refers to AnswerText = 'Yes' where questionid = 54
SQL: SELECT COUNT(T1.UserID) FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questionid = 54 AND T1.AnswerText LIKE 'Yes'

Database: soccer_2016
Question: How many players played as a captain in season year 2008?
Evidence: played as a captain refers to Role_Desc = 'Captain'; in season year 2008 refers Match_Date like '2008%'
SQL: SELECT COUNT(T1.Player_Id) FROM Player_Match AS T1 INNER JOIN Match AS T2 ON T1.Match_Id = T2.Match_Id INNER JOIN Rolee AS T3 ON T1.Role_Id = T3.Role_Id WHERE T3.Role_Desc = 'Captain' AND T2.Match_Date LIKE '2008%'

Database: language_corpus
Question: How much higher in percentage does the word "grec" occur on the page titled "Àbac" than on the page titled "Astronomia"?
Evidence: grec refers to word = 'grec'; Àbac refers to title = 'Àbac'; Astronomia refers to title = 'Astronomia'; percentage = DIVIDE(SUBTRACT(occurrences where title = 'Àbac' AND word = 'grec', occurrences where title = 'Astronomia' AND word = 'grec'), occurrences where title = 'Astronomia' AND word = 'grec')
SQL: SELECT CAST((SUM(CASE WHEN T3.title = 'Àbac' THEN T2.occurrences END) - SUM(CASE WHEN T3.title = 'Astronomia' THEN T2.occurrences END)) AS REAL) * 100 / SUM(CASE WHEN T3.title = 'Astronomia' THEN T2.occurrences END) FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid INNER JOIN pages AS T3 ON T2.pid = T3.pid WHERE T1.word = 'grec'

Database: world
Question: Which country has the most crowded city in the world?
Evidence: most crowded city refers to MAX(Population);
SQL: SELECT T1.Name FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T2.Population DESC LIMIT 1

Database: sales
Question: How many type of products did Dalton M. Coleman purchase?
SQL: SELECT COUNT(T2.ProductID) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.FirstName = 'Dalton' AND T1.MiddleInitial = 'M' AND T1.LastName = 'Coleman'

Database: law_episode
Question: What are the keywords of the episode which received the 2nd-highest number of votes?
Evidence: the 2nd-highest number of votes refers to second max(votes)
SQL: SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.votes NOT IN ( SELECT MAX(T1.votes) FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id ) ORDER BY T1.votes DESC LIMIT 1

Database: movies_4
Question: In Movie No. 19, how many people are there in Department No. 7? Please give me their job.
Evidence: Movie No. 19 refers to movie_id = 19; Department No. 7 refers to department_id = 7
SQL: SELECT COUNT(DISTINCT job) FROM movie_crew WHERE movie_id = 19 AND department_id = 7

Database: menu
Question: Provide the page IDs and name of the menu which had the highest page count.
Evidence: page IDs refers to page_number; highest page count refers to MAX(page_count);
SQL: SELECT T1.page_number, T2.name FROM MenuPage AS T1 INNER JOIN Menu AS T2 ON T2.id = T1.menu_id ORDER BY T2.page_count DESC LIMIT 1

Database: bike_share_1
Question: What is the longest trip duration according? Convert the it to number of days.
Evidence: longest trip duration refers to MAX(duration); days conversion = DIVIDE(duration, 86400);
SQL: SELECT MAX(duration), CAST(MAX(duration) AS REAL) / 86400 FROM trip

Database: movies_4
Question: Provide the overview for the movie "The Pacifier".
Evidence: movie "The Pacifier" refers to title = 'The Pacifier'
SQL: SELECT overview FROM movie WHERE title = 'The Pacifier'

Database: image_and_language
Question: Which object classes belong to the onion category?
Evidence: onion category refers to OBJ_CLASS = 'onion';
SQL: SELECT OBJ_CLASS_ID FROM OBJ_CLASSES WHERE OBJ_CLASS = 'onion'