question string | answer string | context string | dialect string | spider_hardness string | extended_hardness string | classification_status string | syntax_status string | ddl_syntax_status string | schema_status string | syntax_errors list | ddl_syntax_errors list | schema_errors list | classification_errors list | status_history list | correction_status string | component1 int64 | component2 int64 | others int64 | validation_source dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Select the names and the prices of all the products in the store. | SELECT name, price FROM products | CREATE TABLE products (name VARCHAR(255), price VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 3032
} |
Select the name of the products with a price less than or equal to $200. | SELECT name FROM products WHERE price <= 200 | CREATE TABLE products (name VARCHAR(255), price VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3033
} |
Compute the average price of all the products. | SELECT AVG(price) FROM products | CREATE TABLE products (price INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 3035
} |
Compute the average price of all products with manufacturer code equal to 2. | SELECT AVG(price) FROM products WHERE Manufacturer = 2 | CREATE TABLE products (price INTEGER, Manufacturer VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3036
} |
Compute the number of products with a price larger than or equal to $180. | SELECT COUNT(*) FROM products WHERE price >= 180 | CREATE TABLE products (price VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3037
} |
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 | CREATE TABLE products (name VARCHAR(255), price VARCHAR(255)) | generic | null | medium | extended | valid | valid | valid | [] | [] | [] | [
"Mixed ORDER BY directions"
] | [
"validated",
"extended",
"extended"
] | null | null | null | null | {
"split": "train",
"row_index": 3038
} |
Select the average price of each manufacturer's products, showing only the manufacturer's code. | SELECT AVG(Price), Manufacturer FROM Products GROUP BY Manufacturer | CREATE TABLE Products (Manufacturer VARCHAR(255), Price INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 3040
} |
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 | CREATE TABLE Manufacturers (name VARCHAR(255), code VARCHAR(255)); CREATE TABLE products (Price INTEGER, manufacturer VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 3041
} |
Select the name and price of the cheapest product. | SELECT name, price FROM Products ORDER BY price LIMIT 1 | CREATE TABLE Products (name VARCHAR(255), price VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 3043
} |
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 | CREATE TABLE Manufacturers (name VARCHAR(255), code VARCHAR(255)); CREATE TABLE products (Name VARCHAR(255), Price INTEGER, manufacturer VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 3044
} |
Select the code of the product that is cheapest in each product category. | SELECT code, name, MIN(price) FROM products GROUP BY name | CREATE TABLE products (code VARCHAR(255), name VARCHAR(255), price INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 3045
} |
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 | CREATE TABLE problem_log (problem_log_id VARCHAR(255), log_entry_date VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 3046
} |
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 | CREATE TABLE problem_log (problem_log_id VARCHAR(255), problem_id VARCHAR(255), log_entry_date VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 3047
} |
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 | CREATE TABLE problem_log (problem_log_id VARCHAR(255), log_entry_date VARCHAR(255), problem_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 3048
} |
List all the log ids and their descriptions from the problem logs. | SELECT problem_log_id, log_entry_description FROM problem_log | CREATE TABLE problem_log (problem_log_id VARCHAR(255), log_entry_description VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 3049
} |
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' | CREATE TABLE problem_log (problem_id VARCHAR(255), problem_log_id VARCHAR(255), assigned_to_staff_id VARCHAR(255)); CREATE TABLE staff (staff_id VARCHAR(255), staff_first_name VARCHAR(255), staff_last_name VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 2 | {
"split": "train",
"row_index": 3051
} |
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' | CREATE TABLE problems (product_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE product (product_id VARCHAR(255), product_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 3052
} |
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 | CREATE TABLE problems (product_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE product (product_name VARCHAR(255), product_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 2 | {
"split": "train",
"row_index": 3053
} |
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' | CREATE TABLE staff (staff_id VARCHAR(255), staff_first_name VARCHAR(255), staff_last_name VARCHAR(255)); CREATE TABLE problems (problem_description VARCHAR(255), reported_by_staff_id VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 3054
} |
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' | CREATE TABLE problems (problem_id VARCHAR(255), reported_by_staff_id VARCHAR(255)); CREATE TABLE staff (staff_id VARCHAR(255), staff_last_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 3055
} |
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' | CREATE TABLE problems (problem_id VARCHAR(255), date_problem_reported INTEGER) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3056
} |
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' | CREATE TABLE problems (problem_id VARCHAR(255), date_problem_reported INTEGER) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3057
} |
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 | CREATE TABLE problems (product_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE product (product_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 3058
} |
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 | CREATE TABLE product (product_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE problems (product_id VARCHAR(255), date_problem_reported INTEGER) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 3059
} |
List the names of all the distinct product names in alphabetical order? | SELECT DISTINCT product_name FROM product ORDER BY product_name | CREATE TABLE product (product_name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3060
} |
List all the distinct product names ordered by product id? | SELECT DISTINCT product_name FROM product ORDER BY product_id | CREATE TABLE product (product_name VARCHAR(255), product_id VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3061
} |
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 | CREATE TABLE problems (product_id VARCHAR(255)); CREATE TABLE product (product_name VARCHAR(255), product_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 4 | 0 | 0 | {
"split": "train",
"row_index": 3066
} |
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' | CREATE TABLE problems (problem_id VARCHAR(255), product_id VARCHAR(255), date_problem_reported VARCHAR(255)); CREATE TABLE product (product_id VARCHAR(255), product_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 3067
} |
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... | CREATE TABLE product (product_name VARCHAR(255), product_id VARCHAR(255)); CREATE TABLE staff (staff_first_name VARCHAR(255), staff_last_name VARCHAR(255), staff_id VARCHAR(255)); CREATE TABLE problems (product_id VARCHAR(255), reported_by_staff_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 1 | 1 | {
"split": "train",
"row_index": 3068
} |
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.pr... | CREATE TABLE product (product_name VARCHAR(255), product_id VARCHAR(255)); CREATE TABLE staff (staff_id VARCHAR(255), staff_first_name VARCHAR(255), staff_last_name VARCHAR(255)); CREATE TABLE problems (product_id VARCHAR(255), reported_by_staff_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 1 | 1 | {
"split": "train",
"row_index": 3069
} |
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) | CREATE TABLE branch (membership_amount INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 3070
} |
Show name, address road, and city for all branches sorted by open year. | SELECT name, address_road, city FROM branch ORDER BY open_year | CREATE TABLE branch (name VARCHAR(255), address_road VARCHAR(255), city VARCHAR(255), open_year VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 3071
} |
What are names for top three branches with most number of membership? | SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3 | CREATE TABLE branch (name VARCHAR(255), membership_amount VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 3072
} |
Show all distinct city where branches with at least 100 memberships are located. | SELECT DISTINCT city FROM branch WHERE membership_amount >= 100 | CREATE TABLE branch (city VARCHAR(255), membership_amount VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3073
} |
List all open years when at least two shops are opened. | SELECT open_year FROM branch GROUP BY open_year HAVING COUNT(*) >= 2 | CREATE TABLE branch (open_year VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3074
} |
Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London. | SELECT MIN(membership_amount), MAX(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London' | CREATE TABLE branch (membership_amount INTEGER, open_year VARCHAR(255), city VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 3 | {
"split": "train",
"row_index": 3075
} |
Show the city and the number of branches opened before 2010 for each city. | SELECT city, COUNT(*) FROM branch WHERE open_year < 2010 GROUP BY city | CREATE TABLE branch (city VARCHAR(255), open_year INTEGER) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 3076
} |
How many different levels do members have? | SELECT COUNT(DISTINCT LEVEL) FROM member | CREATE TABLE member (LEVEL VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 3077
} |
Show card number, name, and hometown for all members in a descending order of level. | SELECT card_number, name, hometown FROM member ORDER BY LEVEL DESC | CREATE TABLE member (card_number VARCHAR(255), name VARCHAR(255), hometown VARCHAR(255), LEVEL VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 3078
} |
Show the membership level with most number of members. | SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE member (LEVEL VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 3079
} |
Show all member names and registered branch names sorted by register year. | 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 | CREATE TABLE member (name VARCHAR(255), member_id VARCHAR(255)); CREATE TABLE membership_register_branch (branch_id VARCHAR(255), member_id VARCHAR(255), register_year VARCHAR(255)); CREATE TABLE branch (name VARCHAR(255), branch_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 3080
} |
Show all branch names with the number of members in each branch registered after 2015. | 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 | CREATE TABLE branch (name VARCHAR(255), branch_id VARCHAR(255)); CREATE TABLE membership_register_branch (branch_id VARCHAR(255), register_year INTEGER) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 3081
} |
Show member names without any registered branch. | SELECT name FROM member WHERE NOT member_id IN (SELECT member_id FROM membership_register_branch) | CREATE TABLE member (name VARCHAR(255), member_id VARCHAR(255)); CREATE TABLE membership_register_branch (name VARCHAR(255), member_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 0 | {
"split": "train",
"row_index": 3082
} |
List the branch name and city without any registered members. | SELECT name, city FROM branch WHERE NOT branch_id IN (SELECT branch_id FROM membership_register_branch) | CREATE TABLE membership_register_branch (name VARCHAR(255), city VARCHAR(255), branch_id VARCHAR(255)); CREATE TABLE branch (name VARCHAR(255), city VARCHAR(255), branch_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 1 | 1 | {
"split": "train",
"row_index": 3083
} |
What is the name and open year for the branch with most number of memberships registered in 2016? | 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 | CREATE TABLE membership_register_branch (branch_id VARCHAR(255), register_year VARCHAR(255)); CREATE TABLE branch (name VARCHAR(255), open_year VARCHAR(255), branch_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 5 | 0 | 1 | {
"split": "train",
"row_index": 3084
} |
Show the member name and hometown who registered a branch in 2016. | 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 | CREATE TABLE member (name VARCHAR(255), hometown VARCHAR(255), member_id VARCHAR(255)); CREATE TABLE membership_register_branch (member_id VARCHAR(255), register_year VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 3085
} |
Show all city with a branch opened in 2001 and a branch with more than 100 membership. | SELECT city FROM branch WHERE open_year = 2001 AND membership_amount > 100 | CREATE TABLE branch (city VARCHAR(255), open_year VARCHAR(255), membership_amount VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 3086
} |
Show all cities without a branch having more than 100 memberships. | SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount > 100 | CREATE TABLE branch (city VARCHAR(255), membership_amount INTEGER) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 1 | 0 | {
"split": "train",
"row_index": 3087
} |
What is the total number of purchases for members with level 6? | SELECT COUNT(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6 | CREATE TABLE member (member_id VARCHAR(255), level VARCHAR(255)); CREATE TABLE purchase (member_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 3089
} |
Find the name of branches where have some members whose hometown is in Louisville, Kentucky and some in Hiram, Georgia. | 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 ... | CREATE TABLE member (member_id VARCHAR(255), Hometown VARCHAR(255)); CREATE TABLE branch (name VARCHAR(255), branch_id VARCHAR(255)); CREATE TABLE membership_register_branch (branch_id VARCHAR(255), member_id VARCHAR(255)) | generic | extra | extra | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 1 | 0 | {
"split": "train",
"row_index": 3090
} |
list the card number of all members whose hometown address includes word "Kentucky". | SELECT card_number FROM member WHERE Hometown LIKE '%Kentucky%' | CREATE TABLE member (card_number VARCHAR(255), Hometown VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 3091
} |
Find the number of students in total. | SELECT COUNT(*) FROM STUDENT | CREATE TABLE STUDENT (Id VARCHAR(255), name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 3092
} |
Find the number of voting records in total. | SELECT COUNT(*) FROM VOTING_RECORD | CREATE TABLE VOTING_RECORD (Id VARCHAR(255), description VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 3093
} |
Find the distinct number of president votes. | SELECT COUNT(DISTINCT President_Vote) FROM VOTING_RECORD | CREATE TABLE VOTING_RECORD (President_Vote VARCHAR(255), Voter_ID VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 3094
} |
Find the maximum age of all the students. | SELECT MAX(Age) FROM STUDENT | CREATE TABLE STUDENT (Age INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 3095
} |
Find the last names of students with major 50. | SELECT LName FROM STUDENT WHERE Major = 50 | CREATE TABLE STUDENT (LName VARCHAR(255), Major VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3096
} |
Find the first names of students with age above 22. | SELECT Fname FROM STUDENT WHERE Age > 22 | CREATE TABLE STUDENT (Fname VARCHAR(255), Age INTEGER) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3097
} |
What are the majors of male (sex is M) students? | SELECT Major FROM STUDENT WHERE Sex = 'M' | CREATE TABLE STUDENT (Major VARCHAR(255), Sex VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3098
} |
What is the average age of female (sex is F) students? | SELECT AVG(Age) FROM STUDENT WHERE Sex = 'F' | CREATE TABLE STUDENT (Age INTEGER, Sex VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3099
} |
What are the maximum and minimum age of students with major 600? | SELECT MAX(Age), MIN(Age) FROM STUDENT WHERE Major = 600 | CREATE TABLE STUDENT (Age INTEGER, Major VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 2 | {
"split": "train",
"row_index": 3100
} |
Who are the advisors for students that live in a city with city code "BAL"? | SELECT Advisor FROM STUDENT WHERE city_code = 'BAL' | CREATE TABLE STUDENT (Advisor VARCHAR(255), city_code VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3101
} |
What are the distinct secretary votes in the fall election cycle? | SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = 'Fall' | CREATE TABLE VOTING_RECORD (Secretary_Vote VARCHAR(255), ELECTION_CYCLE VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3102
} |
What are the distinct president votes on 08/30/2015? | SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date = '08/30/2015' | CREATE TABLE VOTING_RECORD (PRESIDENT_Vote VARCHAR(255), Registration_Date VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3103
} |
Report the distinct registration date and the election cycle. | SELECT DISTINCT Registration_Date, Election_Cycle FROM VOTING_RECORD | CREATE TABLE VOTING_RECORD (Registration_Date VARCHAR(255), Election_Cycle VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 3104
} |
Report the distinct president vote and the vice president vote. | SELECT DISTINCT President_Vote, VICE_President_Vote FROM VOTING_RECORD | CREATE TABLE VOTING_RECORD (President_Vote VARCHAR(255), VICE_President_Vote VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 3105
} |
Find the distinct last names of the students who have class president votes. | SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_President_VOTE | CREATE TABLE STUDENT (LName VARCHAR(255), StuID VARCHAR(255)); CREATE TABLE VOTING_RECORD (CLASS_President_VOTE VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3106
} |
Find the distinct first names of the students who have class senator votes. | SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE | CREATE TABLE STUDENT (Fname VARCHAR(255), StuID VARCHAR(255)); CREATE TABLE VOTING_RECORD (CLASS_Senator_VOTE VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3107
} |
Find the distinct ages of students who have secretary votes in the fall election cycle. | SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = 'Fall' | CREATE TABLE VOTING_RECORD (Secretary_Vote VARCHAR(255), Election_Cycle VARCHAR(255)); CREATE TABLE STUDENT (Age VARCHAR(255), StuID VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 3108
} |
Find the distinct Advisor of students who have treasurer votes in the spring election cycle. | SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = 'Spring' | CREATE TABLE STUDENT (Advisor VARCHAR(255), StuID VARCHAR(255)); CREATE TABLE VOTING_RECORD (Treasurer_Vote VARCHAR(255), Election_Cycle VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 3109
} |
Find the distinct majors of students who have treasurer votes. | SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote | CREATE TABLE VOTING_RECORD (Treasurer_Vote VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE STUDENT (Major VARCHAR(255), StuID VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3110
} |
Find the first and last names of all the female (sex is F) students who have president votes. | SELECT DISTINCT T1.Fname, T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.President_VOTE WHERE T1.sex = 'F' | CREATE TABLE STUDENT (Fname VARCHAR(255), LName VARCHAR(255), StuID VARCHAR(255), sex VARCHAR(255)); CREATE TABLE VOTING_RECORD (President_VOTE VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 3111
} |
Find the first and last name of all the students of age 18 who have vice president votes. | SELECT DISTINCT T1.Fname, T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_President_VOTE WHERE T1.age = 18 | CREATE TABLE STUDENT (Fname VARCHAR(255), LName VARCHAR(255), StuID VARCHAR(255), age VARCHAR(255)); CREATE TABLE VOTING_RECORD (VICE_President_VOTE VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 3112
} |
For each advisor, report the total number of students advised by him or her. | SELECT Advisor, COUNT(*) FROM STUDENT GROUP BY Advisor | CREATE TABLE STUDENT (Advisor VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 3120
} |
Report all advisors that advise more than 2 students. | SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2 | CREATE TABLE STUDENT (Advisor VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3121
} |
Report all majors that have less than 3 students. | SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3 | CREATE TABLE STUDENT (Major VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3122
} |
For each election cycle, report the number of voting records. | SELECT Election_Cycle, COUNT(*) FROM VOTING_RECORD GROUP BY Election_Cycle | CREATE TABLE VOTING_RECORD (Election_Cycle VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 3123
} |
What is the city_code of the city that the most students live in? | SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE STUDENT (city_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 3126
} |
How many products are there? | SELECT COUNT(*) FROM products | CREATE TABLE products (Id VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 3127
} |
How many colors are there? | SELECT COUNT(*) FROM ref_colors | CREATE TABLE ref_colors (Id VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 3128
} |
How many characteristics are there? | SELECT COUNT(*) FROM CHARACTERISTICS | CREATE TABLE CHARACTERISTICS (Id VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 3129
} |
What are the names and buying prices of all the products? | SELECT product_name, typical_buying_price FROM products | CREATE TABLE products (product_name VARCHAR(255), typical_buying_price VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 1 | {
"split": "train",
"row_index": 3130
} |
List the description of all the colors. | SELECT color_description FROM ref_colors | CREATE TABLE ref_colors (color_description VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 3131
} |
Find the names of all the product characteristics. | SELECT DISTINCT characteristic_name FROM CHARACTERISTICS | CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 0 | 0 | 0 | {
"split": "train",
"row_index": 3132
} |
What are the names of products with category "Spices"? | SELECT product_name FROM products WHERE product_category_code = 'Spices' | CREATE TABLE products (product_name VARCHAR(255), product_category_code VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3133
} |
How many products are there under the category "Seeds"? | SELECT COUNT(*) FROM products WHERE product_category_code = 'Seeds' | CREATE TABLE products (product_category_code VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3135
} |
Find the number of products with category "Spices" and typically sold above 1000. | SELECT COUNT(*) FROM products WHERE product_category_code = 'Spices' AND typical_buying_price > 1000 | CREATE TABLE products (product_category_code VARCHAR(255), typical_buying_price VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 3136
} |
What is the category and typical buying price of the product with name "cumin"? | SELECT product_category_code, typical_buying_price FROM products WHERE product_name = 'cumin' | CREATE TABLE products (product_category_code VARCHAR(255), typical_buying_price VARCHAR(255), product_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 1 | {
"split": "train",
"row_index": 3137
} |
Which category does the product named "flax" belong to? | SELECT product_category_code FROM products WHERE product_name = 'flax' | CREATE TABLE products (product_category_code VARCHAR(255), product_name VARCHAR(255)) | generic | easy | easy | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 1 | 0 | 0 | {
"split": "train",
"row_index": 3138
} |
What is the name of the product with the color description 'yellow'? | SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow' | CREATE TABLE ref_colors (color_code VARCHAR(255), color_description VARCHAR(255)); CREATE TABLE products (product_name VARCHAR(255), color_code VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 3139
} |
Find the category descriptions of the products whose descriptions include letter 't'. | SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%' | CREATE TABLE ref_product_categories (product_category_description VARCHAR(255), product_category_code VARCHAR(255)); CREATE TABLE products (product_category_code VARCHAR(255), product_description VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 3140
} |
What is the color description of the product with name "catnip"? | SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = 'catnip' | CREATE TABLE products (color_code VARCHAR(255), product_name VARCHAR(255)); CREATE TABLE ref_colors (color_description VARCHAR(255), color_code VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 3141
} |
What is the color code and description of the product named "chervil"? | SELECT t1.color_code, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = 'chervil' | CREATE TABLE products (color_code VARCHAR(255), product_name VARCHAR(255)); CREATE TABLE ref_colors (color_description VARCHAR(255), color_code VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 3142
} |
Find the id and color description of the products with at least 2 characteristics. | SELECT t1.product_id, t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_id HAVING COUNT(*) >= 2 | CREATE TABLE product_characteristics (product_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE ref_colors (color_description VARCHAR(255), color_code VARCHAR(255)); CREATE TABLE products (product_id VARCHAR(255), color_code VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 3143
} |
List all the product names with the color description "white". | SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = 'white' | CREATE TABLE ref_colors (color_code VARCHAR(255), color_description VARCHAR(255)); CREATE TABLE products (product_name VARCHAR(255), color_code VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 3144
} |
What are the name and typical buying and selling prices of the products that have color described as "yellow"? | SELECT t1.product_name, t1.typical_buying_price, t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = 'yellow' | CREATE TABLE ref_colors (color_code VARCHAR(255), color_description VARCHAR(255)); CREATE TABLE products (product_name VARCHAR(255), typical_buying_price VARCHAR(255), typical_selling_price VARCHAR(255), color_code VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 1 | {
"split": "train",
"row_index": 3145
} |
How many characteristics does the product named "sesame" have? | SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = 'sesame' | CREATE TABLE product_characteristics (product_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE products (product_id VARCHAR(255), product_name VARCHAR(255)) | generic | medium | medium | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 2 | 0 | 0 | {
"split": "train",
"row_index": 3146
} |
How many distinct characteristic names does the product "cumin" have? | SELECT COUNT(DISTINCT t3.characteristic_name) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame' | CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR(255), characteristic_id VARCHAR(255)); CREATE TABLE products (product_id VARCHAR(255), product_name VARCHAR(255)); CREATE TABLE product_characteristics (product_id VARCHAR(255), characteristic_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 3147
} |
What are all the characteristic names of product "sesame"? | SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame' | CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR(255), characteristic_id VARCHAR(255)); CREATE TABLE products (product_id VARCHAR(255), product_name VARCHAR(255)); CREATE TABLE product_characteristics (product_id VARCHAR(255), characteristic_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 0 | {
"split": "train",
"row_index": 3148
} |
List all the characteristic names and data types of product "cumin". | SELECT t3.characteristic_name, t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'cumin' | CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR(255), characteristic_data_type VARCHAR(255), characteristic_id VARCHAR(255)); CREATE TABLE products (product_id VARCHAR(255), product_name VARCHAR(255)); CREATE TABLE product_characteristics (product_id VARCHAR(255), characteristic_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 3149
} |
List all characteristics of product named "sesame" with type code "Grade". | SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = 'sesame' AND t3.characteristic_type_code = 'Grade' | CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR(255), characteristic_id VARCHAR(255), characteristic_type_code VARCHAR(255)); CREATE TABLE products (product_id VARCHAR(255), product_name VARCHAR(255)); CREATE TABLE product_characteristics (product_id VARCHAR(255), characteristic_id VARCHAR(255)) | generic | hard | hard | classified | valid | valid | valid | [] | [] | [] | [] | [
"validated",
"extended",
"classified"
] | null | 3 | 0 | 1 | {
"split": "train",
"row_index": 3150
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.