Database: book_publishing_company
Question: Among the stores that have ordered the book "Life Without Fear", how many of them are located in Massachusetts?
Evidence: Massachusetts is a state
SQL: SELECT COUNT(T1.stor_id) FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id INNER JOIN titles AS T3 ON T1.title_id = T3.title_id WHERE T2.state = 'Massachusetts'

Database: video_games
Question: Provide any five games and release year under the sports genre.
Evidence: game refers to game_name; under the sports genre refers to genre_name = 'Sports'
SQL: SELECT T3.game_name, T1.release_year FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id INNER JOIN genre AS T4 ON T3.genre_id = T4.id WHERE T4.genre_name = 'Sports' LIMIT 5

Database: language_corpus
Question: List the page id of wikipedia about Catalan language which have the appearance of the word 'decimal'?
Evidence: have the appearance of 'decimal' refers to word = 'decimal'
SQL: SELECT T2.pid FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T1.word = 'decimal'

Database: donor
Question: How to pay the donation of the project that teacher "822b7b8768c17456fdce78b65abcc18e" created?
Evidence: teacher "822b7b8768c17456fdce78b65abcc18e" refers to teacher_acctid = '822b7b8768c17456fdce78b65abcc18e'; how to pay the donation refers to payment_method;
SQL: SELECT T2.payment_method FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.teacher_acctid = '822b7b8768c17456fdce78b65abcc18e'

Database: video_games
Question: Find out the difference between the number of publishers who released the games on the PS3 and X360.
Evidence: difference = SUBTRACT(SUM(platform_name = 'PS3'), SUM(platform_name = 'X360')); PS3 refers to platform_name = 'PS3'; X360 refers to platform_name = 'X360';
SQL: SELECT COUNT(CASE WHEN T2.platform_name = 'PS3' THEN T1.game_publisher_id ELSE NULL END) - COUNT(CASE WHEN T2.platform_name = 'X360' THEN T1.game_publisher_id ELSE NULL END) FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id

Database: authors
Question: What is the full name of the conference in which the paper "2004 YD5" was published?
Evidence: '2004 YD5' is the title of paper
SQL: SELECT T1.FullName FROM Conference AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.ConferenceId WHERE T2.Title = '2004 YD5'

Database: retails
Question: List the name and phone number of customers in India who have an above-average account balance.
Evidence: name of customer refers to c_name; phone number of customer refers to c_phone; customers in India who have an above-average account balance refer to n_name = 'INDIA' and c_acctbal > AVG(c_acctbal);
SQL: SELECT T1.c_name, T1.c_phone FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_acctbal > ( SELECT AVG(c_acctbal) FROM customer ) ORDER BY T1.c_name

Database: movielens
Question: What horror movies have a running time of at least 2? Please list movie IDs.
Evidence: Higher value of running time means running time is longer
SQL: SELECT T1.movieid FROM movies2directors AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.runningtime >= 2 AND T1.genre = 'Horror'

Database: food_inspection_2
Question: What are the names of the businesses that passed with conditions in May 2012?
Evidence: name of business refers to dba_name; passed with conditions refers to results = 'Pass w/ Conditions'; in May 2012 refers to inspection_date like '2012-05%'
SQL: SELECT DISTINCT T2.dba_name FROM inspection AS T1 INNER JOIN establishment AS T2 ON T1.license_no = T2.license_no WHERE strftime('%Y-%m', T1.inspection_date) = '2012-05' AND T1.results = 'Pass w/ Conditions'

Database: books
Question: What is the highest price at which a customer bought the book 'The Prophet'?
Evidence: "The Prophet" is the title of the book; highest price refers to Max(price)
SQL: SELECT MAX(T2.price) FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T1.title = 'The Prophet'

Database: address
Question: What is the average of the white population in the cities with area code 920?
Evidence: AVG(white_population) where area_code = 920;
SQL: SELECT AVG(T2.white_population) FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 920

Database: retail_world
Question: Who is the Sales Agent for the company 'Eastern Connection'?
Evidence: 'Eastern Connection' is a CompanyName; 'Sales Agent' is a ContactTitle
SQL: SELECT ContactName FROM Customers WHERE CompanyName = 'Eastern Connection' AND ContactTitle = 'Sales Agent'

Database: video_games
Question: List the game IDs of the games produced by Abylight.
Evidence: Abylight refers to publisher_name = 'Abylight';
SQL: SELECT T1.game_id FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'Abylight'

Database: professional_basketball
Question: What is the full name of the team that selected Mike Lynn?
Evidence: full name refers to teams.name
SQL: SELECT T1.name FROM teams AS T1 INNER JOIN draft AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.draftYear WHERE T2.firstName = 'Mike' AND T2.lastName = 'Lynn'

Database: retail_complains
Question: What is the first name of clients who have the highest priority?
Evidence: first name refers to first; highest priority refers to priority = 2
SQL: SELECT T1.first FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.priority = ( SELECT MAX(priority) FROM callcenterlogs )

Database: soccer_2016
Question: What is the date of the match that has the highest wager on the final result of a game?
Evidence: date of the match refers to Match_Date; highest wager refers to max(Win_Margin)
SQL: SELECT Match_Date FROM `Match` ORDER BY Win_Margin DESC LIMIT 1

Database: legislator
Question: Among all the current legislators born after the year 1960, how many of them are not google entities?
Evidence: born after the year 1960 refers to strftime('%Y', birthday_bio) > '1960'; not google entities refers to google_entity_id_id is null;
SQL: SELECT COUNT(*) FROM current WHERE strftime('%Y', birthday_bio) > '1960' AND google_entity_id_id IS NULL

Database: movie_platform
Question: List all the titles created by user who was a subsriber when he created the list and have less than 50 movies in the list.
Evidence: have less than 50 movies in the list refers to list_movie_number <50; was a subscriber refers to user_subscriber = 1
SQL: SELECT DISTINCT T2.list_title FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_movie_number < 50 AND T1.user_subscriber = 1

Database: retail_world
Question: List the name of the top ten most ordered product's names in descending order of the number of orders.
Evidence: most ordered refers to max(COUNT(OrderID))
SQL: SELECT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID GROUP BY T3.ProductName ORDER BY COUNT(*) DESC LIMIT 10

Database: movies_4
Question: Which character did Orlando Bloom play in the movie Pirates of the Caribbean: The Curse of the Black Pearl?
Evidence: Which character refers to character_name; movie Pirates of the Caribbean: The Curse of the Black Pearl refers to title = 'Pirates of the Caribbean: The Curse of the Black Pearl'
SQL: SELECT T2.character_name FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T1.title = 'Pirates of the Caribbean: The Curse of the Black Pearl' AND T3.person_name = 'Orlando Bloom'