Unnamed: 0
int64
0
60k
text
stringlengths
109
1.06k
3,000
<question>: Find the first name of the band mate that has performed in most songs. <context>: CREATE TABLE Songs (SongId VARCHAR); CREATE TABLE Band (firstname VARCHAR, id VARCHAR); CREATE TABLE Performance (bandmate VARCHAR) <answer>: SELECT t2.firstname FROM Performance AS t1 JOIN Band AS t2 ON t1.bandmate = t2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY firstname ORDER BY COUNT(*) DESC LIMIT 1
3,001
<question>: Which vocal type has the band mate with first name "Marianne" played the most? <context>: CREATE TABLE vocals (bandmate VARCHAR); CREATE TABLE band (id VARCHAR) <answer>: SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = "Marianne" GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1
3,002
<question>: Who is performing in the back stage position for the song "Der Kapitan"? Show the first name and last name. <context>: CREATE TABLE Band (firstname VARCHAR, lastname VARCHAR, id VARCHAR); CREATE TABLE Performance (bandmate VARCHAR, SongId VARCHAR, StagePosition VARCHAR); CREATE TABLE Songs (SongId VARCHAR, Title VARCHAR) <answer>: SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = "Der Kapitan" AND T1.StagePosition = "back"
3,003
<question>: What are the songs in album "A Kiss Before You Go: Live in Hamburg"? <context>: CREATE TABLE songs (title VARCHAR, songid VARCHAR); CREATE TABLE albums (aid VARCHAR, title VARCHAR); CREATE TABLE tracklists (albumid VARCHAR, songid VARCHAR) <answer>: SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE T1.title = "A Kiss Before You Go: Live in Hamburg"
3,004
<question>: What are all the songs in albums under label "Universal Music Group"? <context>: CREATE TABLE songs (title VARCHAR, songid VARCHAR); CREATE TABLE albums (aid VARCHAR); CREATE TABLE tracklists (albumid VARCHAR, songid VARCHAR) <answer>: SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.label = "Universal Music Group"
3,005
<question>: Find the number of songs in all the studio albums. <context>: CREATE TABLE songs (title VARCHAR, songid VARCHAR); CREATE TABLE albums (aid VARCHAR); CREATE TABLE tracklists (albumid VARCHAR, songid VARCHAR) <answer>: SELECT COUNT(DISTINCT T3.title) FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.type = "Studio"
3,006
<question>: Who is the founder of Sony? <context>: CREATE TABLE manufacturers (founder VARCHAR, name VARCHAR) <answer>: SELECT founder FROM manufacturers WHERE name = 'Sony'
3,007
<question>: Where is the headquarter of the company founded by James? <context>: CREATE TABLE manufacturers (headquarter VARCHAR, founder VARCHAR) <answer>: SELECT headquarter FROM manufacturers WHERE founder = 'James'
3,008
<question>: Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first. <context>: CREATE TABLE manufacturers (name VARCHAR, headquarter VARCHAR, revenue VARCHAR) <answer>: SELECT name, headquarter FROM manufacturers ORDER BY revenue DESC
3,009
<question>: What are the average, maximum and total revenues of all companies? <context>: CREATE TABLE manufacturers (revenue INTEGER) <answer>: SELECT AVG(revenue), MAX(revenue), SUM(revenue) FROM manufacturers
3,010
<question>: How many companies were created by Andy? <context>: CREATE TABLE manufacturers (founder VARCHAR) <answer>: SELECT COUNT(*) FROM manufacturers WHERE founder = 'Andy'
3,011
<question>: Find the total revenue created by the companies whose headquarter is located at Austin. <context>: CREATE TABLE manufacturers (revenue INTEGER, headquarter VARCHAR) <answer>: SELECT SUM(revenue) FROM manufacturers WHERE headquarter = 'Austin'
3,012
<question>: What are the different cities listed? <context>: CREATE TABLE manufacturers (headquarter VARCHAR) <answer>: SELECT DISTINCT headquarter FROM manufacturers
3,013
<question>: Find the number of manufactures that are based in Tokyo or Beijing. <context>: CREATE TABLE manufacturers (headquarter VARCHAR) <answer>: SELECT COUNT(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing'
3,014
<question>: Find the founder of the company whose name begins with the letter 'S'. <context>: CREATE TABLE manufacturers (founder VARCHAR, name VARCHAR) <answer>: SELECT founder FROM manufacturers WHERE name LIKE 'S%'
3,015
<question>: Find the name of companies whose revenue is between 100 and 150. <context>: CREATE TABLE manufacturers (name VARCHAR, revenue INTEGER) <answer>: SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150
3,016
<question>: What is the total revenue of all companies whose main office is at Tokyo or Taiwan? <context>: CREATE TABLE manufacturers (revenue INTEGER, Headquarter VARCHAR) <answer>: SELECT SUM(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan'
3,017
<question>: Find the name of product that is produced by both companies Creative Labs and Sony. <context>: CREATE TABLE manufacturers (code VARCHAR, name VARCHAR); CREATE TABLE products (name VARCHAR, Manufacturer VARCHAR) <answer>: SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony'
3,018
<question>: Find the name, headquarter and founder of the manufacturer that has the highest revenue. <context>: CREATE TABLE manufacturers (name VARCHAR, headquarter VARCHAR, founder VARCHAR, revenue VARCHAR) <answer>: SELECT name, headquarter, founder FROM manufacturers ORDER BY revenue DESC LIMIT 1
3,019
<question>: Find the name, headquarter and revenue of all manufacturers sorted by their revenue in the descending order. <context>: CREATE TABLE manufacturers (name VARCHAR, headquarter VARCHAR, revenue VARCHAR) <answer>: SELECT name, headquarter, revenue FROM manufacturers ORDER BY revenue DESC
3,020
<question>: Find the name of companies whose revenue is greater than the average revenue of all companies. <context>: CREATE TABLE manufacturers (name VARCHAR, revenue INTEGER) <answer>: SELECT name FROM manufacturers WHERE revenue > (SELECT AVG(revenue) FROM manufacturers)
3,021
<question>: Find the name of companies whose revenue is smaller than the revenue of all companies based in Austin. <context>: CREATE TABLE manufacturers (name VARCHAR, revenue INTEGER, headquarter VARCHAR) <answer>: SELECT name FROM manufacturers WHERE revenue < (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin')
3,022
<question>: Find the total revenue of companies whose revenue is larger than the revenue of some companies based in Austin. <context>: CREATE TABLE manufacturers (revenue INTEGER, headquarter VARCHAR) <answer>: SELECT SUM(revenue) FROM manufacturers WHERE revenue > (SELECT MIN(revenue) FROM manufacturers WHERE headquarter = 'Austin')
3,023
<question>: Find the total revenue of companies of each founder. <context>: CREATE TABLE manufacturers (founder VARCHAR, revenue INTEGER) <answer>: SELECT SUM(revenue), founder FROM manufacturers GROUP BY founder
3,024
<question>: Find the name and revenue of the company that earns the highest revenue in each city. <context>: CREATE TABLE manufacturers (name VARCHAR, Headquarter VARCHAR, revenue INTEGER) <answer>: SELECT name, MAX(revenue), Headquarter FROM manufacturers GROUP BY Headquarter
3,025
<question>: Find the total revenue for each manufacturer. <context>: CREATE TABLE manufacturers (name VARCHAR, revenue INTEGER) <answer>: SELECT SUM(revenue), name FROM manufacturers GROUP BY name
3,026
<question>: Find the average prices of all products from each manufacture, and list each company's name. <context>: CREATE TABLE products (price INTEGER, Manufacturer VARCHAR); CREATE TABLE manufacturers (name VARCHAR, code VARCHAR) <answer>: SELECT AVG(T1.price), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name
3,027
<question>: Find the number of different products that are produced by companies at different headquarter cities. <context>: CREATE TABLE manufacturers (Headquarter VARCHAR, code VARCHAR); CREATE TABLE products (name VARCHAR, Manufacturer VARCHAR) <answer>: SELECT COUNT(DISTINCT T1.name), T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.Headquarter
3,028
<question>: Find number of products which Sony does not make. <context>: CREATE TABLE manufacturers (code VARCHAR, name VARCHAR); CREATE TABLE products (name VARCHAR); CREATE TABLE products (name VARCHAR, Manufacturer VARCHAR) <answer>: SELECT COUNT(DISTINCT name) FROM products WHERE NOT name IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony')
3,029
<question>: Find the name of companies that do not make DVD drive. <context>: CREATE TABLE manufacturers (name VARCHAR, code VARCHAR); CREATE TABLE products (Manufacturer VARCHAR, name VARCHAR); CREATE TABLE manufacturers (name VARCHAR) <answer>: SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T1.name = 'DVD drive'
3,030
<question>: Find the number of products for each manufacturer, showing the name of each company. <context>: CREATE TABLE products (Manufacturer VARCHAR); CREATE TABLE manufacturers (name VARCHAR, code VARCHAR) <answer>: SELECT COUNT(*), T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name
3,031
<question>: Select the names of all the products in the store. <context>: CREATE TABLE Products (Name VARCHAR) <answer>: SELECT Name FROM Products
3,032
<question>: Select the names and the prices of all the products in the store. <context>: CREATE TABLE products (name VARCHAR, price VARCHAR) <answer>: SELECT name, price FROM products
3,033
<question>: Select the name of the products with a price less than or equal to $200. <context>: CREATE TABLE products (name VARCHAR, price VARCHAR) <answer>: SELECT name FROM products WHERE price <= 200
3,034
<question>: Find all information of all the products with a price between $60 and $120. <context>: CREATE TABLE products (price INTEGER) <answer>: SELECT * FROM products WHERE price BETWEEN 60 AND 120
3,035
<question>: Compute the average price of all the products. <context>: CREATE TABLE products (price INTEGER) <answer>: SELECT AVG(price) FROM products
3,036
<question>: Compute the average price of all products with manufacturer code equal to 2. <context>: CREATE TABLE products (price INTEGER, Manufacturer VARCHAR) <answer>: SELECT AVG(price) FROM products WHERE Manufacturer = 2
3,037
<question>: Compute the number of products with a price larger than or equal to $180. <context>: CREATE TABLE products (price VARCHAR) <answer>: SELECT COUNT(*) FROM products WHERE price >= 180
3,038
<question>: Select the name and price of all products with a price larger than or equal to $180, and sort first by price (in descending order), and then by name (in ascending order). <context>: CREATE TABLE products (name VARCHAR, price VARCHAR) <answer>: SELECT name, price FROM products WHERE price >= 180 ORDER BY price DESC, name
3,039
<question>: Select all the data from the products and each product's manufacturer. <context>: CREATE TABLE products (manufacturer VARCHAR); CREATE TABLE Manufacturers (code VARCHAR) <answer>: SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code
3,040
<question>: Select the average price of each manufacturer's products, showing only the manufacturer's code. <context>: CREATE TABLE Products (Manufacturer VARCHAR, Price INTEGER) <answer>: SELECT AVG(Price), Manufacturer FROM Products GROUP BY Manufacturer
3,041
<question>: Select the average price of each manufacturer's products, showing the manufacturer's name. <context>: CREATE TABLE Manufacturers (name VARCHAR, code VARCHAR); CREATE TABLE products (Price INTEGER, manufacturer VARCHAR) <answer>: SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name
3,042
<question>: Select the names of manufacturer whose products have an average price higher than or equal to $150. <context>: CREATE TABLE Manufacturers (name VARCHAR, code VARCHAR); CREATE TABLE products (Price INTEGER, manufacturer VARCHAR, price INTEGER) <answer>: SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name HAVING AVG(T1.price) >= 150
3,043
<question>: Select the name and price of the cheapest product. <context>: CREATE TABLE Products (name VARCHAR, price VARCHAR) <answer>: SELECT name, price FROM Products ORDER BY price LIMIT 1
3,044
<question>: Select the name of each manufacturer along with the name and price of its most expensive product. <context>: CREATE TABLE Manufacturers (name VARCHAR, code VARCHAR); CREATE TABLE products (Name VARCHAR, Price INTEGER, manufacturer VARCHAR) <answer>: SELECT T1.Name, MAX(T1.Price), T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name
3,045
<question>: Select the code of the product that is cheapest in each product category. <context>: CREATE TABLE products (code VARCHAR, name VARCHAR, price INTEGER) <answer>: SELECT code, name, MIN(price) FROM products GROUP BY name
3,046
<question>: What is the id of the problem log that is created most recently? <context>: CREATE TABLE problem_log (problem_log_id VARCHAR, log_entry_date VARCHAR) <answer>: SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1
3,047
<question>: What is the oldest log id and its corresponding problem id? <context>: CREATE TABLE problem_log (problem_log_id VARCHAR, problem_id VARCHAR, log_entry_date VARCHAR) <answer>: SELECT problem_log_id, problem_id FROM problem_log ORDER BY log_entry_date LIMIT 1
3,048
<question>: Find all the ids and dates of the logs for the problem whose id is 10. <context>: CREATE TABLE problem_log (problem_log_id VARCHAR, log_entry_date VARCHAR, problem_id VARCHAR) <answer>: SELECT problem_log_id, log_entry_date FROM problem_log WHERE problem_id = 10
3,049
<question>: List all the log ids and their descriptions from the problem logs. <context>: CREATE TABLE problem_log (problem_log_id VARCHAR, log_entry_description VARCHAR) <answer>: SELECT problem_log_id, log_entry_description FROM problem_log
3,050
<question>: List the first and last names of all distinct staff members who are assigned to the problem whose id is 1. <context>: CREATE TABLE problem_log (assigned_to_staff_id VARCHAR, problem_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR) <answer>: SELECT DISTINCT staff_first_name, staff_last_name FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T2.problem_id = 1
3,051
<question>: List the problem id and log id which are assigned to the staff named Rylan Homenick. <context>: CREATE TABLE problem_log (problem_id VARCHAR, problem_log_id VARCHAR, assigned_to_staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_first_name VARCHAR, staff_last_name VARCHAR) <answer>: SELECT DISTINCT T2.problem_id, T2.problem_log_id FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = "Rylan" AND T1.staff_last_name = "Homenick"
3,052
<question>: How many problems are there for product voluptatem? <context>: CREATE TABLE problems (product_id VARCHAR); CREATE TABLE product (product_id VARCHAR, product_name VARCHAR) <answer>: SELECT COUNT(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = "voluptatem"
3,053
<question>: How many problems does the product with the most problems have? List the number of the problems and product name. <context>: CREATE TABLE problems (product_id VARCHAR); CREATE TABLE product (product_name VARCHAR, product_id VARCHAR) <answer>: SELECT COUNT(*), T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY COUNT(*) DESC LIMIT 1
3,054
<question>: Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop. <context>: CREATE TABLE staff (staff_id VARCHAR, staff_first_name VARCHAR); CREATE TABLE problems (problem_description VARCHAR, reported_by_staff_id VARCHAR) <answer>: SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Christop"
3,055
<question>: Find the ids of the problems that are reported by the staff whose last name is Bosco. <context>: CREATE TABLE problems (problem_id VARCHAR, reported_by_staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_last_name VARCHAR) <answer>: SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = "Bosco"
3,056
<question>: What are the ids of the problems which are reported after 1978-06-26? <context>: CREATE TABLE problems (problem_id VARCHAR, date_problem_reported INTEGER) <answer>: SELECT problem_id FROM problems WHERE date_problem_reported > "1978-06-26"
3,057
<question>: What are the ids of the problems which are reported before 1978-06-26? <context>: CREATE TABLE problems (problem_id VARCHAR, date_problem_reported INTEGER) <answer>: SELECT problem_id FROM problems WHERE date_problem_reported < "1978-06-26"
3,058
<question>: For each product which has problems, what are the number of problems and the product id? <context>: CREATE TABLE problems (product_id VARCHAR); CREATE TABLE product (product_id VARCHAR) <answer>: SELECT COUNT(*), T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id
3,059
<question>: For each product that has problems, find the number of problems reported after 1986-11-13 and the product id? <context>: CREATE TABLE product (product_id VARCHAR); CREATE TABLE problems (product_id VARCHAR, date_problem_reported INTEGER) <answer>: SELECT COUNT(*), T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > "1986-11-13" GROUP BY T2.product_id
3,060
<question>: List the names of all the distinct product names in alphabetical order? <context>: CREATE TABLE product (product_name VARCHAR) <answer>: SELECT DISTINCT product_name FROM product ORDER BY product_name
3,061
<question>: List all the distinct product names ordered by product id? <context>: CREATE TABLE product (product_name VARCHAR, product_id VARCHAR) <answer>: SELECT DISTINCT product_name FROM product ORDER BY product_id
3,062
<question>: What are the id of problems reported by the staff named Dameon Frami or Jolie Weber? <context>: CREATE TABLE staff (staff_id VARCHAR, staff_first_name VARCHAR, staff_last_name VARCHAR); CREATE TABLE problems (reported_by_staff_id VARCHAR) <answer>: SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Dameon" AND T2.staff_last_name = "Frami" UNION SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Jolie" AND T2.staff_last_name = "Weber"
3,063
<question>: What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst? <context>: CREATE TABLE problems (reported_by_staff_id VARCHAR, closure_authorised_by_staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_first_name VARCHAR, staff_last_name VARCHAR) <answer>: SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Christop" AND T2.staff_last_name = "Berge" INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Ashley" AND T2.staff_last_name = "Medhurst"
3,064
<question>: What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte? <context>: CREATE TABLE problems (problem_id VARCHAR, reported_by_staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_first_name VARCHAR, staff_last_name VARCHAR); CREATE TABLE problems (reported_by_staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR) <answer>: SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported < (SELECT MIN(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = "Lysanne" AND T4.staff_last_name = "Turcotte")
3,065
<question>: What are the ids of the problems reported after the date of any problems reported by Rylan Homenick? <context>: CREATE TABLE problems (problem_id VARCHAR, reported_by_staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_first_name VARCHAR, staff_last_name VARCHAR); CREATE TABLE problems (reported_by_staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR) <answer>: SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported > (SELECT MAX(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = "Rylan" AND T4.staff_last_name = "Homenick")
3,066
<question>: Find the top 3 products which have the largest number of problems? <context>: CREATE TABLE problems (product_id VARCHAR); CREATE TABLE product (product_name VARCHAR, product_id VARCHAR) <answer>: SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name ORDER BY COUNT(*) DESC LIMIT 3
3,067
<question>: List the ids of the problems from the product "voluptatem" that are reported after 1995? <context>: CREATE TABLE problems (problem_id VARCHAR, product_id VARCHAR, date_problem_reported VARCHAR); CREATE TABLE product (product_id VARCHAR, product_name VARCHAR) <answer>: SELECT T1.problem_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = "voluptatem" AND T1.date_problem_reported > "1995"
3,068
<question>: Find the first and last name of the staff members who reported problems from the product "rem" but not "aut"? <context>: CREATE TABLE product (product_name VARCHAR, product_id VARCHAR); CREATE TABLE staff (staff_first_name VARCHAR, staff_last_name VARCHAR, staff_id VARCHAR); CREATE TABLE problems (product_id VARCHAR, reported_by_staff_id VARCHAR) <answer>: SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = "rem" EXCEPT SELECT T3.staff_first_name, T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = "aut"
3,069
<question>: Find the products which have problems reported by both Lacey Bosco and Kenton Champlin? <context>: CREATE TABLE product (product_name VARCHAR, product_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_first_name VARCHAR, staff_last_name VARCHAR); CREATE TABLE problems (product_id VARCHAR, reported_by_staff_id VARCHAR) <answer>: SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = "Lacey" AND T3.staff_last_name = "Bosco" INTERSECT SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = "Kenton" AND T3.staff_last_name = "Champlin"
3,070
<question>: How many branches where have more than average number of memberships are there? <context>: CREATE TABLE branch (membership_amount INTEGER) <answer>: SELECT COUNT(*) FROM branch WHERE membership_amount > (SELECT AVG(membership_amount) FROM branch)
3,071
<question>: Show name, address road, and city for all branches sorted by open year. <context>: CREATE TABLE branch (name VARCHAR, address_road VARCHAR, city VARCHAR, open_year VARCHAR) <answer>: SELECT name, address_road, city FROM branch ORDER BY open_year
3,072
<question>: What are names for top three branches with most number of membership? <context>: CREATE TABLE branch (name VARCHAR, membership_amount VARCHAR) <answer>: SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3
3,073
<question>: Show all distinct city where branches with at least 100 memberships are located. <context>: CREATE TABLE branch (city VARCHAR, membership_amount VARCHAR) <answer>: SELECT DISTINCT city FROM branch WHERE membership_amount >= 100
3,074
<question>: List all open years when at least two shops are opened. <context>: CREATE TABLE branch (open_year VARCHAR) <answer>: SELECT open_year FROM branch GROUP BY open_year HAVING COUNT(*) >= 2
3,075
<question>: Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London. <context>: CREATE TABLE branch (membership_amount INTEGER, open_year VARCHAR, city VARCHAR) <answer>: SELECT MIN(membership_amount), MAX(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London'
3,076
<question>: Show the city and the number of branches opened before 2010 for each city. <context>: CREATE TABLE branch (city VARCHAR, open_year INTEGER) <answer>: SELECT city, COUNT(*) FROM branch WHERE open_year < 2010 GROUP BY city
3,077
<question>: How many different levels do members have? <context>: CREATE TABLE member (LEVEL VARCHAR) <answer>: SELECT COUNT(DISTINCT LEVEL) FROM member
3,078
<question>: Show card number, name, and hometown for all members in a descending order of level. <context>: CREATE TABLE member (card_number VARCHAR, name VARCHAR, hometown VARCHAR, LEVEL VARCHAR) <answer>: SELECT card_number, name, hometown FROM member ORDER BY LEVEL DESC
3,079
<question>: Show the membership level with most number of members. <context>: CREATE TABLE member (LEVEL VARCHAR) <answer>: SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY COUNT(*) DESC LIMIT 1
3,080
<question>: Show all member names and registered branch names sorted by register year. <context>: CREATE TABLE member (name VARCHAR, member_id VARCHAR); CREATE TABLE membership_register_branch (branch_id VARCHAR, member_id VARCHAR, register_year VARCHAR); CREATE TABLE branch (name VARCHAR, branch_id VARCHAR) <answer>: SELECT T3.name, T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id ORDER BY T1.register_year
3,081
<question>: Show all branch names with the number of members in each branch registered after 2015. <context>: CREATE TABLE branch (name VARCHAR, branch_id VARCHAR); CREATE TABLE membership_register_branch (branch_id VARCHAR, register_year INTEGER) <answer>: SELECT T2.name, COUNT(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year > 2015 GROUP BY T2.branch_id
3,082
<question>: Show member names without any registered branch. <context>: CREATE TABLE member (name VARCHAR, member_id VARCHAR); CREATE TABLE membership_register_branch (name VARCHAR, member_id VARCHAR) <answer>: SELECT name FROM member WHERE NOT member_id IN (SELECT member_id FROM membership_register_branch)
3,083
<question>: List the branch name and city without any registered members. <context>: CREATE TABLE membership_register_branch (name VARCHAR, city VARCHAR, branch_id VARCHAR); CREATE TABLE branch (name VARCHAR, city VARCHAR, branch_id VARCHAR) <answer>: SELECT name, city FROM branch WHERE NOT branch_id IN (SELECT branch_id FROM membership_register_branch)
3,084
<question>: What is the name and open year for the branch with most number of memberships registered in 2016? <context>: CREATE TABLE membership_register_branch (branch_id VARCHAR, register_year VARCHAR); CREATE TABLE branch (name VARCHAR, open_year VARCHAR, branch_id VARCHAR) <answer>: SELECT T2.name, T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year = 2016 GROUP BY T2.branch_id ORDER BY COUNT(*) DESC LIMIT 1
3,085
<question>: Show the member name and hometown who registered a branch in 2016. <context>: CREATE TABLE member (name VARCHAR, hometown VARCHAR, member_id VARCHAR); CREATE TABLE membership_register_branch (member_id VARCHAR, register_year VARCHAR) <answer>: SELECT T2.name, T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T1.register_year = 2016
3,086
<question>: Show all city with a branch opened in 2001 and a branch with more than 100 membership. <context>: CREATE TABLE branch (city VARCHAR, open_year VARCHAR, membership_amount VARCHAR) <answer>: SELECT city FROM branch WHERE open_year = 2001 AND membership_amount > 100
3,087
<question>: Show all cities without a branch having more than 100 memberships. <context>: CREATE TABLE branch (city VARCHAR, membership_amount INTEGER) <answer>: SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount > 100
3,088
<question>: What is the sum of total pounds of purchase in year 2018 for all branches in London? <context>: CREATE TABLE purchase (branch_id VARCHAR, year VARCHAR); CREATE TABLE branch (branch_id VARCHAR, city VARCHAR) <answer>: SELECT SUM(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T2.city = 'London' AND T1.year = 2018
3,089
<question>: What is the total number of purchases for members with level 6? <context>: CREATE TABLE member (member_id VARCHAR, level VARCHAR); CREATE TABLE purchase (member_id VARCHAR) <answer>: SELECT COUNT(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6
3,090
<question>: Find the name of branches where have some members whose hometown is in Louisville, Kentucky and some in Hiram, Georgia. <context>: CREATE TABLE member (member_id VARCHAR, Hometown VARCHAR); CREATE TABLE branch (name VARCHAR, branch_id VARCHAR); CREATE TABLE membership_register_branch (branch_id VARCHAR, member_id VARCHAR) <answer>: SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Louisville , Kentucky' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Hiram , Georgia'
3,091
<question>: list the card number of all members whose hometown address includes word "Kentucky". <context>: CREATE TABLE member (card_number VARCHAR, Hometown VARCHAR) <answer>: SELECT card_number FROM member WHERE Hometown LIKE "%Kentucky%"
3,092
<question>: Find the number of students in total. <context>: CREATE TABLE STUDENT (Id VARCHAR) <answer>: SELECT COUNT(*) FROM STUDENT
3,093
<question>: Find the number of voting records in total. <context>: CREATE TABLE VOTING_RECORD (Id VARCHAR) <answer>: SELECT COUNT(*) FROM VOTING_RECORD
3,094
<question>: Find the distinct number of president votes. <context>: CREATE TABLE VOTING_RECORD (President_Vote VARCHAR) <answer>: SELECT COUNT(DISTINCT President_Vote) FROM VOTING_RECORD
3,095
<question>: Find the maximum age of all the students. <context>: CREATE TABLE STUDENT (Age INTEGER) <answer>: SELECT MAX(Age) FROM STUDENT
3,096
<question>: Find the last names of students with major 50. <context>: CREATE TABLE STUDENT (LName VARCHAR, Major VARCHAR) <answer>: SELECT LName FROM STUDENT WHERE Major = 50
3,097
<question>: Find the first names of students with age above 22. <context>: CREATE TABLE STUDENT (Fname VARCHAR, Age INTEGER) <answer>: SELECT Fname FROM STUDENT WHERE Age > 22
3,098
<question>: What are the majors of male (sex is M) students? <context>: CREATE TABLE STUDENT (Major VARCHAR, Sex VARCHAR) <answer>: SELECT Major FROM STUDENT WHERE Sex = "M"
3,099
<question>: What is the average age of female (sex is F) students? <context>: CREATE TABLE STUDENT (Age INTEGER, Sex VARCHAR) <answer>: SELECT AVG(Age) FROM STUDENT WHERE Sex = "F"