Database: beer_factory
Question: What is the number of the credit card that Frank-Paul Santangelo used to purchase root beers on 2014/7/7?
Evidence: number of the credit card refers to CreditCardNumber; on 2014/7/7 refers to TransactionDate = '2014-07-07';
SQL: SELECT DISTINCT T2.CreditCardNumber FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Frank-Paul' AND T1.Last = 'Santangelo' AND T2.TransactionDate = '2014-07-07'

Database: computer_student
Question: Provide the ID of professors who are teaching high-level or harder undergraduate course.
Evidence: ID of professors refers to taughtBy.p_id; high-level or harder undergraduate course refers to courseLevel = 'Level_400'
SQL: SELECT T2.p_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Level_400'

Database: video_games
Question: What are the sales made by the games in Japan region?
Evidence: sales = SUM(num_sales); Japan region refers to region_name = 'Japan';
SQL: SELECT SUM(CASE WHEN T2.region_name = 'Japan' THEN T1.num_sales ELSE 0 END) AS nums FROM region_sales AS T1 INNER JOIN region AS T2 ON T1.region_id = T2.id

Database: sales
Question: What is the price and name of the product bought by Erica Xu?
SQL: SELECT T3.Price, T3.Name FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T1.ProductID = T3.ProductID WHERE T2.FirstName = 'Erica' AND T2.LastName = 'Xu'

Database: computer_student
Question: Name the advisors for students in Year 3 of the program.
Evidence: advisors refers to p_id_dummy; students in Year 3 of the program refers to yearsInProgram = 'Year_3'
SQL: SELECT T1.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram = 'Year_3'

Database: retail_complains
Question: In complaints received in 2014, how many of them were submitted via call?
Evidence: in 2014 refers to Date received LIKE '2014%'; submitted via call refers to Submitted via = 'Phone'
SQL: SELECT COUNT(T2.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.`Submitted via` = 'Phone' AND strftime('%Y', T1.`Date received`) = '2014'

Database: video_games
Question: In which platform does the game titled 15 Days available?
Evidence: platform refers to platform_name; the game titled 15 Days refers to game_name = '15 Days'
SQL: SELECT T1.platform_name FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id INNER JOIN game AS T4 ON T3.game_id = T4.id WHERE T4.game_name = 'Counter Force'

Database: retails
Question: To which segment belongs the customer that made the most orders in April 1994?
Evidence: segment refers to c_mktsegment; customer made the most orders in April 1994 refers to c_custkey where o_orderdate LIKE '1994-04-%' and MAX(COUNT(o_orderkey));
SQL: SELECT T.c_mktsegment FROM ( SELECT T2.c_mktsegment, COUNT(T1.o_orderkey) AS num FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_orderdate LIKE '1994-04-%' GROUP BY T1.o_custkey ) AS T ORDER BY T.num DESC LIMIT 1

Database: authors
Question: How many authors are affiliated with University of California Berkeley?
Evidence: affiliated refers to Affiliation; 'University of California Berkeley' is the Affiliation
SQL: SELECT COUNT(Id) FROM Author WHERE Affiliation = 'University of California Berkeley'

Database: retail_world
Question: Identify the name and product category for the most expensive and the least expensive products.
Evidence: name of product refers to ProductName; category of product refers to CategoryName; the most expensive products refers to MAX(UnitPrice); the least expensive products refers to MIN(UnitPrice);
SQL: SELECT T2.ProductName, T1.CategoryName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.UnitPrice IN (( SELECT MIN(UnitPrice) FROM Products ), ( SELECT MAX(UnitPrice) FROM Products ))

Database: public_review_platform
Question: How many attributes ID owned by business ID 2?
SQL: SELECT COUNT(attribute_id) FROM Business_Attributes WHERE business_id = 2

Database: olympics
Question: Show the name of the competitor id 90991.
Evidence: name of the competitor refers to full_name;
SQL: SELECT T1.full_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id WHERE T2.id = 90991

Database: talkingdata
Question: How many of the apps belong in the "Equity Fund" category?
SQL: SELECT COUNT(T1.app_id) FROM app_labels AS T1 INNER JOIN label_categories AS T2 ON T1.label_id = T2.label_id WHERE T2.category = 'Equity Fund'

Database: legislator
Question: What is the party of the legislator named Susan M. Collins?
Evidence: legislator's name refers to offical_full_name;
SQL: SELECT T2.party FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Susan M. Collins' GROUP BY T2.party

Database: books
Question: Indicate the last number of each street.
Evidence: street refers to street_name; last number of each street refers to Substr (street_number, -1)
SQL: SELECT street_number FROM address

Database: disney
Question: The character Donald Duck has appeared in two Disney movies, which one has more grossing?
Evidence: Donald Duck is the main character of the movie which refers to hero = 'Donald Duck'; which one has more grossing refers to movie_title where MAX(total_gross);
SQL: SELECT T1.movie_title FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title WHERE T2.hero = 'Donald Duck' ORDER BY CAST(REPLACE(SUBSTR(total_gross, 2), ',', '') AS REAL) DESC LIMIT 1

Database: superstore
Question: How many orders were made by customers who live in Texas at the Central superstore?
Evidence: customer live in Texas refers to State = 'Texas'
SQL: SELECT COUNT(DISTINCT T2.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.State = 'Texas'

Database: menu
Question: Who is the sponsor of menu with ID 12463?
Evidence: FALSE;
SQL: SELECT sponsor FROM Menu WHERE id = 12463

Database: video_games
Question: Indicate the release year of the game with more than 200000 sales in Japan.
Evidence: more than 200000 sales refers to SUM(num_sales) > 2; Japan refers to region_name = 'Japan';
SQL: SELECT DISTINCT T3.release_year FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id WHERE T2.num_sales * 100000 > 200000 AND T1.region_name = 'Japan'

Database: movielens
Question: Among the English comedy movies produced in the UK, how many movies with a running time of 3 was rated the highest by users between the age 45-50? Indicate the movie names.
Evidence: UK is a country
SQL: SELECT DISTINCT T1.movieid FROM movies AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid INNER JOIN u2base AS T3 ON T1.movieid = T3.movieid INNER JOIN users AS T4 ON T3.userid = T4.userid WHERE T1.country = 'UK' AND T2.genre = 'Comedy' AND T1.runningtime = 3 AND T3.rating = 5 AND T4.age BETWEEN 45 AND 50 AND T1.isEnglish = 'T'