query_id
int64
0
7k
database_id
stringclasses
140 values
table_id
sequencelengths
1
5
query
stringlengths
16
224
answer
stringlengths
18
577
difficulty
stringclasses
4 values
5,300
manufactory_1
[ "manufacturers" ]
What are the names of companies with revenue less than the lowest revenue of any manufacturer in Austin?
SELECT name FROM manufacturers WHERE revenue < (SELECT min(revenue) FROM manufacturers WHERE headquarter = 'Austin')
hard
5,301
manufactory_1
[ "manufacturers" ]
Find the total revenue of companies whose revenue is larger than the revenue of some companies based in Austin.
SELECT sum(revenue) FROM manufacturers WHERE revenue > (SELECT min(revenue) FROM manufacturers WHERE headquarter = 'Austin')
hard
5,302
manufactory_1
[ "manufacturers" ]
What is the total revenue of companies with revenue greater than the lowest revenue of any manufacturer in Austin?
SELECT sum(revenue) FROM manufacturers WHERE revenue > (SELECT min(revenue) FROM manufacturers WHERE headquarter = 'Austin')
hard
5,303
manufactory_1
[ "manufacturers" ]
Find the total revenue of companies of each founder.
SELECT sum(revenue) , founder FROM manufacturers GROUP BY founder
medium
5,304
manufactory_1
[ "manufacturers" ]
What is the total revenue of companies started by founder?
SELECT sum(revenue) , founder FROM manufacturers GROUP BY founder
medium
5,305
manufactory_1
[ "manufacturers" ]
Find the name and revenue of the company that earns the highest revenue in each city.
SELECT name , max(revenue) , Headquarter FROM manufacturers GROUP BY Headquarter
medium
5,306
manufactory_1
[ "manufacturers" ]
What are the names and revenues of the companies with the highest revenues in each headquarter city?
SELECT name , max(revenue) , Headquarter FROM manufacturers GROUP BY Headquarter
medium
5,307
manufactory_1
[ "manufacturers" ]
Find the total revenue for each manufacturer.
SELECT sum(revenue) , name FROM manufacturers GROUP BY name
medium
5,308
manufactory_1
[ "manufacturers" ]
What is the total revenue of each manufacturer?
SELECT sum(revenue) , name FROM manufacturers GROUP BY name
medium
5,309
manufactory_1
[ "manufacturers", "products" ]
Find the average prices of all products from each manufacture, and list each company's name.
SELECT avg(T1.price) , T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name
medium
5,310
manufactory_1
[ "manufacturers", "products" ]
What are the average prices of products for each manufacturer?
SELECT avg(T1.price) , T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name
medium
5,311
manufactory_1
[ "manufacturers", "products" ]
Find the number of different products that are produced by companies at different headquarter cities.
SELECT count(DISTINCT T1.name) , T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.Headquarter
medium
5,312
manufactory_1
[ "manufacturers", "products" ]
How many different products are produced in each headquarter city?
SELECT count(DISTINCT T1.name) , T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.Headquarter
medium
5,313
manufactory_1
[ "manufacturers", "products" ]
Find number of products which Sony does not make.
SELECT count(DISTINCT name) FROM products WHERE name NOT IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony')
extra
5,314
manufactory_1
[ "manufacturers", "products" ]
How many products are not made by Sony?
SELECT count(DISTINCT name) FROM products WHERE name NOT IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony')
extra
5,315
manufactory_1
[ "manufacturers", "products" ]
Find the name of companies that do not make DVD drive.
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'
hard
5,316
manufactory_1
[ "manufacturers", "products" ]
What are the names of companies that do not make DVD drives?
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'
hard
5,317
manufactory_1
[ "manufacturers", "products" ]
Find the number of products for each manufacturer, showing the name of each company.
SELECT count(*) , T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name
medium
5,318
manufactory_1
[ "manufacturers", "products" ]
How many products are there for each manufacturer?
SELECT count(*) , T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name
medium
5,319
manufactory_1
[ "Products" ]
Select the names of all the products in the store.
SELECT Name FROM Products
easy
5,320
manufactory_1
[ "Products" ]
What are the names of all products?
SELECT Name FROM Products
easy
5,321
manufactory_1
[ "products" ]
Select the names and the prices of all the products in the store.
SELECT name , price FROM products
medium
5,322
manufactory_1
[ "products" ]
What are the names and prices of all products in the store?
SELECT name , price FROM products
medium
5,323
manufactory_1
[ "products" ]
Select the name of the products with a price less than or equal to $200.
SELECT name FROM products WHERE price <= 200
easy
5,324
manufactory_1
[ "products" ]
What are the names of products with price at most 200?
SELECT name FROM products WHERE price <= 200
easy
5,325
manufactory_1
[ "products" ]
Find all information of all the products with a price between $60 and $120.
SELECT * FROM products WHERE price BETWEEN 60 AND 120
easy
5,326
manufactory_1
[ "products" ]
What is all the information of all the products that have a price between 60 and 120?
SELECT * FROM products WHERE price BETWEEN 60 AND 120
easy
5,327
manufactory_1
[ "products" ]
Compute the average price of all the products.
SELECT avg(price) FROM products
easy
5,328
manufactory_1
[ "products" ]
What is the average price across all products?
SELECT avg(price) FROM products
easy
5,329
manufactory_1
[ "products" ]
Compute the average price of all products with manufacturer code equal to 2.
SELECT avg(price) FROM products WHERE Manufacturer = 2
easy
5,330
manufactory_1
[ "products" ]
What is the average price of products with manufacturer codes equal to 2?
SELECT avg(price) FROM products WHERE Manufacturer = 2
easy
5,331
manufactory_1
[ "products" ]
Compute the number of products with a price larger than or equal to $180.
SELECT count(*) FROM products WHERE price >= 180
easy
5,332
manufactory_1
[ "products" ]
How many products have prices of at least 180?
SELECT count(*) FROM products WHERE price >= 180
easy
5,333
manufactory_1
[ "products" ]
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).
SELECT name , price FROM products WHERE price >= 180 ORDER BY price DESC , name ASC
medium
5,334
manufactory_1
[ "products" ]
What are the names and prices of products that cost at least 180, sorted by price decreasing and name ascending?
SELECT name , price FROM products WHERE price >= 180 ORDER BY price DESC , name ASC
medium
5,335
manufactory_1
[ "Manufacturers", "products" ]
Select all the data from the products and each product's manufacturer.
SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code
easy
5,336
manufactory_1
[ "Manufacturers", "products" ]
What is all the product data, as well as each product's manufacturer?
SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code
easy
5,337
manufactory_1
[ "Products" ]
Select the average price of each manufacturer's products, showing only the manufacturer's code.
SELECT AVG(Price) , Manufacturer FROM Products GROUP BY Manufacturer
medium
5,338
manufactory_1
[ "Products" ]
What are the average prices of products, grouped by manufacturer code?
SELECT AVG(Price) , Manufacturer FROM Products GROUP BY Manufacturer
medium
5,339
manufactory_1
[ "Manufacturers", "products" ]
Select the average price of each manufacturer's products, showing the manufacturer's name.
SELECT avg(T1.Price) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name
medium
5,340
manufactory_1
[ "Manufacturers", "products" ]
What are the average prices of products, grouped by manufacturer name?
SELECT avg(T1.Price) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name
medium
5,341
manufactory_1
[ "Manufacturers", "products" ]
Select the names of manufacturer whose products have an average price higher than or equal to $150.
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
medium
5,342
manufactory_1
[ "Manufacturers", "products" ]
What are the names and average prices of products for manufacturers whose products cost on average 150 or more?
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
medium
5,343
manufactory_1
[ "Products" ]
Select the name and price of the cheapest product.
SELECT name , price FROM Products ORDER BY price ASC LIMIT 1
medium
5,344
manufactory_1
[ "Products" ]
What is the name and price of the cheapest product?
SELECT name , price FROM Products ORDER BY price ASC LIMIT 1
medium
5,345
manufactory_1
[ "Manufacturers", "products" ]
Select the name of each manufacturer along with the name and price of its most expensive product.
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
medium
5,346
manufactory_1
[ "Manufacturers", "products" ]
For each manufacturer name, what are the names and prices of their most expensive product?
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
medium
5,347
manufactory_1
[ "products" ]
Select the code of the product that is cheapest in each product category.
SELECT code , name , min(price) FROM products GROUP BY name
medium
5,348
manufactory_1
[ "products" ]
What are the codes and names of the cheapest products in each category?
SELECT code , name , min(price) FROM products GROUP BY name
medium
5,349
tracking_software_problems
[ "problem_log" ]
What is the id of the problem log that is created most recently?
SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1
medium
5,350
tracking_software_problems
[ "problem_log" ]
Which problem log was created most recently? Give me the log id.
SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1
medium
5,351
tracking_software_problems
[ "problem_log" ]
What is the oldest log id and its corresponding problem id?
SELECT problem_log_id , problem_id FROM problem_log ORDER BY log_entry_date LIMIT 1
medium
5,352
tracking_software_problems
[ "problem_log" ]
Find the oldest log id and its corresponding problem id.
SELECT problem_log_id , problem_id FROM problem_log ORDER BY log_entry_date LIMIT 1
medium
5,353
tracking_software_problems
[ "problem_log" ]
Find all the ids and dates of the logs for the problem whose id is 10.
SELECT problem_log_id , log_entry_date FROM problem_log WHERE problem_id = 10
medium
5,354
tracking_software_problems
[ "problem_log" ]
For the problem with id 10, return the ids and dates of its problem logs.
SELECT problem_log_id , log_entry_date FROM problem_log WHERE problem_id = 10
medium
5,355
tracking_software_problems
[ "problem_log" ]
List all the log ids and their descriptions from the problem logs.
SELECT problem_log_id , log_entry_description FROM problem_log
medium
5,356
tracking_software_problems
[ "problem_log" ]
What are the log id and entry description of each problem?
SELECT problem_log_id , log_entry_description FROM problem_log
medium
5,357
tracking_software_problems
[ "problem_log", "staff" ]
List the first and last names of all distinct staff members who are assigned to the problem whose id is 1.
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
medium
5,358
tracking_software_problems
[ "problem_log", "staff" ]
Which staff members are assigned to the problem with id 1? Give me their first and last names.
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
medium
5,359
tracking_software_problems
[ "problem_log", "staff" ]
List the problem id and log id which are assigned to the staff named Rylan Homenick.
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"
extra
5,360
tracking_software_problems
[ "problem_log", "staff" ]
Which problem id and log id are assigned to the staff named Rylan Homenick?
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"
extra
5,361
tracking_software_problems
[ "problems", "product" ]
How many problems are there for product voluptatem?
SELECT count(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = "voluptatem"
medium
5,362
tracking_software_problems
[ "problems", "product" ]
How many problems did the product called "voluptatem" have in record?
SELECT count(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = "voluptatem"
medium
5,363
tracking_software_problems
[ "problems", "product" ]
How many problems does the product with the most problems have? List the number of the problems and product name.
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
extra
5,364
tracking_software_problems
[ "problems", "product" ]
Which product has the most problems? Give me the number of problems and the product name.
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
extra
5,365
tracking_software_problems
[ "problems", "staff" ]
Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop.
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"
medium
5,366
tracking_software_problems
[ "problems", "staff" ]
Which problems are reported by the staff with first name "Christop"? Show the descriptions of the problems.
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"
medium
5,367
tracking_software_problems
[ "problems", "staff" ]
Find the ids of the problems that are reported by the staff whose last name is Bosco.
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"
medium
5,368
tracking_software_problems
[ "problems", "staff" ]
Which problems are reported by the staff with last name "Bosco"? Show the ids of the problems.
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"
medium
5,369
tracking_software_problems
[ "problems" ]
What are the ids of the problems which are reported after 1978-06-26?
SELECT problem_id FROM problems WHERE date_problem_reported > "1978-06-26"
easy
5,370
tracking_software_problems
[ "problems" ]
Find the ids of the problems reported after 1978-06-26.
SELECT problem_id FROM problems WHERE date_problem_reported > "1978-06-26"
easy
5,371
tracking_software_problems
[ "problems" ]
What are the ids of the problems which are reported before 1978-06-26?
SELECT problem_id FROM problems WHERE date_problem_reported < "1978-06-26"
easy
5,372
tracking_software_problems
[ "problems" ]
Which problems are reported before 1978-06-26? Give me the ids of the problems.
SELECT problem_id FROM problems WHERE date_problem_reported < "1978-06-26"
easy
5,373
tracking_software_problems
[ "product", "problems" ]
For each product which has problems, what are the number of problems and the product id?
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
medium
5,374
tracking_software_problems
[ "product", "problems" ]
For each product with some problems, list the count of problems and the product id.
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
medium
5,375
tracking_software_problems
[ "product", "problems" ]
For each product that has problems, find the number of problems reported after 1986-11-13 and the product id?
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
hard
5,376
tracking_software_problems
[ "product", "problems" ]
What are the products that have problems reported after 1986-11-13? Give me the product id and the count of problems reported after 1986-11-13.
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
hard
5,377
tracking_software_problems
[ "product" ]
List the names of all the distinct product names in alphabetical order?
SELECT DISTINCT product_name FROM product ORDER BY product_name
easy
5,378
tracking_software_problems
[ "product" ]
Sort all the distinct product names in alphabetical order.
SELECT DISTINCT product_name FROM product ORDER BY product_name
easy
5,379
tracking_software_problems
[ "product" ]
List all the distinct product names ordered by product id?
SELECT DISTINCT product_name FROM product ORDER BY product_id
easy
5,380
tracking_software_problems
[ "product" ]
What is the list of distinct product names sorted by product id?
SELECT DISTINCT product_name FROM product ORDER BY product_id
easy
5,381
tracking_software_problems
[ "problems", "staff" ]
What are the id of problems reported by the staff named Dameon Frami or Jolie Weber?
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"
extra
5,382
tracking_software_problems
[ "problems", "staff" ]
Which problems were reported by the staff named Dameon Frami or Jolie Weber? Give me the ids of the problems.
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"
extra
5,383
tracking_software_problems
[ "problems", "staff" ]
What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst?
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"
extra
5,384
tracking_software_problems
[ "problems", "staff" ]
For which product was there a problem reported by Christop Berge, with closure authorised by Ashley Medhurst? Return the product ids.
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"
extra
5,385
tracking_software_problems
[ "problems", "staff" ]
What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte?
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" )
extra
5,386
tracking_software_problems
[ "problems", "staff" ]
Which problems were reported before the date of any problem reported by the staff Lysanne Turcotte? Give me the ids of the problems.
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" )
extra
5,387
tracking_software_problems
[ "problems", "staff" ]
What are the ids of the problems reported after the date of any problems reported by Rylan Homenick?
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" )
extra
5,388
tracking_software_problems
[ "problems", "staff" ]
Find the ids of the problems reported after the date of any problems reported by the staff Rylan Homenick.
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" )
extra
5,389
tracking_software_problems
[ "product", "problems" ]
Find the top 3 products which have the largest number of problems?
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
extra
5,390
tracking_software_problems
[ "product", "problems" ]
What are the three products that have the most problems?s
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
extra
5,391
tracking_software_problems
[ "product", "problems" ]
List the ids of the problems from the product "voluptatem" that are reported after 1995?
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"
medium
5,392
tracking_software_problems
[ "product", "problems" ]
What are the ids of the problems that are from the product "voluptatem" and are reported after 1995?
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"
medium
5,393
tracking_software_problems
[ "product", "problems", "staff" ]
Find the first and last name of the staff members who reported problems from the product "rem" but not "aut"?
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"
extra
5,394
tracking_software_problems
[ "product", "problems", "staff" ]
Which staff members who reported problems from the product "rem" but not "aut"? Give me their first and last names.
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"
extra
5,395
tracking_software_problems
[ "product", "problems", "staff" ]
Find the products which have problems reported by both Lacey Bosco and Kenton Champlin?
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"
extra
5,396
tracking_software_problems
[ "product", "problems", "staff" ]
Which products have problems reported by both the staff named Lacey Bosco and the staff named Kenton Champlin?
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"
extra
5,397
shop_membership
[ "branch" ]
How many branches where have more than average number of memberships are there?
SELECT count(*) FROM branch WHERE membership_amount > (SELECT avg(membership_amount) FROM branch)
hard
5,398
shop_membership
[ "branch" ]
What is the number of branches that have more than the average number of memberships?
SELECT count(*) FROM branch WHERE membership_amount > (SELECT avg(membership_amount) FROM branch)
hard
5,399
shop_membership
[ "branch" ]
Show name, address road, and city for all branches sorted by open year.
SELECT name , address_road , city FROM branch ORDER BY open_year
medium