Database: sales
Question: Calculate the total trading quantity of Abraham sold to Aaron Alexander.
Evidence: total trading quantity = SUM(Quantity WHERE Employees.FirstName = 'Abraham' AND Customers.FirstName = 'Aaron' AND Customers.LastName = 'Alexander');
SQL: SELECT SUM(T2.Quantity) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID WHERE T2.SalesPersonID = 1 AND T1.FirstName = 'Aaron' AND T1.LastName = 'Alexander' AND T3.FirstName = 'Abraham'

Database: movies_4
Question: Who is the director for the movie 'Transformers?'
Evidence: the director refers to person_name where job = 'Director'; movie 'Transformers' refers to title = 'Transformers'
SQL: SELECT T3.person_name FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T1.title = 'Transformers' AND T2.job = 'Director'

Database: movie_platform
Question: Which 1988 movie got the most ratings?
Evidence: 1988 movie refers to movie_release_year = '1998'; most ratings refers to MAX(rating_score)
SQL: SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year = 1988 ORDER BY T1.rating_score DESC LIMIT 1

Database: movie_3
Question: List all the films with the word "Lacklusture" in their description.
Evidence: films refers to title
SQL: SELECT title FROM film_text WHERE description LIKE '%Lacklusture%'

Database: movies_4
Question: For the movie "Reign of Fire", which department was Marcia Ross in?
Evidence: movie "Reign of Fire" refers to title = 'Reign of Fire'; which department refers to department_name
SQL: SELECT T4.department_name FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id INNER JOIN department AS T4 ON T2.department_id = T4.department_id WHERE T3.person_name = 'Marcia Ross' AND T1.title = 'Reign of Fire'

Database: retail_complains
Question: Which state has the highest number of clients who gave a 5-star review?
Evidence: highest number of clients refers to MAX(COUNT(client_id)); 5-star review refers to stars = 5;
SQL: SELECT T2.state_abbrev FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Stars = 5 GROUP BY T2.state_abbrev ORDER BY COUNT(T2.state_abbrev) DESC LIMIT 1

Database: regional_sales
Question: What is the region of stores which have type of "Town" in the list?
SQL: SELECT T FROM ( SELECT DISTINCT CASE  WHEN T2.Type = 'Town' THEN T1.Region END AS T FROM Regions T1 INNER JOIN `Store Locations` T2 ON T2.StateCode = T1.StateCode ) WHERE T IS NOT NULL

Database: soccer_2016
Question: Among the matches in 2013, what is the percentage of winning of the team "Mumbai Indians"?
Evidence: in 2013 refers to Match_Date like '2013%'; winning of the team "Mumbai Indians" refers to Match_Winner = 7; percentage refers to DIVIDE(COUNT(Match_Winner = 7), COUNT(Match_Winner))
SQL: SELECT CAST(SUM(CASE WHEN T2.Match_Winner = 7 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.Match_Winner) FROM Team AS T1 INNER JOIN Match AS T2 ON T1.Team_Id = T2.Match_Winner WHERE T2.Match_Date LIKE '2013%'

Database: address
Question: Count the number of postal points under New York-Newark-Jersey City, NY-NJ-PA.
Evidence: postal points refer to zip_code; under New York-Newark-Jersey City, NY-NJ-PA refers to CBSA_name = 'New York-Newark-Jersey City, NY-NJ-PA';
SQL: SELECT COUNT(T2.zip_code) FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_name = 'New York-Newark-Jersey City, NY-NJ-PA'

Database: bike_share_1
Question: How many stations in San Francisco are installed in 2014?
Evidence: stations refers to name; San Francisco refers to city = 'San Francisco'; installed in 2004 refers to installation_date like'%2014';
SQL: SELECT SUM(CASE WHEN city = 'San Francisco' AND SUBSTR(installation_date, -4) = '2014' THEN 1 ELSE 0 END) FROM station

Database: retail_world
Question: What is the average salary for employees from ID 1 to 9?
Evidence: ID 1 to 9 refers to EmployeeID BETWEEN 1 AND 9; Average salary = AVG(Salary)
SQL: SELECT AVG(Salary) FROM Employees WHERE EmployeeID BETWEEN 1 AND 9

Database: codebase_comments
Question: What is the repository id of the method with tokenized name "crc parameters get hash code"?
Evidence: repository id refers to RepoId; tokenized name refers to NameTokenized; NameTokenized = 'crc parameters get hash code';
SQL: SELECT T1.RepoId FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'crc parameters get hash code'

Database: movie_3
Question: Which district does Maria Miller live in?
Evidence: 'Maria Miller' is a name of a customer; full name refers to first_name, last_name
SQL: SELECT T2.district FROM customer AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Maria' AND T1.last_name = 'Miller'

Database: car_retails
Question: List all customer names with orders that are disputed.
Evidence: Orders that are disputed refer to status = 'Disputed'; the sales representative means employees; names refers to firstName, lastName.
SQL: SELECT t3.firstName, t3.lastName FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber INNER JOIN employees AS t3 ON t2.salesRepEmployeeNumber = t3.employeeNumber WHERE t1.status = 'Disputed'

Database: world_development_indicators
Question: Please list out all annual indicator names of Sudan in 1961?
Evidence: Sudan is the name of the country; Periodicity = 'Annual'; Year = '1961'
SQL: SELECT T1.IndicatorName FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName WHERE T1.CountryName = 'Sudan' AND T1.Year = 1961 AND T2.Periodicity = 'Annual'

Database: soccer_2016
Question: Who was the captain-keeper of Rising Pune Supergiants?
Evidence: captain-keeper refers to Role_Desc = 'CaptainKeeper'; Rising Pune Supergiants refers to Role_Desc = 'CaptainKeeper'
SQL: SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Team AS T3 ON T2.Team_Id = T3.Team_Id INNER JOIN Rolee AS T4 ON T2.Role_Id = T4.Role_Id WHERE T3.Team_Name = 'Rising Pune Supergiants' AND T4.Role_Desc = 'CaptainKeeper' GROUP BY T1.Player_Name

Database: shooting
Question: For case(s) where officer 'Evenden, George' is in charged, state the case number and the grand jury disposition?
Evidence: officer 'Evenden, George' refers to full_name = 'Evenden, George'
SQL: SELECT T1.case_number, T1.grand_jury_disposition FROM incidents AS T1 INNER JOIN officers AS T2 ON T1.case_number = T2.case_number WHERE T2.first_name = 'George' AND T2.last_name = 'Evenden'

Database: language_corpus
Question: Please list any three Wikipedia pages with more than 300 words.
Evidence: more than 300 words refers to words > 300;  list any three means limit 3; Wikipedia pages refers to page;
SQL: SELECT page FROM pages WHERE words > 300 LIMIT 3

Database: movie_3
Question: Please list the full names of all the customers who have rented the film with the highest replacement cost.
Evidence: full name refers to first_name, last_name; highest replacement cost refers to Max(replacement_cost)
SQL: SELECT T1.first_name, T1.last_name FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id ORDER BY T4.replacement_cost DESC LIMIT 1

Database: airline
Question: How many flights of air carrier called JetBlue Airways: B6 have 0 new arrival delay?
Evidence: JetBlue Airways refers to Description = '%JetBlue Airway%'; 0 new arrival delay refers to ARR_DELAY_NEW = 0;
SQL: SELECT COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description LIKE '%JetBlue Airways: B6%' AND T2.ARR_DELAY_NEW = 0