NATURAL_LANG
stringlengths
12
244
SQL
stringlengths
18
336
SCHEMA
stringlengths
27
355
input_ids
list
attention_mask
list
labels
list
Select the names of all the products in the store.
SELECT Name FROM Products
CREATE TABLE Products (Name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7554, 41, 23954, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6185, 8, 3056, 13, 66, 8, 494, 16, 8, 1078, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 5570, 21680, 7554, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Select the names and the prices of all the products in the store.
SELECT name, price FROM products
CREATE TABLE products (name VARCHAR, price VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 494, 41, 4350, 584, 4280, 28027, 6, 594, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6185, 8, 3056, 11, 8, 1596, 13, 66, 8, 494, 16, 8, 1078, 5, 1, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 564, 6, 594, 21680, 494, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
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, price VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 494, 41, 4350, 584, 4280, 28027, 6, 594, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6185, 8, 564, 13, 8, 494, 28, 3, 9, 594, 705, 145, 42, 4081, 12, 19503, 5, 1, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 564, 21680, 494, 549, 17444, 427, 594, 3, 2, 2423, 2382, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Find all information of all the products with a price between $60 and $120.
SELECT * FROM products WHERE price BETWEEN 60 AND 120
CREATE TABLE products (price INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 494, 41, 102, 4920, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 2588, 66, 251, 13, 66, 8, 494, 28, 3, 9, 594, 344, 25659, 11, 1970, 1755, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1429, 21680, 494, 549, 17444, 427, 594, 272, 7969, 518, 23394, 1640, 3430, 5864, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Compute the average price of all the products.
SELECT AVG(price) FROM products
CREATE TABLE products (price INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 494, 41, 102, 4920, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 4961, 2810, 8, 1348, 594, 13, 66, 8, 494, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 71, 17217, 599, 102, 4920, 61, 21680, 494, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 494, 41, 102, 4920, 3, 21342, 17966, 6, 15248, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 4961, 2810, 8, 1348, 594, 13, 66, 494, 28, 4818, 1081, 4081, 12, 1682, 1, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 71, 17217, 599, 102, 4920, 61, 21680, 494, 549, 17444, 427, 15248, 3274, 204, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 494, 41, 102, 4920, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 4961, 2810, 8, 381, 13, 494, 28, 3, 9, 594, 2186, 145, 42, 4081, 12, 1970, 2079, 5, 1, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 494, 549, 17444, 427, 594, 2490, 2423, 8003, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
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, price VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 494, 41, 4350, 584, 4280, 28027, 6, 594, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6185, 8, 564, 11, 594, 13, 66, 494, 28, 3, 9, 594, 2186, 145, 42, 4081, 12, 1970, 2079...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 564, 6, 594, 21680, 494, 549, 17444, 427, 594, 2490, 2423, 8003, 4674, 11300, 272, 476, 594, 309, 25067, 6, 564, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
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
CREATE TABLE products (manufacturer VARCHAR); CREATE TABLE Manufacturers (code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 494, 41, 348, 76, 8717, 450, 49, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 15248, 7, 41, 4978, 584, 4280, 28027, 61, 3, 32102, 32106, 32107, 32106, 618...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1429, 21680, 494, 6157, 332, 536, 3, 15355, 3162, 15248, 7, 6157, 332, 357, 9191, 332, 5411, 348, 76, 8717, 450, 49, 3274, 332, 4416, 4978, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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, Price INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7554, 41, 7296, 76, 8717, 450, 49, 584, 4280, 28027, 6, 5312, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 6185, 8, 1348, 594, 13, 284, 4818, 31, 7, 494, 6, 2924, 163, 8, 48...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 71, 17217, 599, 345, 4920, 201, 15248, 21680, 7554, 350, 4630, 6880, 272, 476, 15248, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
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, code VARCHAR); CREATE TABLE products (Price INTEGER, manufacturer VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 15248, 7, 41, 4350, 584, 4280, 28027, 6, 1081, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 494, 41, 345, 4920, 3, 21342, 17966, 6, 4818, 584, 4280, 28027...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 71, 17217, 599, 382, 5411, 345, 4920, 201, 332, 4416, 4350, 21680, 494, 6157, 332, 536, 3, 15355, 3162, 15248, 7, 6157, 332, 357, 9191, 332, 5411, 348, 76, 8717, 450, 49, 3274, 332, 4416, 4978, 350, 4630, 6880, 272,...
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
CREATE TABLE Manufacturers (name VARCHAR, code VARCHAR); CREATE TABLE products (Price INTEGER, manufacturer VARCHAR, price INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 15248, 7, 41, 4350, 584, 4280, 28027, 6, 1081, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 494, 41, 345, 4920, 3, 21342, 17966, 6, 4818, 584, 4280, 28027...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 71, 17217, 599, 382, 5411, 345, 4920, 201, 332, 4416, 4350, 21680, 494, 6157, 332, 536, 3, 15355, 3162, 15248, 7, 6157, 332, 357, 9191, 332, 5411, 348, 76, 8717, 450, 49, 3274, 332, 4416, 4978, 350, 4630, 6880, 272,...
Select the name and price of the cheapest product.
SELECT name, price FROM Products ORDER BY price LIMIT 1
CREATE TABLE Products (name VARCHAR, price VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7554, 41, 4350, 584, 4280, 28027, 6, 594, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6185, 8, 564, 11, 594, 13, 8, 3, 14575, 556, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 564, 6, 594, 21680, 7554, 4674, 11300, 272, 476, 594, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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, code VARCHAR); CREATE TABLE products (Name VARCHAR, Price INTEGER, manufacturer VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 15248, 7, 41, 4350, 584, 4280, 28027, 6, 1081, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 494, 41, 23954, 584, 4280, 28027, 6, 5312, 3, 21342, 17966, 6,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 23954, 6, 4800, 4, 599, 382, 5411, 345, 4920, 201, 332, 4416, 4350, 21680, 494, 6157, 332, 536, 3, 15355, 3162, 15248, 7, 6157, 332, 357, 9191, 332, 5411, 348, 76, 8717, 450, 49, 3274, 332, 4416, 4978, ...
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, name VARCHAR, price INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 494, 41, 4978, 584, 4280, 28027, 6, 564, 584, 4280, 28027, 6, 594, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 6185, 8, 1081, 13, 8, 556, 24, 19, 3, 14575, 16, 284, 556, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1081, 6, 564, 6, 3, 17684, 599, 102, 4920, 61, 21680, 494, 350, 4630, 6880, 272, 476, 564, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
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, log_entry_date VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 682, 834, 2152, 41, 19307, 834, 2152, 834, 23, 26, 584, 4280, 28027, 6, 4303, 834, 295, 651, 834, 5522, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 3, 23, 26, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 682, 834, 2152, 834, 23, 26, 21680, 682, 834, 2152, 4674, 11300, 272, 476, 4303, 834, 295, 651, 834, 5522, 309, 25067, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
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, problem_id VARCHAR, log_entry_date VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 682, 834, 2152, 41, 19307, 834, 2152, 834, 23, 26, 584, 4280, 28027, 6, 682, 834, 23, 26, 584, 4280, 28027, 6, 4303, 834, 295, 651, 834, 5522, 584, 4280, 28027, 61, 3, 32105, 32106, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 3, 23143, 14196, 682, 834, 2152, 834, 23, 26, 6, 682, 834, 23, 26, 21680, 682, 834, 2152, 4674, 11300, 272, 476, 4303, 834, 295, 651, 834, 5522, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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, log_entry_date VARCHAR, problem_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 682, 834, 2152, 41, 19307, 834, 2152, 834, 23, 26, 584, 4280, 28027, 6, 4303, 834, 295, 651, 834, 5522, 584, 4280, 28027, 6, 682, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 682, 834, 2152, 834, 23, 26, 6, 4303, 834, 295, 651, 834, 5522, 21680, 682, 834, 2152, 549, 17444, 427, 682, 834, 23, 26, 3274, 335, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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, log_entry_description VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 682, 834, 2152, 41, 19307, 834, 2152, 834, 23, 26, 584, 4280, 28027, 6, 4303, 834, 295, 651, 834, 221, 11830, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 66, 8, 4303, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 682, 834, 2152, 834, 23, 26, 6, 4303, 834, 295, 651, 834, 221, 11830, 21680, 682, 834, 2152, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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
CREATE TABLE problem_log (assigned_to_staff_id VARCHAR, problem_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 682, 834, 2152, 41, 9, 7, 15532, 834, 235, 834, 26416, 834, 23, 26, 584, 4280, 28027, 6, 682, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 871, 834, 14672, 834, 4350, 6, 871, 834, 5064, 834, 4350, 21680, 871, 6157, 332, 536, 3, 15355, 3162, 682, 834, 2152, 6157, 332, 357, 9191, 332, 5411, 26416, 834, 23, 26, 3274, 332, 4416, 9, ...
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, problem_log_id VARCHAR, assigned_to_staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_first_name VARCHAR, staff_last_name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 682, 834, 2152, 41, 19307, 834, 23, 26, 584, 4280, 28027, 6, 682, 834, 2152, 834, 23, 26, 584, 4280, 28027, 6, 7604, 834, 235, 834, 26416, 834, 23, 26, 584, 4280, 28027, 61, 3, 321...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 332, 4416, 19307, 834, 23, 26, 6, 332, 4416, 19307, 834, 2152, 834, 23, 26, 21680, 871, 6157, 332, 536, 3, 15355, 3162, 682, 834, 2152, 6157, 332, 357, 9191, 332, 5411, 26416, 834, 23, 26, 3...
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); CREATE TABLE product (product_id VARCHAR, product_name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 982, 41, 15892, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 556, 41, 15892, 834, 23, 26, 584, 4280, 28027, 6, 556, 834, 4350, 584, 4280, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 556, 6157, 332, 536, 3, 15355, 3162, 982, 6157, 332, 357, 9191, 332, 5411, 15892, 834, 23, 26, 3274, 332, 4416, 15892, 834, 23, 26, 549, 17444, 427, 332, 5411, 15892, 834, 4350, 32...
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); CREATE TABLE product (product_name VARCHAR, product_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 982, 41, 15892, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 556, 41, 15892, 834, 4350, 584, 4280, 28027, 6, 556, 834, 23, 26, 584, 4280, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 201, 332, 5411, 15892, 834, 4350, 21680, 556, 6157, 332, 536, 3, 15355, 3162, 982, 6157, 332, 357, 9191, 332, 5411, 15892, 834, 23, 26, 3274, 332, 4416, 15892, 834, 23, 26, 350, 4630, 6880, 2...
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, staff_first_name VARCHAR); CREATE TABLE problems (problem_description VARCHAR, reported_by_staff_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 871, 41, 26416, 834, 23, 26, 584, 4280, 28027, 6, 871, 834, 14672, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 982, 41, 19307, 834, 221, 11830...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 19307, 834, 221, 11830, 21680, 982, 6157, 332, 536, 3, 15355, 3162, 871, 6157, 332, 357, 9191, 332, 5411, 60, 16262, 834, 969, 834, 26416, 834, 23, 26, 3274, 332, 4416, 26416, 834, 23, 26, 549, 17444, 427...
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, reported_by_staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_last_name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 982, 41, 19307, 834, 23, 26, 584, 4280, 28027, 6, 2196, 834, 969, 834, 26416, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 871, 41, 26416, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 19307, 834, 23, 26, 21680, 982, 6157, 332, 536, 3, 15355, 3162, 871, 6157, 332, 357, 9191, 332, 5411, 60, 16262, 834, 969, 834, 26416, 834, 23, 26, 3274, 332, 4416, 26416, 834, 23, 26, 549, 17444, 427, ...
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, date_problem_reported INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 982, 41, 19307, 834, 23, 26, 584, 4280, 28027, 6, 833, 834, 19307, 834, 60, 16262, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 3, 23, 26, 7, 13, 8, 982, 84, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 682, 834, 23, 26, 21680, 982, 549, 17444, 427, 833, 834, 19307, 834, 60, 16262, 2490, 96, 2294, 3940, 18, 5176, 18, 2688, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
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, date_problem_reported INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 982, 41, 19307, 834, 23, 26, 584, 4280, 28027, 6, 833, 834, 19307, 834, 60, 16262, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 3, 23, 26, 7, 13, 8, 982, 84, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 682, 834, 23, 26, 21680, 982, 549, 17444, 427, 833, 834, 19307, 834, 60, 16262, 3, 2, 96, 2294, 3940, 18, 5176, 18, 2688, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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); CREATE TABLE product (product_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 982, 41, 15892, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 556, 41, 15892, 834, 23, 26, 584, 4280, 28027, 61, 3, 32102, 32106, 32107, 32106...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 201, 332, 4416, 15892, 834, 23, 26, 21680, 982, 6157, 332, 536, 3, 15355, 3162, 556, 6157, 332, 357, 9191, 332, 5411, 15892, 834, 23, 26, 3274, 332, 4416, 15892, 834, 23, 26, 350, 4630, 6880,...
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); CREATE TABLE problems (product_id VARCHAR, date_problem_reported INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 556, 41, 15892, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 982, 41, 15892, 834, 23, 26, 584, 4280, 28027, 6, 833, 834, 19307, 834, 60, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 201, 332, 4416, 15892, 834, 23, 26, 21680, 982, 6157, 332, 536, 3, 15355, 3162, 556, 6157, 332, 357, 9191, 332, 5411, 15892, 834, 23, 26, 3274, 332, 4416, 15892, 834, 23, 26, 549, 17444, 427,...
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 556, 41, 15892, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 8, 3056, 13, 66, 8, 6746, 556, 3056, 16, 20688, 1950, 455, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 556, 834, 4350, 21680, 556, 4674, 11300, 272, 476, 556, 834, 4350, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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, product_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 556, 41, 15892, 834, 4350, 584, 4280, 28027, 6, 556, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 66, 8, 6746, 556, 3056, 5563, 57, 556, 3, 23, 26, 58, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 556, 834, 4350, 21680, 556, 4674, 11300, 272, 476, 556, 834, 23, 26, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
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")
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 982, 41, 19307, 834, 23, 26, 584, 4280, 28027, 6, 2196, 834, 969, 834, 26416, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 871, 41, 26416, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 19307, 834, 23, 26, 21680, 982, 6157, 332, 536, 3, 15355, 3162, 871, 6157, 332, 357, 9191, 332, 5411, 60, 16262, 834, 969, 834, 26416, 834, 23, 26, 3274, 332, 4416, 26416, 834, 23, 26, 549, 17444, 427, ...
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")
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 982, 41, 19307, 834, 23, 26, 584, 4280, 28027, 6, 2196, 834, 969, 834, 26416, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 871, 41, 26416, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 19307, 834, 23, 26, 21680, 982, 6157, 332, 536, 3, 15355, 3162, 871, 6157, 332, 357, 9191, 332, 5411, 60, 16262, 834, 969, 834, 26416, 834, 23, 26, 3274, 332, 4416, 26416, 834, 23, 26, 549, 17444, 427, ...
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); CREATE TABLE product (product_name VARCHAR, product_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 982, 41, 15892, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 556, 41, 15892, 834, 4350, 584, 4280, 28027, 6, 556, 834, 23, 26, 584, 4280, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 3, 23143, 14196, 332, 4416, 15892, 834, 4350, 21680, 982, 6157, 332, 536, 3, 15355, 3162, 556, 6157, 332, 357, 9191, 332, 5411, 15892, 834, 23, 26, 3274, 332, 4416, 15892, 834, 23, 26, 350, 4630, 6880, 272, 476, 332, 4416, 15892, 83...
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, product_id VARCHAR, date_problem_reported VARCHAR); CREATE TABLE product (product_id VARCHAR, product_name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 982, 41, 19307, 834, 23, 26, 584, 4280, 28027, 6, 556, 834, 23, 26, 584, 4280, 28027, 6, 833, 834, 19307, 834, 60, 16262, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 604...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 19307, 834, 23, 26, 21680, 982, 6157, 332, 536, 3, 15355, 3162, 556, 6157, 332, 357, 9191, 332, 5411, 15892, 834, 23, 26, 3274, 332, 4416, 15892, 834, 23, 26, 549, 17444, 427, 332, 4416, 15892, 834, 4350,...
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 6421, 41, 12066, 2009, 834, 9, 11231, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 9678, 213, 43, 72, 145, 1348, 381, 13, 4757, 7, 33, 132, 58, 1, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 6421, 549, 17444, 427, 4757, 834, 9, 11231, 2490, 41, 23143, 14196, 71, 17217, 599, 12066, 2009, 834, 9, 11231, 61, 21680, 6421, 61, 1, -100, -100, -100, -100, -100, -100, -100, -100...
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, address_road VARCHAR, city VARCHAR, open_year VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 6421, 41, 4350, 584, 4280, 28027, 6, 1115, 834, 8635, 584, 4280, 28027, 6, 690, 584, 4280, 28027, 6, 539, 834, 1201, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 564, 6, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 564, 6, 1115, 834, 8635, 6, 690, 21680, 6421, 4674, 11300, 272, 476, 539, 834, 1201, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
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, membership_amount VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 6421, 41, 4350, 584, 4280, 28027, 6, 4757, 834, 9, 11231, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 3056, 21, 420, 386, 9678, 28, 167, 381, 13, 4757, 58, 1, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 564, 21680, 6421, 4674, 11300, 272, 476, 4757, 834, 9, 11231, 309, 25067, 8729, 12604, 220, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
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, membership_amount VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 6421, 41, 6726, 584, 4280, 28027, 6, 4757, 834, 9, 11231, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 66, 6746, 690, 213, 9678, 28, 44, 709, 910, 4757, 7, 33, 1069, 5,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 690, 21680, 6421, 549, 17444, 427, 4757, 834, 9, 11231, 2490, 2423, 910, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 6421, 41, 8751, 834, 1201, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 66, 539, 203, 116, 44, 709, 192, 5391, 33, 2946, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 539, 834, 1201, 21680, 6421, 350, 4630, 6880, 272, 476, 539, 834, 1201, 454, 6968, 2365, 2847, 17161, 599, 1935, 61, 2490, 2423, 204, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
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, city VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 6421, 41, 12066, 2009, 834, 9, 11231, 3, 21342, 17966, 6, 539, 834, 1201, 584, 4280, 28027, 6, 690, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 2559, 11, 2411, 866, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 17684, 599, 12066, 2009, 834, 9, 11231, 201, 4800, 4, 599, 12066, 2009, 834, 9, 11231, 61, 21680, 6421, 549, 17444, 427, 539, 834, 1201, 3274, 2722, 4674, 690, 3274, 3, 31, 29712, 31, 1, -100, -100, -100, -100, ...
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, open_year INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 6421, 41, 6726, 584, 4280, 28027, 6, 539, 834, 1201, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 3111, 8, 690, 11, 8, 381, 13, 9678, 2946, 274, 2735, 21, 284, 690, 5, 1, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 690, 6, 2847, 17161, 599, 1935, 61, 21680, 6421, 549, 17444, 427, 539, 834, 1201, 3, 2, 2735, 350, 4630, 6880, 272, 476, 690, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
How many different levels do members have?
SELECT COUNT(DISTINCT LEVEL) FROM member
CREATE TABLE member (LEVEL VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1144, 41, 3765, 24544, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 315, 1425, 103, 724, 43, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 15438, 25424, 6227, 9132, 24544, 61, 21680, 1144, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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, name VARCHAR, hometown VARCHAR, LEVEL VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1144, 41, 6043, 834, 5525, 1152, 584, 4280, 28027, 6, 564, 584, 4280, 28027, 6, 22295, 584, 4280, 28027, 6, 9132, 24544, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 895, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 3, 23143, 14196, 895, 834, 5525, 1152, 6, 564, 6, 22295, 21680, 1144, 4674, 11300, 272, 476, 9132, 24544, 309, 25067, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1144, 41, 3765, 24544, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 8, 4757, 593, 28, 167, 381, 13, 724, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 9132, 24544, 21680, 1144, 350, 4630, 6880, 272, 476, 9132, 24544, 4674, 11300, 272, 476, 2847, 17161, 599, 1935, 61, 309, 25067, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
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, 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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1144, 41, 4350, 584, 4280, 28027, 6, 1144, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 4757, 834, 22149, 834, 1939, 5457, 41, 1939, 5457, 83...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5787, 4350, 6, 332, 4416, 4350, 21680, 4757, 834, 22149, 834, 1939, 5457, 6157, 332, 536, 3, 15355, 3162, 6421, 6157, 332, 357, 9191, 332, 5411, 1939, 5457, 834, 23, 26, 3274, 332, 4416, 1939, 5457, 834, 23, 26...
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, branch_id VARCHAR); CREATE TABLE membership_register_branch (branch_id VARCHAR, register_year INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 6421, 41, 4350, 584, 4280, 28027, 6, 6421, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 4757, 834, 22149, 834, 1939, 5457, 41, 1939, 5457, 83...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 4416, 4350, 6, 2847, 17161, 599, 1935, 61, 21680, 4757, 834, 22149, 834, 1939, 5457, 6157, 332, 536, 3, 15355, 3162, 6421, 6157, 332, 357, 9191, 332, 5411, 1939, 5457, 834, 23, 26, 3274, 332, 4416, 1939, 5457, ...
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, member_id VARCHAR); CREATE TABLE membership_register_branch (name VARCHAR, member_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1144, 41, 4350, 584, 4280, 28027, 6, 1144, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 4757, 834, 22149, 834, 1939, 5457, 41, 4350, 584, 428...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 564, 21680, 1144, 549, 17444, 427, 4486, 1144, 834, 23, 26, 3388, 41, 23143, 14196, 1144, 834, 23, 26, 21680, 4757, 834, 22149, 834, 1939, 5457, 61, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
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, city VARCHAR, branch_id VARCHAR); CREATE TABLE branch (name VARCHAR, city VARCHAR, branch_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 4757, 834, 22149, 834, 1939, 5457, 41, 4350, 584, 4280, 28027, 6, 690, 584, 4280, 28027, 6, 6421, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 564, 6, 690, 21680, 6421, 549, 17444, 427, 4486, 6421, 834, 23, 26, 3388, 41, 23143, 14196, 6421, 834, 23, 26, 21680, 4757, 834, 22149, 834, 1939, 5457, 61, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
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, register_year VARCHAR); CREATE TABLE branch (name VARCHAR, open_year VARCHAR, branch_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 4757, 834, 22149, 834, 1939, 5457, 41, 1939, 5457, 834, 23, 26, 584, 4280, 28027, 6, 3691, 834, 1201, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 6421, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 4416, 4350, 6, 332, 4416, 8751, 834, 1201, 21680, 4757, 834, 22149, 834, 1939, 5457, 6157, 332, 536, 3, 15355, 3162, 6421, 6157, 332, 357, 9191, 332, 5411, 1939, 5457, 834, 23, 26, 3274, 332, 4416, 1939, 5457, ...
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, hometown VARCHAR, member_id VARCHAR); CREATE TABLE membership_register_branch (member_id VARCHAR, register_year VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1144, 41, 4350, 584, 4280, 28027, 6, 22295, 584, 4280, 28027, 6, 1144, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 4757, 834, 22149, 834, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 4416, 4350, 6, 332, 4416, 5515, 3540, 21680, 4757, 834, 22149, 834, 1939, 5457, 6157, 332, 536, 3, 15355, 3162, 1144, 6157, 332, 357, 9191, 332, 5411, 12066, 834, 23, 26, 3274, 332, 4416, 12066, 834, 23, 26, 54...
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, open_year VARCHAR, membership_amount VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 6421, 41, 6726, 584, 4280, 28027, 6, 539, 834, 1201, 584, 4280, 28027, 6, 4757, 834, 9, 11231, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 66, 690, 28, 3, 9, 6421, 294...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 690, 21680, 6421, 549, 17444, 427, 539, 834, 1201, 3274, 4402, 3430, 4757, 834, 9, 11231, 2490, 910, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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, membership_amount INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 6421, 41, 6726, 584, 4280, 28027, 6, 4757, 834, 9, 11231, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 3111, 66, 3119, 406, 3, 9, 6421, 578, 72, 145, 910, 4757, 7, 5, 1, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 690, 21680, 6421, 262, 4, 30416, 3, 23143, 14196, 690, 21680, 6421, 549, 17444, 427, 4757, 834, 9, 11231, 2490, 910, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
What is the sum of total pounds of purchase in year 2018 for all branches in London?
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
CREATE TABLE purchase (branch_id VARCHAR, year VARCHAR); CREATE TABLE branch (branch_id VARCHAR, city VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1242, 41, 1939, 5457, 834, 23, 26, 584, 4280, 28027, 6, 215, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 6421, 41, 1939, 5457, 834, 23, 26, 584, 4280, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 180, 6122, 599, 235, 1947, 834, 8861, 7, 61, 21680, 1242, 6157, 332, 536, 3, 15355, 3162, 6421, 6157, 332, 357, 9191, 332, 5411, 1939, 5457, 834, 23, 26, 3274, 332, 4416, 1939, 5457, 834, 23, 26, 549, 17444, 427, ...
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, level VARCHAR); CREATE TABLE purchase (member_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1144, 41, 12066, 834, 23, 26, 584, 4280, 28027, 6, 593, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1242, 41, 12066, 834, 23, 26, 584, 4280, 28027, 61, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 1242, 6157, 332, 536, 3, 15355, 3162, 1144, 6157, 332, 357, 9191, 332, 5411, 12066, 834, 23, 26, 3274, 332, 4416, 12066, 834, 23, 26, 549, 17444, 427, 332, 4416, 4563, 3274, 431, 1...
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, Hometown VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1144, 41, 6043, 834, 5525, 1152, 584, 4280, 28027, 6, 1210, 3540, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 570, 8, 895, 381, 13, 66, 724, 3, 2544, 22295, 1115, 963, 1448, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 895, 834, 5525, 1152, 21680, 1144, 549, 17444, 427, 1210, 3540, 8729, 9914, 96, 1454, 439, 295, 4636, 63, 1454, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Find the number of students in total.
SELECT COUNT(*) FROM STUDENT
CREATE TABLE STUDENT (Id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 196, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 381, 13, 481, 16, 792, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 5097, 10161, 6431, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Find the number of voting records in total.
SELECT COUNT(*) FROM VOTING_RECORD
CREATE TABLE VOTING_RECORD (Id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 8040, 21089, 834, 20921, 18400, 41, 196, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 381, 13, 10601, 3187, 16, 792, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 3, 8040, 21089, 834, 20921, 18400, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Find the distinct number of president votes.
SELECT COUNT(DISTINCT President_Vote) FROM VOTING_RECORD
CREATE TABLE VOTING_RECORD (President_Vote VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 8040, 21089, 834, 20921, 18400, 41, 345, 15704, 834, 553, 32, 17, 15, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 6746, 381, 13, 2753, 11839, 5, 1, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 15438, 25424, 6227, 1661, 834, 553, 32, 17, 15, 61, 21680, 3, 8040, 21089, 834, 20921, 18400, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Find the maximum age of all the students.
SELECT MAX(Age) FROM STUDENT
CREATE TABLE STUDENT (Age INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 188, 397, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 2411, 1246, 13, 66, 8, 481, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 4800, 4, 599, 188, 397, 61, 21680, 5097, 10161, 6431, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Find the last names of students with major 50.
SELECT LName FROM STUDENT WHERE Major = 50
CREATE TABLE STUDENT (LName VARCHAR, Major VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 434, 23954, 584, 4280, 28027, 6, 9236, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 336, 3056, 13, 481, 28, 779, 943, 5, 1, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 301, 23954, 21680, 5097, 10161, 6431, 549, 17444, 427, 9236, 3274, 943, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Find the first names of students with age above 22.
SELECT Fname FROM STUDENT WHERE Age > 22
CREATE TABLE STUDENT (Fname VARCHAR, Age INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 371, 4350, 584, 4280, 28027, 6, 7526, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 166, 3056, 13, 481, 28, 1246, 756, 1630, 5, 1, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 377, 4350, 21680, 5097, 10161, 6431, 549, 17444, 427, 7526, 2490, 1630, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
What are the majors of male (sex is M) students?
SELECT Major FROM STUDENT WHERE Sex = "M"
CREATE TABLE STUDENT (Major VARCHAR, Sex VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 329, 9, 12775, 584, 4280, 28027, 6, 679, 226, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 779, 7, 13, 5069, 41, 7, 994, 19, 283, 61, 481...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 9236, 21680, 5097, 10161, 6431, 549, 17444, 427, 679, 226, 3274, 96, 329, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 188, 397, 3, 21342, 17966, 6, 679, 226, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 1348, 1246, 13, 3955, 41, 7, 994, 19, 377, 61, 481, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 71, 17217, 599, 188, 397, 61, 21680, 5097, 10161, 6431, 549, 17444, 427, 679, 226, 3274, 96, 371, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 188, 397, 3, 21342, 17966, 6, 9236, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 2411, 11, 2559, 1246, 13, 481, 28, 779, 7366, 58, 1, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 4800, 4, 599, 188, 397, 201, 3, 17684, 599, 188, 397, 61, 21680, 5097, 10161, 6431, 549, 17444, 427, 9236, 3274, 7366, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
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, city_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 188, 26, 24680, 584, 4280, 28027, 6, 690, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2645, 33, 8, 8815, 7, 21, 481, 24, 619, 16, 3, 9, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 17228, 21680, 5097, 10161, 6431, 549, 17444, 427, 690, 834, 4978, 3274, 96, 279, 4090, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
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, ELECTION_CYCLE VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 8040, 21089, 834, 20921, 18400, 41, 134, 15, 16794, 1208, 834, 553, 32, 17, 15, 584, 4280, 28027, 6, 3, 16479, 254, 9562, 834, 17063, 22704, 584, 4280, 28027, 61, 3, 32105, 32106, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 7471, 834, 553, 32, 17, 15, 21680, 3, 8040, 21089, 834, 20921, 18400, 549, 17444, 427, 3, 16479, 254, 9562, 834, 17063, 22704, 3274, 96, 371, 1748, 121, 1, -100, -100, -100, -100, -100, -100, ...
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, Registration_Date VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 8040, 21089, 834, 20921, 18400, 41, 22120, 29433, 834, 553, 32, 17, 15, 584, 4280, 28027, 6, 13571, 834, 308, 342, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 3, 22120, 29433, 834, 553, 32, 17, 15, 21680, 3, 8040, 21089, 834, 20921, 18400, 549, 17444, 427, 13571, 834, 308, 342, 3274, 96, 4018, 87, 1458, 87, 8651, 121, 1, -100, -100, -100, -100, -100...
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, Election_Cycle VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 8040, 21089, 834, 20921, 18400, 41, 18752, 257, 834, 308, 342, 584, 4280, 28027, 6, 19488, 834, 254, 63, 2482, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3750, 8, 6746, 38...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 13571, 834, 308, 342, 6, 19488, 834, 254, 63, 2482, 21680, 3, 8040, 21089, 834, 20921, 18400, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
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, VICE_President_Vote VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 8040, 21089, 834, 20921, 18400, 41, 345, 15704, 834, 553, 32, 17, 15, 584, 4280, 28027, 6, 584, 8906, 834, 345, 15704, 834, 553, 32, 17, 15, 584, 4280, 28027, 61, 3, 32105, 32106,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 1661, 834, 553, 32, 17, 15, 6, 584, 8906, 834, 345, 15704, 834, 553, 32, 17, 15, 21680, 3, 8040, 21089, 834, 20921, 18400, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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, StuID VARCHAR); CREATE TABLE VOTING_RECORD (CLASS_President_VOTE VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 434, 23954, 584, 4280, 28027, 6, 3, 13076, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 3, 8040, 21089, 834, 20921, 18400, 41, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 332, 5411, 434, 23954, 21680, 5097, 10161, 6431, 6157, 332, 536, 3, 15355, 3162, 3, 8040, 21089, 834, 20921, 18400, 6157, 332, 357, 9191, 332, 5411, 13076, 4309, 3274, 332, 4416, 31598, 834, 345, ...
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, StuID VARCHAR); CREATE TABLE VOTING_RECORD (CLASS_Senator_VOTE VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 371, 4350, 584, 4280, 28027, 6, 3, 13076, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 3, 8040, 21089, 834, 20921, 18400, 41, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 332, 5411, 371, 4350, 21680, 5097, 10161, 6431, 6157, 332, 536, 3, 15355, 3162, 3, 8040, 21089, 834, 20921, 18400, 6157, 332, 357, 9191, 332, 5411, 13076, 4309, 3274, 332, 4416, 31598, 834, 134, ...
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, Election_Cycle VARCHAR); CREATE TABLE STUDENT (Age VARCHAR, StuID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 8040, 21089, 834, 20921, 18400, 41, 134, 15, 16794, 1208, 834, 553, 32, 17, 15, 584, 4280, 28027, 6, 19488, 834, 254, 63, 2482, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 332, 5411, 188, 397, 21680, 5097, 10161, 6431, 6157, 332, 536, 3, 15355, 3162, 3, 8040, 21089, 834, 20921, 18400, 6157, 332, 357, 9191, 332, 5411, 13076, 4309, 3274, 332, 4416, 134, 15, 16794, 1...
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, StuID VARCHAR); CREATE TABLE VOTING_RECORD (Treasurer_Vote VARCHAR, Election_Cycle VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 188, 26, 24680, 584, 4280, 28027, 6, 3, 13076, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 3, 8040, 21089, 834, 20921, 18400, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 332, 5411, 188, 26, 24680, 21680, 5097, 10161, 6431, 6157, 332, 536, 3, 15355, 3162, 3, 8040, 21089, 834, 20921, 18400, 6157, 332, 357, 9191, 332, 5411, 13076, 4309, 3274, 332, 4416, 382, 864, 3...
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); CREATE TABLE STUDENT (Major VARCHAR, StuID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 8040, 21089, 834, 20921, 18400, 41, 382, 864, 3042, 49, 834, 553, 32, 17, 15, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 329, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 332, 5411, 329, 9, 12775, 21680, 5097, 10161, 6431, 6157, 332, 536, 3, 15355, 3162, 3, 8040, 21089, 834, 20921, 18400, 6157, 332, 357, 9191, 332, 5411, 13076, 4309, 3274, 332, 4416, 382, 864, 30...
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, LName VARCHAR, StuID VARCHAR, sex VARCHAR); CREATE TABLE VOTING_RECORD (President_VOTE VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 371, 4350, 584, 4280, 28027, 6, 301, 23954, 584, 4280, 28027, 6, 3, 13076, 4309, 584, 4280, 28027, 6, 3, 7, 994, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 332, 5411, 371, 4350, 6, 332, 5411, 434, 23954, 21680, 5097, 10161, 6431, 6157, 332, 536, 3, 15355, 3162, 3, 8040, 21089, 834, 20921, 18400, 6157, 332, 357, 9191, 332, 5411, 13076, 4309, 3274, 3...
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, LName VARCHAR, StuID VARCHAR, age VARCHAR); CREATE TABLE VOTING_RECORD (VICE_President_VOTE VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 371, 4350, 584, 4280, 28027, 6, 301, 23954, 584, 4280, 28027, 6, 3, 13076, 4309, 584, 4280, 28027, 6, 1246, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 43...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 332, 5411, 371, 4350, 6, 332, 5411, 434, 23954, 21680, 5097, 10161, 6431, 6157, 332, 536, 3, 15355, 3162, 3, 8040, 21089, 834, 20921, 18400, 6157, 332, 357, 9191, 332, 5411, 13076, 4309, 3274, 3...
How many male (sex is M) students have class senator votes in the fall election cycle?
SELECT COUNT(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.Sex = "M" AND T2.Election_Cycle = "Fall"
CREATE TABLE VOTING_RECORD (Election_Cycle VARCHAR); CREATE TABLE STUDENT (StuID VARCHAR, Sex VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 8040, 21089, 834, 20921, 18400, 41, 427, 12252, 834, 254, 63, 2482, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 13076, 4309, 584,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 5097, 10161, 6431, 6157, 332, 536, 3, 15355, 3162, 3, 8040, 21089, 834, 20921, 18400, 6157, 332, 357, 9191, 332, 5411, 13076, 4309, 3274, 4501, 834, 134, 35, 1016, 834, 553, 32, 17, ...
Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle.
SELECT COUNT(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.city_code = "NYC" AND T2.Election_Cycle = "Spring"
CREATE TABLE STUDENT (StuID VARCHAR, city_code VARCHAR); CREATE TABLE VOTING_RECORD (Election_Cycle VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 13076, 4309, 584, 4280, 28027, 6, 690, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 3, 8040, 21089, 834, 20921, 18400, 41,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 5097, 10161, 6431, 6157, 332, 536, 3, 15355, 3162, 3, 8040, 21089, 834, 20921, 18400, 6157, 332, 357, 9191, 332, 5411, 13076, 4309, 3274, 4501, 834, 134, 35, 1016, 834, 553, 32, 17, ...
Find the average age of students who live in the city with code "NYC" and have secretary votes in the spring election cycle.
SELECT AVG(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.city_code = "NYC" AND T2.Election_Cycle = "Spring"
CREATE TABLE STUDENT (Age INTEGER, StuID VARCHAR, city_code VARCHAR); CREATE TABLE VOTING_RECORD (Election_Cycle VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 188, 397, 3, 21342, 17966, 6, 3, 13076, 4309, 584, 4280, 28027, 6, 690, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 3, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 71, 17217, 599, 382, 5411, 188, 397, 61, 21680, 5097, 10161, 6431, 6157, 332, 536, 3, 15355, 3162, 3, 8040, 21089, 834, 20921, 18400, 6157, 332, 357, 9191, 332, 5411, 13076, 4309, 3274, 180, 3073, 27514, 24721, 834, 5...
Find the average age of female (sex is F) students who have secretary votes in the spring election cycle.
SELECT AVG(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.Sex = "F" AND T2.Election_Cycle = "Spring"
CREATE TABLE STUDENT (Age INTEGER, StuID VARCHAR, Sex VARCHAR); CREATE TABLE VOTING_RECORD (Election_Cycle VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 188, 397, 3, 21342, 17966, 6, 3, 13076, 4309, 584, 4280, 28027, 6, 679, 226, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 3, 8040, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 71, 17217, 599, 382, 5411, 188, 397, 61, 21680, 5097, 10161, 6431, 6157, 332, 536, 3, 15355, 3162, 3, 8040, 21089, 834, 20921, 18400, 6157, 332, 357, 9191, 332, 5411, 13076, 4309, 3274, 180, 3073, 27514, 24721, 834, 5...
Find the distinct first names of all the students who have vice president votes and whose city code is not PIT.
SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code = "PIT"
CREATE TABLE STUDENT (Fname VARCHAR, city_code VARCHAR); CREATE TABLE STUDENT (Fname VARCHAR, StuID VARCHAR); CREATE TABLE VOTING_RECORD (VICE_PRESIDENT_Vote VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 371, 4350, 584, 4280, 28027, 6, 690, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 371, 4350, 584, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 332, 5411, 371, 4350, 21680, 5097, 10161, 6431, 6157, 332, 536, 3, 15355, 3162, 3, 8040, 21089, 834, 20921, 18400, 6157, 332, 357, 9191, 332, 5411, 13076, 4309, 3274, 332, 4416, 553, 8906, 834, ...
Find the distinct last names of all the students who have president votes and whose advisor is not 2192.
SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = "2192"
CREATE TABLE STUDENT (LName VARCHAR, PRESIDENT_Vote VARCHAR, Advisor VARCHAR); CREATE TABLE STUDENT (LName VARCHAR, StuID VARCHAR); CREATE TABLE VOTING_RECORD (Id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 434, 23954, 584, 4280, 28027, 6, 3, 22120, 29433, 834, 553, 32, 17, 15, 584, 4280, 28027, 6, 17228, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 332, 5411, 434, 23954, 21680, 5097, 10161, 6431, 6157, 332, 536, 3, 15355, 3162, 3, 8040, 21089, 834, 20921, 18400, 6157, 332, 357, 9191, 332, 5411, 13076, 4309, 3274, 3, 22120, 29433, 834, 553, ...
Find the distinct last names of all the students who have president votes and whose advisor is 8741.
SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = "8741"
CREATE TABLE STUDENT (LName VARCHAR, PRESIDENT_Vote VARCHAR, Advisor VARCHAR); CREATE TABLE STUDENT (LName VARCHAR, StuID VARCHAR); CREATE TABLE VOTING_RECORD (Id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 434, 23954, 584, 4280, 28027, 6, 3, 22120, 29433, 834, 553, 32, 17, 15, 584, 4280, 28027, 6, 17228, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 332, 5411, 434, 23954, 21680, 5097, 10161, 6431, 6157, 332, 536, 3, 15355, 3162, 3, 8040, 21089, 834, 20921, 18400, 6157, 332, 357, 9191, 332, 5411, 13076, 4309, 3274, 3, 22120, 29433, 834, 553, ...
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 188, 26, 24680, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 242, 284, 8815, 6, 934, 8, 792, 381, 13, 481, 10058, 57, 376, 42, 160, 5, 1, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 17228, 6, 2847, 17161, 599, 1935, 61, 21680, 5097, 10161, 6431, 350, 4630, 6880, 272, 476, 17228, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Report all advisors that advise more than 2 students.
SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2
CREATE TABLE STUDENT (Advisor VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 188, 26, 24680, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3750, 66, 8815, 7, 24, 7786, 72, 145, 204, 481, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 17228, 21680, 5097, 10161, 6431, 350, 4630, 6880, 272, 476, 17228, 454, 6968, 2365, 2847, 17161, 599, 1935, 61, 2490, 204, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Report all majors that have less than 3 students.
SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3
CREATE TABLE STUDENT (Major VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 329, 9, 12775, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3750, 66, 779, 7, 24, 43, 705, 145, 220, 481, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 9236, 21680, 5097, 10161, 6431, 350, 4630, 6880, 272, 476, 9236, 454, 6968, 2365, 2847, 17161, 599, 1935, 61, 3, 2, 220, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 8040, 21089, 834, 20921, 18400, 41, 427, 12252, 834, 254, 63, 2482, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 242, 284, 4356, 4005, 6, 934, 8, 381, 13, 10601, 3187, 5, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 19488, 834, 254, 63, 2482, 6, 2847, 17161, 599, 1935, 61, 21680, 3, 8040, 21089, 834, 20921, 18400, 350, 4630, 6880, 272, 476, 19488, 834, 254, 63, 2482, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Which major has the most students?
SELECT Major FROM STUDENT GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE STUDENT (Major VARCHAR, major VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 329, 9, 12775, 584, 4280, 28027, 6, 779, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 4073, 779, 65, 8, 167, 481, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 9236, 21680, 5097, 10161, 6431, 350, 4630, 6880, 272, 476, 779, 4674, 11300, 272, 476, 2847, 17161, 599, 1935, 61, 309, 25067, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
What is the most common major among female (sex is F) students?
SELECT Major FROM STUDENT WHERE Sex = "F" GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE STUDENT (Major VARCHAR, major VARCHAR, Sex VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 329, 9, 12775, 584, 4280, 28027, 6, 779, 584, 4280, 28027, 6, 679, 226, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 167, 1017, 779, 859, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 9236, 21680, 5097, 10161, 6431, 549, 17444, 427, 679, 226, 3274, 96, 371, 121, 350, 4630, 6880, 272, 476, 779, 4674, 11300, 272, 476, 2847, 17161, 599, 1935, 61, 309, 25067, 8729, 12604, 209, 1, -100, -100, -100, -100...
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5097, 10161, 6431, 41, 6726, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 690, 834, 4978, 13, 8, 690, 24, 8, 167, 481, 619, 16, 58, 1, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 690, 834, 4978, 21680, 5097, 10161, 6431, 350, 4630, 6880, 272, 476, 690, 834, 4978, 4674, 11300, 272, 476, 2847, 17161, 599, 1935, 61, 309, 25067, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, ...
How many products are there?
SELECT COUNT(*) FROM products
CREATE TABLE products (Id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 494, 41, 196, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 494, 33, 132, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 494, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
How many colors are there?
SELECT COUNT(*) FROM ref_colors
CREATE TABLE ref_colors (Id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 6273, 834, 9910, 7, 41, 196, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 2602, 33, 132, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 6273, 834, 9910, 7, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
How many characteristics are there?
SELECT COUNT(*) FROM CHARACTERISTICS
CREATE TABLE CHARACTERISTICS (Id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 28027, 5173, 5946, 13582, 21202, 41, 196, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 6803, 33, 132, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 3, 28027, 5173, 5946, 13582, 21202, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
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, typical_buying_price VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 494, 41, 15892, 834, 4350, 584, 4280, 28027, 6, 4541, 834, 14584, 53, 834, 102, 4920, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 3056, 11, 2611, 1596, 13, 66, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 556, 834, 4350, 6, 4541, 834, 14584, 53, 834, 102, 4920, 21680, 494, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
List the description of all the colors.
SELECT color_description FROM ref_colors
CREATE TABLE ref_colors (color_description VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 6273, 834, 9910, 7, 41, 9910, 834, 221, 11830, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 8, 4210, 13, 66, 8, 2602, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 945, 834, 221, 11830, 21680, 6273, 834, 9910, 7, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
Find the names of all the product characteristics.
SELECT DISTINCT characteristic_name FROM CHARACTERISTICS
CREATE TABLE CHARACTERISTICS (characteristic_name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 28027, 5173, 5946, 13582, 21202, 41, 31886, 3040, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 3056, 13, 66, 8, 556, 6803, 5, 1, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 16115, 834, 4350, 21680, 3, 28027, 5173, 5946, 13582, 21202, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
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, product_category_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 494, 41, 15892, 834, 4350, 584, 4280, 28027, 6, 556, 834, 8367, 839, 651, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 3056, 13, 494, 28, 3295, 96, 134...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 556, 834, 4350, 21680, 494, 549, 17444, 427, 556, 834, 8367, 839, 651, 834, 4978, 3274, 96, 134, 6174, 15, 7, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
List the names, color descriptions and product descriptions of products with category "Herbs".
SELECT T1.product_name, T2.color_description, T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = "Herbs"
CREATE TABLE Ref_colors (color_description VARCHAR, color_code VARCHAR); CREATE TABLE products (product_name VARCHAR, product_description VARCHAR, color_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 419, 89, 834, 9910, 7, 41, 9910, 834, 221, 11830, 584, 4280, 28027, 6, 945, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 494, 41, 15892, 834, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 15892, 834, 4350, 6, 332, 4416, 9910, 834, 221, 11830, 6, 332, 5411, 15892, 834, 221, 11830, 21680, 494, 6157, 332, 536, 3, 15355, 3162, 419, 89, 834, 9910, 7, 6157, 332, 357, 9191, 332, 5411, 9910, 834, ...
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)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 494, 41, 15892, 834, 8367, 839, 651, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 494, 33, 132, 365, 8, 3295, 96, 18648, 26, 7, 121, 58, 1, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 494, 549, 17444, 427, 556, 834, 8367, 839, 651, 834, 4978, 3274, 96, 18648, 26, 7, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...