NATURAL_LANG
stringlengths
12
244
SQL
stringlengths
18
336
SCHEMA
stringlengths
27
355
input_ids
list
attention_mask
list
labels
list
Show the game name that has most number of hours played.
SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid ORDER BY SUM(hours_played) DESC LIMIT 1
CREATE TABLE Plays_games (gameid VARCHAR); CREATE TABLE Video_games (gameid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2911, 7, 834, 7261, 7, 41, 7261, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 3953, 834, 7261, 7, 41, 7261, 23, 26, 584, 4280, 28027, 61, 3, 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, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 122, 4350, 21680, 2911, 7, 834, 7261, 7, 6157, 332, 536, 3, 15355, 3162, 3953, 834, 7261, 7, 6157, 332, 357, 9191, 332, 5411, 7261, 23, 26, 3274, 332, 4416, 7261, 23, 26, 350, 4630, 6880, 272, 476, 332, 5411, ...
Show all game names played by at least 1000 hours.
SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid HAVING SUM(hours_played) >= 1000
CREATE TABLE Plays_games (gameid VARCHAR); CREATE TABLE Video_games (gameid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2911, 7, 834, 7261, 7, 41, 7261, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 3953, 834, 7261, 7, 41, 7261, 23, 26, 584, 4280, 28027, 61, 3, 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, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 122, 4350, 21680, 2911, 7, 834, 7261, 7, 6157, 332, 536, 3, 15355, 3162, 3953, 834, 7261, 7, 6157, 332, 357, 9191, 332, 5411, 7261, 23, 26, 3274, 332, 4416, 7261, 23, 26, 350, 4630, 6880, 272, 476, 332, 5411, ...
Show all game names played by Linda Smith
SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = "Smith" AND T3.Fname = "Linda"
CREATE TABLE Student (Stuid VARCHAR, Lname VARCHAR, Fname VARCHAR); CREATE TABLE Plays_games (gameid VARCHAR, Stuid VARCHAR); CREATE TABLE Video_games (gameid VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 6341, 41, 13076, 23, 26, 584, 4280, 28027, 6, 301, 4350, 584, 4280, 28027, 6, 377, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2911, 7, 834, 7261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 350, 4350, 21680, 2911, 7, 834, 7261, 7, 6157, 332, 536, 3, 15355, 3162, 3953, 834, 7261, 7, 6157, 332, 357, 9191, 332, 5411, 7261, 23, 26, 3274, 332, 4416, 7261, 23, 26, 3, 15355, 3162, 6341, 6157, 332, 519, 9191...
Find the last and first name of students who are playing Football or Lacrosse.
SELECT T2.lname, T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = "Football" OR T1.SportName = "Lacrosse"
CREATE TABLE SportsInfo (StuID VARCHAR, SportName VARCHAR); CREATE TABLE Student (lname VARCHAR, fname VARCHAR, StuID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 5716, 29381, 41, 13076, 4309, 584, 4280, 28027, 6, 3349, 23954, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 6341, 41, 40, 4350, 584, 4280, 28027, 6, 3, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 4416, 40, 4350, 6, 332, 4416, 89, 4350, 21680, 5716, 29381, 6157, 332, 536, 3, 15355, 3162, 6341, 6157, 332, 357, 9191, 332, 5411, 13076, 4309, 3274, 332, 4416, 13076, 4309, 549, 17444, 427, 332, 5411, 17682, 239...
Find the first name and age of the students who are playing both Football and Lacrosse.
SELECT fname, age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = "Football" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = "Lacrosse")
CREATE TABLE Student (fname VARCHAR, age VARCHAR, StuID VARCHAR, SportName VARCHAR); CREATE TABLE Sportsinfo (fname VARCHAR, age VARCHAR, StuID VARCHAR, SportName VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 6341, 41, 89, 4350, 584, 4280, 28027, 6, 1246, 584, 4280, 28027, 6, 3, 13076, 4309, 584, 4280, 28027, 6, 3349, 23954, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 89, 4350, 6, 1246, 21680, 6341, 549, 17444, 427, 3, 13076, 4309, 3388, 41, 23143, 14196, 3, 13076, 4309, 21680, 5716, 9583, 549, 17444, 427, 3349, 23954, 3274, 96, 371, 32, 32, 17, 3184, 121, 3, 21342, 5249, 1419...
Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games.
SELECT lname, sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = "Call of Destiny" INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = "Works of Widenius")
CREATE TABLE Plays_games (StuID VARCHAR, GameID VARCHAR); CREATE TABLE Student (lname VARCHAR, sex VARCHAR, StuID VARCHAR); CREATE TABLE Video_games (GameID VARCHAR, Gname VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2911, 7, 834, 7261, 7, 41, 13076, 4309, 584, 4280, 28027, 6, 4435, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 6341, 41, 40, 4350, 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, 3, 40, 4350, 6, 3, 7, 994, 21680, 6341, 549, 17444, 427, 3, 13076, 4309, 3388, 41, 23143, 14196, 332, 5411, 13076, 4309, 21680, 2911, 7, 834, 7261, 7, 6157, 332, 536, 3, 15355, 3162, 3953, 834, 7261, 7, 6157, 332,...
Find the name of all customers.
SELECT customer_name FROM customers
CREATE TABLE customers (customer_name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 564, 13, 66, 722, 5, 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, 884, 834, 4350, 21680, 722, 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, -1...
What is the average amount of items ordered in each order?
SELECT AVG(order_quantity) FROM order_items
CREATE TABLE order_items (order_quantity INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 455, 834, 23, 3524, 7, 41, 9397, 834, 13158, 485, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 1348, 866, 13, 1173, 5563, 16, 284, 455, 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, 71, 17217, 599, 9397, 834, 13158, 485, 61, 21680, 455, 834, 23, 3524, 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, -10...
What are the names of customers who use payment method "Cash"?
SELECT customer_name FROM customers WHERE payment_method = "Cash"
CREATE TABLE customers (customer_name VARCHAR, payment_method VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 834, 4350, 584, 4280, 28027, 6, 1942, 834, 23152, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 3056, 13, 722, 113, 169, 1942, 1573, 96, 254, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 884, 834, 4350, 21680, 722, 549, 17444, 427, 1942, 834, 23152, 3274, 96, 254, 3198, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Find the "date became customers" of the customers whose ID is between 10 and 20.
SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20
CREATE TABLE customers (date_became_customer VARCHAR, customer_id INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 5522, 834, 346, 6527, 15, 834, 25697, 49, 584, 4280, 28027, 6, 884, 834, 23, 26, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 96, 5522, 1632, 722, 121, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 833, 834, 346, 6527, 15, 834, 25697, 49, 21680, 722, 549, 17444, 427, 884, 834, 23, 26, 272, 7969, 518, 23394, 335, 3430, 460, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Which payment method is used by most customers?
SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE customers (payment_method VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 21752, 834, 23152, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 4073, 1942, 1573, 19, 261, 57, 167, 722, 58, 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, 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, 1942, 834, 23152, 21680, 722, 350, 4630, 6880, 272, 476, 1942, 834, 23152, 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, ...
What are the names of customers using the most popular payment method?
SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1)
CREATE TABLE customers (customer_name VARCHAR, payment_method VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 834, 4350, 584, 4280, 28027, 6, 1942, 834, 23152, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 3056, 13, 722, 338, 8, 167, 1012, 1942, 1573, 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, 884, 834, 4350, 21680, 722, 549, 17444, 427, 1942, 834, 23152, 3274, 41, 23143, 14196, 1942, 834, 23152, 21680, 722, 350, 4630, 6880, 272, 476, 1942, 834, 23152, 4674, 11300, 272, 476, 2847, 17161, 599, 1935, 61, 309, ...
What are all the payment methods?
SELECT DISTINCT payment_method FROM customers
CREATE TABLE customers (payment_method VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 21752, 834, 23152, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 66, 8, 1942, 2254, 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, 3, 15438, 25424, 6227, 1942, 834, 23152, 21680, 722, 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, -...
What are the details of all products?
SELECT DISTINCT product_details FROM products
CREATE TABLE products (product_details VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 494, 41, 15892, 834, 221, 5756, 7, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 1030, 13, 66, 494, 58, 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, 3, 15438, 25424, 6227, 556, 834, 221, 5756, 7, 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, ...
Find the name of all customers whose name contains "Alex".
SELECT customer_name FROM customers WHERE customer_name LIKE "%Alex%"
CREATE TABLE customers (customer_name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 564, 13, 66, 722, 3, 2544, 564, 2579, 96, 27280, 1280, 1, 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, 884, 834, 4350, 21680, 722, 549, 17444, 427, 884, 834, 4350, 8729, 9914, 96, 1454, 27280, 1454, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Find the detail of products whose detail contains the word "Latte" or the word "Americano"
SELECT product_details FROM products WHERE product_details LIKE "%Latte%" OR product_details LIKE "%Americano%"
CREATE TABLE products (product_details VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 494, 41, 15892, 834, 221, 5756, 7, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 2736, 13, 494, 3, 2544, 2736, 2579, 8, 1448, 96, 434, 10206, 121, 42, 8, 1448, 96, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 3, 23143, 14196, 556, 834, 221, 5756, 7, 21680, 494, 549, 17444, 427, 556, 834, 221, 5756, 7, 8729, 9914, 96, 1454, 434, 10206, 1454, 121, 4674, 556, 834, 221, 5756, 7, 8729, 9914, 96, 1454, 8778, 32, 1454, 121, 1, -100, -100, -10...
What is the address content of the customer named "Maudie Kertzmann"?
SELECT t3.address_content FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t1.customer_name = "Maudie Kertzmann"
CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE addresses (address_content VARCHAR, address_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 834, 23, 26, 584, 4280, 28027, 6, 884, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 884, 834, 9, 26, 12039, 15, 7, 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, 17, 5787, 9, 26, 12039, 834, 14819, 21680, 722, 6157, 3, 17, 536, 3, 15355, 3162, 884, 834, 9, 26, 12039, 15, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 25697, 49, 834, 23, 26, 3274, 3, 17, 4416, 25697, 49, ...
How many customers are living in city "Lake Geovannyton"?
SELECT COUNT(*) FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.city = "Lake Geovannyton"
CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE addresses (address_id VARCHAR, city VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 7181, 41, 9, 26, 12039, 834, 23, 26, 584, 4280, 28027, 6, 690, 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, 2847, 17161, 599, 1935, 61, 21680, 722, 6157, 3, 17, 536, 3, 15355, 3162, 884, 834, 9, 26, 12039, 15, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 25697, 49, 834, 23, 26, 3274, 3, 17, 4416, 25697, 49, 834, 23, 26, ...
Find the name of customers who are living in Colorado?
SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = "Colorado"
CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE addresses (address_id VARCHAR, state_province_county VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 884, 834, 9, 26, 12039, 15, 7, 41, 25697, 49, 834, 23, 26, 584, 4280, 28027, 6, 1115, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 722, 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, 3, 17, 5411, 25697, 49, 834, 4350, 21680, 722, 6157, 3, 17, 536, 3, 15355, 3162, 884, 834, 9, 26, 12039, 15, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 25697, 49, 834, 23, 26, 3274, 3, 17, 4416, 25697, 49, 834, ...
Find the list of cities that no customer is living in.
SELECT city FROM addresses WHERE NOT city IN (SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id)
CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE addresses (city VARCHAR, address_id VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE addresses (city VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 7181, 41, 6726, 584, 4280, 28027, 6, 1115, 834, 23, 26, 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, 690, 21680, 7181, 549, 17444, 427, 4486, 690, 3388, 41, 23143, 14196, 3, 15438, 25424, 6227, 3, 17, 5787, 6726, 21680, 722, 6157, 3, 17, 536, 3, 15355, 3162, 884, 834, 9, 26, 12039, 15, 7, 6157, 3, 17, 357, 9191, ...
Which city has the most customers living in?
SELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE addresses (city VARCHAR, address_id VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 7181, 41, 6726, 584, 4280, 28027, 6, 1115, 834, 23, 26, 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, 3, 17, 5787, 6726, 21680, 722, 6157, 3, 17, 536, 3, 15355, 3162, 884, 834, 9, 26, 12039, 15, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 25697, 49, 834, 23, 26, 3274, 3, 17, 4416, 25697, 49, 834, 23, 26, 3, 1535...
Find the city with post code 255.
SELECT city FROM addresses WHERE zip_postcode = 255
CREATE TABLE addresses (city VARCHAR, zip_postcode VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7181, 41, 6726, 584, 4280, 28027, 6, 10658, 834, 5950, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 690, 28, 442, 1081, 3, 25502, 5, 1, 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, 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, 690, 21680, 7181, 549, 17444, 427, 10658, 834, 5950, 4978, 3274, 3, 25502, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Find the state and country of all cities with post code starting with 4.
SELECT state_province_county, country FROM addresses WHERE zip_postcode LIKE "4%"
CREATE TABLE addresses (state_province_county VARCHAR, country VARCHAR, zip_postcode VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7181, 41, 5540, 834, 1409, 2494, 565, 834, 13362, 63, 584, 4280, 28027, 6, 684, 584, 4280, 28027, 6, 10658, 834, 5950, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 3, 23143, 14196, 538, 834, 1409, 2494, 565, 834, 13362, 63, 6, 684, 21680, 7181, 549, 17444, 427, 10658, 834, 5950, 4978, 8729, 9914, 96, 5988, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
List the countries having more than 4 addresses listed.
SELECT country FROM addresses GROUP BY country HAVING COUNT(address_id) > 4
CREATE TABLE addresses (country VARCHAR, address_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7181, 41, 17529, 584, 4280, 28027, 6, 1115, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 8, 1440, 578, 72, 145, 314, 7181, 2616, 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, 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, 684, 21680, 7181, 350, 4630, 6880, 272, 476, 684, 454, 6968, 2365, 2847, 17161, 599, 9, 26, 12039, 834, 23, 26, 61, 2490, 314, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
List all the contact channel codes that were used less than 5 times.
SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING COUNT(customer_id) < 5
CREATE TABLE customer_contact_channels (channel_code VARCHAR, customer_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 884, 834, 27608, 834, 19778, 7, 41, 19778, 834, 4978, 584, 4280, 28027, 6, 884, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 66, 8, 574, 4245, 5633, 24, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 4245, 834, 4978, 21680, 884, 834, 27608, 834, 19778, 7, 350, 4630, 6880, 272, 476, 4245, 834, 4978, 454, 6968, 2365, 2847, 17161, 599, 25697, 49, 834, 23, 26, 61, 3, 2, 305, 1, -100, -100, -100, -100, -100, -100, ...
Which contact channel has been used by the customer with name "Tillman Ernser"?
SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Tillman Ernser"
CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE customer_contact_channels (customer_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 834, 23, 26, 584, 4280, 28027, 6, 884, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 884, 834, 27608, 834, 19778, 7, 41, 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, 3, 15438, 25424, 6227, 4245, 834, 4978, 21680, 722, 6157, 3, 17, 536, 3, 15355, 3162, 884, 834, 27608, 834, 19778, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 25697, 49, 834, 23, 26, 3274, 3, 17, 4416, 25697, 49, 83...
What is the "active to date" of the latest contact channel used by "Tillman Ernser"?
SELECT MAX(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Tillman Ernser"
CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE customer_contact_channels (active_to_date INTEGER, customer_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 834, 23, 26, 584, 4280, 28027, 6, 884, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 884, 834, 27608, 834, 19778, 7, 41, 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, 4800, 4, 599, 17, 4416, 6645, 834, 235, 834, 5522, 61, 21680, 722, 6157, 3, 17, 536, 3, 15355, 3162, 884, 834, 27608, 834, 19778, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 25697, 49, 834, 23, 26, 3274, 3, 17, 44...
What is the average time span of contact channels in the database?
SELECT AVG(active_to_date - active_from_date) FROM customer_contact_channels
CREATE TABLE customer_contact_channels (active_to_date VARCHAR, active_from_date VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 884, 834, 27608, 834, 19778, 7, 41, 6645, 834, 235, 834, 5522, 584, 4280, 28027, 6, 1676, 834, 7152, 834, 5522, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 1348, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 71, 17217, 599, 6645, 834, 235, 834, 5522, 3, 18, 1676, 834, 7152, 834, 5522, 61, 21680, 884, 834, 27608, 834, 19778, 7, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
What is the channel code and contact number of the customer contact channel that was active for the longest time?
SELECT channel_code, contact_number FROM customer_contact_channels WHERE active_to_date - active_from_date = (SELECT active_to_date - active_from_date FROM customer_contact_channels ORDER BY (active_to_date - active_from_date) DESC LIMIT 1)
CREATE TABLE customer_contact_channels (channel_code VARCHAR, contact_number VARCHAR, active_to_date VARCHAR, active_from_date VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 884, 834, 27608, 834, 19778, 7, 41, 19778, 834, 4978, 584, 4280, 28027, 6, 574, 834, 5525, 1152, 584, 4280, 28027, 6, 1676, 834, 235, 834, 5522, 584, 4280, 28027, 6, 1676, 834, 7152, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4245, 834, 4978, 6, 574, 834, 5525, 1152, 21680, 884, 834, 27608, 834, 19778, 7, 549, 17444, 427, 1676, 834, 235, 834, 5522, 3, 18, 1676, 834, 7152, 834, 5522, 3274, 41, 23143, 14196, 1676, 834, 235, 834, 5522, 3, ...
Find the name and active date of the customer that use email as the contact channel.
SELECT t1.customer_name, t2.active_from_date FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email'
CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_contact_channels (active_from_date VARCHAR, customer_id VARCHAR, channel_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 834, 4350, 584, 4280, 28027, 6, 884, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 884, 834, 27608, 834, 19778, 7, 41, 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, 3, 17, 5411, 25697, 49, 834, 4350, 6, 3, 17, 4416, 6645, 834, 7152, 834, 5522, 21680, 722, 6157, 3, 17, 536, 3, 15355, 3162, 884, 834, 27608, 834, 19778, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 25697, 49, 834, ...
What is the name of the customer that made the order with the largest quantity?
SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t3.order_quantity = (SELECT MAX(order_quantity) FROM order_items)
CREATE TABLE order_items (order_id VARCHAR, order_quantity INTEGER); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE order_items (order_quantity INTEGER); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 455, 834, 23, 3524, 7, 41, 9397, 834, 23, 26, 584, 4280, 28027, 6, 455, 834, 13158, 485, 3, 21342, 17966, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17, 5411, 25697, 49, 834, 4350, 21680, 722, 6157, 3, 17, 536, 3, 15355, 3162, 884, 834, 9397, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 25697, 49, 834, 23, 26, 3274, 3, 17, 4416, 25697, 49, 834, 23, 26, 3, ...
What is the name of the customer that has purchased the most items?
SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) DESC LIMIT 1
CREATE TABLE order_items (order_id VARCHAR, order_quantity INTEGER); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 455, 834, 23, 3524, 7, 41, 9397, 834, 23, 26, 584, 4280, 28027, 6, 455, 834, 13158, 485, 3, 21342, 17966, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17, 5411, 25697, 49, 834, 4350, 21680, 722, 6157, 3, 17, 536, 3, 15355, 3162, 884, 834, 9397, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 25697, 49, 834, 23, 26, 3274, 3, 17, 4416, 25697, 49, 834, 23, 26, 3, ...
What is the payment method of the customer that has purchased the least quantity of items?
SELECT t1.payment_method FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY SUM(t3.order_quantity) LIMIT 1
CREATE TABLE order_items (order_id VARCHAR, order_quantity INTEGER); CREATE TABLE customers (payment_method VARCHAR, customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 455, 834, 23, 3524, 7, 41, 9397, 834, 23, 26, 584, 4280, 28027, 6, 455, 834, 13158, 485, 3, 21342, 17966, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 722, 41, 21752, 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, 3, 17, 5411, 21752, 834, 23152, 21680, 722, 6157, 3, 17, 536, 3, 15355, 3162, 884, 834, 9397, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 25697, 49, 834, 23, 26, 3274, 3, 17, 4416, 25697, 49, 834, 23, 26, 3, 15355...
How many types of products have Rodrick Heaney bought in total?
SELECT COUNT(DISTINCT t3.product_id) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = "Rodrick Heaney"
CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE order_items (product_id VARCHAR, order_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 834, 23, 26, 584, 4280, 28027, 6, 884, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 455, 834, 23, 3524, 7, 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, 2847, 17161, 599, 15438, 25424, 6227, 3, 17, 5787, 15892, 834, 23, 26, 61, 21680, 722, 6157, 3, 17, 536, 3, 15355, 3162, 884, 834, 9397, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 25697, 49, 834, 23, 26, 3274, 3, ...
What is the total quantity of products purchased by "Rodrick Heaney"?
SELECT SUM(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = "Rodrick Heaney"
CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE order_items (order_quantity INTEGER, order_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 834, 23, 26, 584, 4280, 28027, 6, 884, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 455, 834, 23, 3524, 7, 41, 9397, 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, 180, 6122, 599, 17, 5787, 9397, 834, 13158, 485, 61, 21680, 722, 6157, 3, 17, 536, 3, 15355, 3162, 884, 834, 9397, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 25697, 49, 834, 23, 26, 3274, 3, 17, 4416, 25697, 49, ...
How many customers have at least one order with status "Cancelled"?
SELECT COUNT(DISTINCT customer_id) FROM customer_orders WHERE order_status = "Cancelled"
CREATE TABLE customer_orders (customer_id VARCHAR, order_status VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 884, 834, 9397, 7, 41, 25697, 49, 834, 23, 26, 584, 4280, 28027, 6, 455, 834, 8547, 302, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 722, 43, 44, 709, 80, 455, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 15438, 25424, 6227, 884, 834, 23, 26, 61, 21680, 884, 834, 9397, 7, 549, 17444, 427, 455, 834, 8547, 302, 3274, 96, 254, 663, 40, 1361, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
How many orders have detail "Second time"?
SELECT COUNT(*) FROM customer_orders WHERE order_details = "Second time"
CREATE TABLE customer_orders (order_details VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 884, 834, 9397, 7, 41, 9397, 834, 221, 5756, 7, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 5022, 43, 2736, 96, 134, 15, 1018, 26, 97, 121, 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, 2847, 17161, 599, 1935, 61, 21680, 884, 834, 9397, 7, 549, 17444, 427, 455, 834, 221, 5756, 7, 3274, 96, 134, 15, 1018, 26, 97, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Find the customer name and date of the orders that have the status "Delivered".
SELECT t1.customer_name, t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = "Delivered"
CREATE TABLE customer_orders (order_date VARCHAR, customer_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 884, 834, 9397, 7, 41, 9397, 834, 5522, 584, 4280, 28027, 6, 884, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 834, 435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17, 5411, 25697, 49, 834, 4350, 6, 3, 17, 4416, 9397, 834, 5522, 21680, 722, 6157, 3, 17, 536, 3, 15355, 3162, 884, 834, 9397, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 25697, 49, 834, 23, 26, 3274, 3, 17, ...
What is the total number of products that are in orders with status "Cancelled"?
SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_status = "Cancelled"
CREATE TABLE customer_orders (order_id VARCHAR, order_status VARCHAR); CREATE TABLE order_items (order_quantity INTEGER, order_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 884, 834, 9397, 7, 41, 9397, 834, 23, 26, 584, 4280, 28027, 6, 455, 834, 8547, 302, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 455, 834, 23, 3524, 7, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17, 4416, 9397, 834, 13158, 485, 61, 21680, 884, 834, 9397, 7, 6157, 3, 17, 536, 3, 15355, 3162, 455, 834, 23, 3524, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 9397, 834, 23, 26, 3274, 3, 17, 4416...
Find the total amount of products ordered before 2018-03-17 07:13:53.
SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_date < "2018-03-17 07:13:53"
CREATE TABLE customer_orders (order_id VARCHAR, order_date INTEGER); CREATE TABLE order_items (order_quantity INTEGER, order_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 884, 834, 9397, 7, 41, 9397, 834, 23, 26, 584, 4280, 28027, 6, 455, 834, 5522, 3, 21342, 17966, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 455, 834, 23, 3524, 7, 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, 180, 6122, 599, 17, 4416, 9397, 834, 13158, 485, 61, 21680, 884, 834, 9397, 7, 6157, 3, 17, 536, 3, 15355, 3162, 455, 834, 23, 3524, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 9397, 834, 23, 26, 3274, 3, 17, 4416...
Who made the latest order?
SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.order_date DESC LIMIT 1
CREATE TABLE customer_orders (customer_id VARCHAR, order_date VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 884, 834, 9397, 7, 41, 25697, 49, 834, 23, 26, 584, 4280, 28027, 6, 455, 834, 5522, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 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, 3, 17, 5411, 25697, 49, 834, 4350, 21680, 722, 6157, 3, 17, 536, 3, 15355, 3162, 884, 834, 9397, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 25697, 49, 834, 23, 26, 3274, 3, 17, 4416, 25697, 49, 834, 23, 26, 4674,...
Which product has been ordered most number of times?
SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE products (product_details VARCHAR, product_id VARCHAR); CREATE TABLE order_items (product_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 494, 41, 15892, 834, 221, 5756, 7, 584, 4280, 28027, 6, 556, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 455, 834, 23, 3524, 7, 41, 15892,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17, 4416, 15892, 834, 221, 5756, 7, 21680, 455, 834, 23, 3524, 7, 6157, 3, 17, 536, 3, 15355, 3162, 494, 6157, 3, 17, 357, 9191, 3, 17, 5411, 15892, 834, 23, 26, 3274, 3, 17, 4416, 15892, 834, 23, 26, 350, ...
Find the name and ID of the product whose total order quantity is the largest.
SELECT t2.product_details, t2.product_id FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY SUM(t1.order_quantity) LIMIT 1
CREATE TABLE order_items (product_id VARCHAR, order_quantity INTEGER); CREATE TABLE products (product_details VARCHAR, product_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 455, 834, 23, 3524, 7, 41, 15892, 834, 23, 26, 584, 4280, 28027, 6, 455, 834, 13158, 485, 3, 21342, 17966, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 494, 41, 15892, 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, 3, 17, 4416, 15892, 834, 221, 5756, 7, 6, 3, 17, 4416, 15892, 834, 23, 26, 21680, 455, 834, 23, 3524, 7, 6157, 3, 17, 536, 3, 15355, 3162, 494, 6157, 3, 17, 357, 9191, 3, 17, 5411, 15892, 834, 23, 26, 3274, ...
Find all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.
SELECT address_content FROM addresses WHERE city = "East Julianaside" AND state_province_county = "Texas" UNION SELECT address_content FROM addresses WHERE city = "Gleasonmouth" AND state_province_county = "Arizona"
CREATE TABLE addresses (address_content VARCHAR, city VARCHAR, state_province_county VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7181, 41, 9, 26, 12039, 834, 14819, 584, 4280, 28027, 6, 690, 584, 4280, 28027, 6, 538, 834, 1409, 2494, 565, 834, 13362, 63, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1115, 834, 14819, 21680, 7181, 549, 17444, 427, 690, 3274, 96, 25235, 20080, 9, 1583, 121, 3430, 538, 834, 1409, 2494, 565, 834, 13362, 63, 3274, 96, 13598, 9, 7, 121, 4417, 9215, 3, 23143, 14196, 1115, 834, 14819, ...
Find the name of customers who did not pay with Cash.
SELECT customer_name FROM customers WHERE payment_method <> 'Cash'
CREATE TABLE customers (customer_name VARCHAR, payment_method VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 834, 4350, 584, 4280, 28027, 6, 1942, 834, 23152, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 564, 13, 722, 113, 410, 59, 726, 28, 8835, 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, 0...
[ 3, 23143, 14196, 884, 834, 4350, 21680, 722, 549, 17444, 427, 1942, 834, 23152, 3, 2, 3155, 3, 31, 254, 3198, 31, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Find the names of customers who never ordered product Latte.
SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte'
CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_details VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 455, 834, 23, 3524, 7, 41, 9397, 834, 23, 26, 584, 4280, 28027, 6, 556, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 884, 834, 4350, 21680, 722, 262, 4, 30416, 3, 23143, 14196, 3, 17, 5411, 25697, 49, 834, 4350, 21680, 722, 6157, 3, 17, 536, 3, 15355, 3162, 884, 834, 9397, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 25697, 49, 834...
Find the names of customers who never placed an order.
SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id
CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 834, 4350, 584, 4280, 28027, 6, 884, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 722, 41, 25697, 49, 834, 4350, 584, 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, 884, 834, 4350, 21680, 722, 262, 4, 30416, 3, 23143, 14196, 3, 17, 5411, 25697, 49, 834, 4350, 21680, 722, 6157, 3, 17, 536, 3, 15355, 3162, 884, 834, 9397, 7, 6157, 3, 17, 357, 9191, 3, 17, 5411, 25697, 49, 834...
List the age of all music artists.
SELECT Age FROM artist
CREATE TABLE artist (Age VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2377, 41, 188, 397, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 8, 1246, 13, 66, 723, 3153, 5, 1, 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, 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, 7526, 21680, 2377, 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, ...
What is the average age of all artists?
SELECT AVG(Age) FROM artist
CREATE TABLE artist (Age INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2377, 41, 188, 397, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 1348, 1246, 13, 66, 3153, 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, 71, 17217, 599, 188, 397, 61, 21680, 2377, 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,...
What are the famous titles of the artist "Triumfall"?
SELECT Famous_Title FROM artist WHERE Artist = "Triumfall"
CREATE TABLE artist (Famous_Title VARCHAR, Artist VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2377, 41, 371, 265, 1162, 834, 382, 155, 109, 584, 4280, 28027, 6, 9152, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 2581, 8342, 13, 8, 2377, 96, 382, 11879, 285...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 29952, 834, 382, 155, 109, 21680, 2377, 549, 17444, 427, 9152, 3274, 96, 382, 11879, 2857, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
What are the distinct Famous release dates?
SELECT DISTINCT (Famous_Release_date) FROM artist
CREATE TABLE artist (Famous_Release_date VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2377, 41, 371, 265, 1162, 834, 1649, 40, 14608, 834, 5522, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 6746, 29952, 1576, 5128, 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, 41, 371, 265, 1162, 834, 1649, 40, 14608, 834, 5522, 61, 21680, 2377, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Return the dates of ceremony and the results of all music festivals
SELECT Date_of_ceremony, RESULT FROM music_festival
CREATE TABLE music_festival (Date_of_ceremony VARCHAR, RESULT VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 723, 834, 89, 24742, 41, 308, 342, 834, 858, 834, 2110, 15, 21208, 584, 4280, 28027, 6, 4083, 4138, 9012, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 9778, 8, 5128, 13, 7252, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 3, 23143, 14196, 7678, 834, 858, 834, 2110, 15, 21208, 6, 4083, 4138, 9012, 21680, 723, 834, 89, 24742, 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 category of music festivals with result "Awarded"?
SELECT Category FROM music_festival WHERE RESULT = "Awarded"
CREATE TABLE music_festival (Category VARCHAR, RESULT VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 723, 834, 89, 24742, 41, 18610, 6066, 651, 584, 4280, 28027, 6, 4083, 4138, 9012, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 3295, 13, 723, 14856, 28, 741, 96, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 3, 23143, 14196, 17459, 21680, 723, 834, 89, 24742, 549, 17444, 427, 4083, 4138, 9012, 3274, 96, 188, 28288, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
What are the maximum and minimum week on top of all volumes?
SELECT MAX(Weeks_on_Top), MIN(Weeks_on_Top) FROM volume
CREATE TABLE volume (Weeks_on_Top INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2908, 41, 1326, 16789, 834, 106, 834, 22481, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 2411, 11, 2559, 471, 30, 420, 13, 66, 13548, 58, 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, 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, 1326, 16789, 834, 106, 834, 22481, 201, 3, 17684, 599, 1326, 16789, 834, 106, 834, 22481, 61, 21680, 2908, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
What are the songs in volumes with more than 1 week on top?
SELECT Song FROM volume WHERE Weeks_on_Top > 1
CREATE TABLE volume (Song VARCHAR, Weeks_on_Top INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2908, 41, 134, 2444, 584, 4280, 28027, 6, 6551, 7, 834, 106, 834, 22481, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 3605, 16, 13548, 28, 72, 145, 209, 471, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11263, 21680, 2908, 549, 17444, 427, 6551, 7, 834, 106, 834, 22481, 2490, 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,...
Please list all songs in volumes in ascending alphabetical order.
SELECT Song FROM volume ORDER BY Song
CREATE TABLE volume (Song VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2908, 41, 134, 2444, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 863, 570, 66, 3605, 16, 13548, 16, 25200, 53, 20688, 1950, 455, 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, 11263, 21680, 2908, 4674, 11300, 272, 476, 11263, 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, ...
How many distinct artists do the volumes associate to?
SELECT COUNT(DISTINCT Artist_ID) FROM volume
CREATE TABLE volume (Artist_ID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2908, 41, 7754, 343, 834, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 6746, 3153, 103, 8, 13548, 7573, 12, 58, 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, 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, 9152, 834, 4309, 61, 21680, 2908, 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, ...
Please show the date of ceremony of the volumes that last more than 2 weeks on top.
SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2
CREATE TABLE music_festival (Date_of_ceremony VARCHAR, Volume VARCHAR); CREATE TABLE volume (Volume_ID VARCHAR, Weeks_on_Top INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 723, 834, 89, 24742, 41, 308, 342, 834, 858, 834, 2110, 15, 21208, 584, 4280, 28027, 6, 14816, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2908, 41, 2280...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 308, 342, 834, 858, 834, 2110, 15, 21208, 21680, 723, 834, 89, 24742, 6157, 332, 536, 3, 15355, 3162, 2908, 6157, 332, 357, 9191, 332, 5411, 22803, 440, 15, 3274, 332, 4416, 22803, 440, 15, 834, 4309, 549...
Please show the songs that have result "nominated" at music festivals.
SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = "Nominated"
CREATE TABLE volume (Song VARCHAR, Volume_ID VARCHAR); CREATE TABLE music_festival (Volume VARCHAR, Result VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2908, 41, 134, 2444, 584, 4280, 28027, 6, 14816, 834, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 723, 834, 89, 24742, 41, 22803, 440, 15, 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, 332, 4416, 134, 2444, 21680, 723, 834, 89, 24742, 6157, 332, 536, 3, 15355, 3162, 2908, 6157, 332, 357, 9191, 332, 5411, 22803, 440, 15, 3274, 332, 4416, 22803, 440, 15, 834, 4309, 549, 17444, 427, 332, 5411, 20119, ...
What are the issue dates of volumes associated with the artist "Gorgoroth"?
SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = "Gorgoroth"
CREATE TABLE artist (Artist_ID VARCHAR, Artist VARCHAR); CREATE TABLE volume (Issue_Date VARCHAR, Artist_ID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2377, 41, 7754, 343, 834, 4309, 584, 4280, 28027, 6, 9152, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2908, 41, 196, 7, 7, 76, 15, 834, 308, 342, 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, 332, 4416, 196, 7, 7, 76, 15, 834, 308, 342, 21680, 2377, 6157, 332, 536, 3, 15355, 3162, 2908, 6157, 332, 357, 9191, 332, 5411, 7754, 343, 834, 4309, 3274, 332, 4416, 7754, 343, 834, 4309, 549, 17444, 427, 332, 5...
What are the songs in volumes associated with the artist aged 32 or older?
SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32
CREATE TABLE volume (Song VARCHAR, Artist_ID VARCHAR); CREATE TABLE artist (Artist_ID VARCHAR, age VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2908, 41, 134, 2444, 584, 4280, 28027, 6, 9152, 834, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2377, 41, 7754, 343, 834, 4309, 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, 332, 4416, 134, 2444, 21680, 2377, 6157, 332, 536, 3, 15355, 3162, 2908, 6157, 332, 357, 9191, 332, 5411, 7754, 343, 834, 4309, 3274, 332, 4416, 7754, 343, 834, 4309, 549, 17444, 427, 332, 5411, 545, 2490, 2423, 3538,...
What is the average weeks on top of volumes associated with the artist aged 25 or younger?
SELECT AVG(T2.Weeks_on_Top) FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 25
CREATE TABLE volume (Weeks_on_Top INTEGER, Artist_ID VARCHAR); CREATE TABLE artist (Artist_ID VARCHAR, age VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2908, 41, 1326, 16789, 834, 106, 834, 22481, 3, 21342, 17966, 6, 9152, 834, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2377, 41, 7754, 343, 834, 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, 71, 17217, 599, 382, 4416, 1326, 16789, 834, 106, 834, 22481, 61, 21680, 2377, 6157, 332, 536, 3, 15355, 3162, 2908, 6157, 332, 357, 9191, 332, 5411, 7754, 343, 834, 4309, 3274, 332, 4416, 7754, 343, 834, 4309, 549, ...
What are the famous title of the artists associated with volumes with more than 2 weeks on top?
SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2
CREATE TABLE artist (Famous_Title VARCHAR, Artist_ID VARCHAR); CREATE TABLE volume (Artist_ID VARCHAR, Weeks_on_Top INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2377, 41, 371, 265, 1162, 834, 382, 155, 109, 584, 4280, 28027, 6, 9152, 834, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2908, 41, 7754, 343, 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, 371, 265, 1162, 834, 382, 155, 109, 21680, 2377, 6157, 332, 536, 3, 15355, 3162, 2908, 6157, 332, 357, 9191, 332, 5411, 7754, 343, 834, 4309, 3274, 332, 4416, 7754, 343, 834, 4309, 549, 17444, 427, 332, 4...
Please list the age and famous title of artists in descending order of age.
SELECT Famous_Title, Age FROM artist ORDER BY Age DESC
CREATE TABLE artist (Famous_Title VARCHAR, Age VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2377, 41, 371, 265, 1162, 834, 382, 155, 109, 584, 4280, 28027, 6, 7526, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 863, 570, 8, 1246, 11, 2581, 2233, 13, 3153, 16, 3, 3096...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 3, 23143, 14196, 29952, 834, 382, 155, 109, 6, 7526, 21680, 2377, 4674, 11300, 272, 476, 7526, 309, 25067, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
What is the famous release date of the artist with the oldest age?
SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1
CREATE TABLE artist (Famous_Release_date VARCHAR, Age VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2377, 41, 371, 265, 1162, 834, 1649, 40, 14608, 834, 5522, 584, 4280, 28027, 6, 7526, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 2581, 1576, 833, 13, 8, 2377, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 29952, 834, 1649, 40, 14608, 834, 5522, 21680, 2377, 4674, 11300, 272, 476, 7526, 309, 25067, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Please show the categories of the music festivals and the count.
SELECT Category, COUNT(*) FROM music_festival GROUP BY Category
CREATE TABLE music_festival (Category VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 723, 834, 89, 24742, 41, 18610, 6066, 651, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 863, 504, 8, 5897, 13, 8, 723, 14856, 11, 8, 3476, 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, 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, 17459, 6, 2847, 17161, 599, 1935, 61, 21680, 723, 834, 89, 24742, 350, 4630, 6880, 272, 476, 17459, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
What is the most common result of the music festival?
SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE music_festival (RESULT VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 723, 834, 89, 24742, 41, 12200, 4254, 382, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 167, 1017, 741, 13, 8, 723, 3994, 58, 1, 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, 4083, 4138, 9012, 21680, 723, 834, 89, 24742, 350, 4630, 6880, 272, 476, 4083, 4138, 9012, 4674, 11300, 272, 476, 2847, 17161, 599, 1935, 61, 309, 25067, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, ...
Please show the categories of the music festivals with count more than 1.
SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1
CREATE TABLE music_festival (Category VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 723, 834, 89, 24742, 41, 18610, 6066, 651, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 863, 504, 8, 5897, 13, 8, 723, 14856, 28, 3476, 72, 145, 1300, 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, 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, 17459, 21680, 723, 834, 89, 24742, 350, 4630, 6880, 272, 476, 17459, 454, 6968, 2365, 2847, 17161, 599, 1935, 61, 2490, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
What is the song in the volume with the maximum weeks on top?
SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1
CREATE TABLE volume (Song VARCHAR, Weeks_on_Top VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2908, 41, 134, 2444, 584, 4280, 28027, 6, 6551, 7, 834, 106, 834, 22481, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 2324, 16, 8, 2908, 28, 8, 2411, 1274, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11263, 21680, 2908, 4674, 11300, 272, 476, 6551, 7, 834, 106, 834, 22481, 309, 25067, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Find the famous titles of artists that do not have any volume.
SELECT Famous_Title FROM artist WHERE NOT Artist_ID IN (SELECT Artist_ID FROM volume)
CREATE TABLE volume (Famous_Title VARCHAR, Artist_ID VARCHAR); CREATE TABLE artist (Famous_Title VARCHAR, Artist_ID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2908, 41, 371, 265, 1162, 834, 382, 155, 109, 584, 4280, 28027, 6, 9152, 834, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2377, 41, 371, 265, 1162,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 29952, 834, 382, 155, 109, 21680, 2377, 549, 17444, 427, 4486, 9152, 834, 4309, 3388, 41, 23143, 14196, 9152, 834, 4309, 21680, 2908, 61, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Show the famous titles of the artists with both volumes that lasted more than 2 weeks on top and volumes that lasted less than 2 weeks on top.
SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2
CREATE TABLE artist (Famous_Title VARCHAR, Artist_ID VARCHAR); CREATE TABLE volume (Artist_ID VARCHAR, Weeks_on_Top INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2377, 41, 371, 265, 1162, 834, 382, 155, 109, 584, 4280, 28027, 6, 9152, 834, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2908, 41, 7754, 343, 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, 371, 265, 1162, 834, 382, 155, 109, 21680, 2377, 6157, 332, 536, 3, 15355, 3162, 2908, 6157, 332, 357, 9191, 332, 5411, 7754, 343, 834, 4309, 3274, 332, 4416, 7754, 343, 834, 4309, 549, 17444, 427, 332, 4...
What are the date of ceremony of music festivals with category "Best Song" and result "Awarded"?
SELECT Date_of_ceremony FROM music_festival WHERE Category = "Best Song" AND RESULT = "Awarded"
CREATE TABLE music_festival (Date_of_ceremony VARCHAR, Category VARCHAR, RESULT VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 723, 834, 89, 24742, 41, 308, 342, 834, 858, 834, 2110, 15, 21208, 584, 4280, 28027, 6, 17459, 584, 4280, 28027, 6, 4083, 4138, 9012, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 3210...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7678, 834, 858, 834, 2110, 15, 21208, 21680, 723, 834, 89, 24742, 549, 17444, 427, 17459, 3274, 96, 17278, 11263, 121, 3430, 4083, 4138, 9012, 3274, 96, 188, 28288, 121, 1, -100, -100, -100, -100, -100, -100, -100, -1...
What is the issue date of the volume with the minimum weeks on top?
SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top LIMIT 1
CREATE TABLE volume (Issue_Date VARCHAR, Weeks_on_Top VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2908, 41, 196, 7, 7, 76, 15, 834, 308, 342, 584, 4280, 28027, 6, 6551, 7, 834, 106, 834, 22481, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 962, 833, 13, 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, 13235, 834, 308, 342, 21680, 2908, 4674, 11300, 272, 476, 6551, 7, 834, 106, 834, 22481, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Please show the results of music festivals and the number of music festivals that have had each, ordered by this count.
SELECT RESULT, COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC
CREATE TABLE music_festival (RESULT VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 723, 834, 89, 24742, 41, 12200, 4254, 382, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 863, 504, 8, 772, 13, 723, 14856, 11, 8, 381, 13, 723, 14856, 24, 43, 141, 284, 6, 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, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 4083, 4138, 9012, 6, 2847, 17161, 599, 1935, 61, 21680, 723, 834, 89, 24742, 350, 4630, 6880, 272, 476, 4083, 4138, 9012, 4674, 11300, 272, 476, 2847, 17161, 599, 1935, 61, 309, 25067, 1, -100, -100, -100, -100, -100,...
What are the issue dates of volumes associated with the artist aged 23 or younger?
SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23
CREATE TABLE volume (Artist_ID VARCHAR); CREATE TABLE artist (Artist_ID VARCHAR, age VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2908, 41, 7754, 343, 834, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2377, 41, 7754, 343, 834, 4309, 584, 4280, 28027, 6, 1246, 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, 13235, 834, 308, 342, 21680, 2377, 6157, 332, 536, 3, 15355, 3162, 2908, 6157, 332, 357, 9191, 332, 5411, 7754, 343, 834, 4309, 3274, 332, 4416, 7754, 343, 834, 4309, 549, 17444, 427, 332, 5411, 545, 3, 2, 2423, 190...
How many roller coasters are there?
SELECT COUNT(*) FROM roller_coaster
CREATE TABLE roller_coaster (Id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10866, 834, 25500, 49, 41, 196, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 10866, 4939, 277, 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, 10866, 834, 25500, 49, 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, -1...
List the names of roller coasters by ascending order of length.
SELECT Name FROM roller_coaster ORDER BY LENGTH
CREATE TABLE roller_coaster (Name VARCHAR, LENGTH VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10866, 834, 25500, 49, 41, 23954, 584, 4280, 28027, 6, 301, 23182, 4611, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 8, 3056, 13, 10866, 4939, 277, 57, 25200, 53, 455, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5570, 21680, 10866, 834, 25500, 49, 4674, 11300, 272, 476, 301, 23182, 4611, 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 are the lengths and heights of roller coasters?
SELECT LENGTH, Height FROM roller_coaster
CREATE TABLE roller_coaster (LENGTH VARCHAR, Height VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10866, 834, 25500, 49, 41, 434, 23182, 4611, 584, 4280, 28027, 6, 24231, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 2475, 7, 11, 3902, 7, 13, 10866, 4939, 277, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 301, 23182, 4611, 6, 24231, 21680, 10866, 834, 25500, 49, 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, -1...
List the names of countries whose language is not "German".
SELECT Name FROM country WHERE Languages <> "German"
CREATE TABLE country (Name VARCHAR, Languages VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 684, 41, 23954, 584, 4280, 28027, 6, 10509, 7, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 8, 3056, 13, 1440, 3, 2544, 1612, 19, 59, 96, 24518, 1280, 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, 5570, 21680, 684, 549, 17444, 427, 10509, 7, 3, 2, 3155, 96, 24518, 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, -10...
Show the statuses of roller coasters longer than 3300 or higher than 100.
SELECT Status FROM roller_coaster WHERE LENGTH > 3300 OR Height > 100
CREATE TABLE roller_coaster (Status VARCHAR, LENGTH VARCHAR, Height VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10866, 834, 25500, 49, 41, 134, 17, 144, 302, 584, 4280, 28027, 6, 301, 23182, 4611, 584, 4280, 28027, 6, 24231, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 8, 2637, 15,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19318, 21680, 10866, 834, 25500, 49, 549, 17444, 427, 301, 23182, 4611, 2490, 220, 5426, 4674, 24231, 2490, 910, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
What are the speeds of the longest roller coaster?
SELECT Speed FROM roller_coaster ORDER BY LENGTH DESC LIMIT 1
CREATE TABLE roller_coaster (Speed VARCHAR, LENGTH VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10866, 834, 25500, 49, 41, 28328, 584, 4280, 28027, 6, 301, 23182, 4611, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 13107, 13, 8, 14783, 10866, 4939, 49, 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, 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, 9913, 21680, 10866, 834, 25500, 49, 4674, 11300, 272, 476, 301, 23182, 4611, 309, 25067, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
What is the average speed of roller coasters?
SELECT AVG(Speed) FROM roller_coaster
CREATE TABLE roller_coaster (Speed INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10866, 834, 25500, 49, 41, 28328, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 1348, 1634, 13, 10866, 4939, 277, 58, 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, 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, 28328, 61, 21680, 10866, 834, 25500, 49, 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, -10...
Show the different statuses and the numbers of roller coasters for each status.
SELECT Status, COUNT(*) FROM roller_coaster GROUP BY Status
CREATE TABLE roller_coaster (Status VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10866, 834, 25500, 49, 41, 134, 17, 144, 302, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 8, 315, 2637, 15, 7, 11, 8, 2302, 13, 10866, 4939, 277, 21, 284, 2637, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 19318, 6, 2847, 17161, 599, 1935, 61, 21680, 10866, 834, 25500, 49, 350, 4630, 6880, 272, 476, 19318, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Please show the most common status of roller coasters.
SELECT Status FROM roller_coaster GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE roller_coaster (Status VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10866, 834, 25500, 49, 41, 134, 17, 144, 302, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 863, 504, 8, 167, 1017, 2637, 13, 10866, 4939, 277, 5, 1, 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, 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, 19318, 21680, 10866, 834, 25500, 49, 350, 4630, 6880, 272, 476, 19318, 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...
List the status shared by more than two roller coaster.
SELECT Status FROM roller_coaster GROUP BY Status HAVING COUNT(*) > 2
CREATE TABLE roller_coaster (Status VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10866, 834, 25500, 49, 41, 134, 17, 144, 302, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 8, 2637, 2471, 57, 72, 145, 192, 10866, 4939, 49, 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, 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, 19318, 21680, 10866, 834, 25500, 49, 350, 4630, 6880, 272, 476, 19318, 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,...
Show the park of the roller coaster with the highest speed.
SELECT Park FROM roller_coaster ORDER BY Speed DESC LIMIT 1
CREATE TABLE roller_coaster (Park VARCHAR, Speed VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10866, 834, 25500, 49, 41, 26163, 584, 4280, 28027, 6, 9913, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 8, 2447, 13, 8, 10866, 4939, 49, 28, 8, 2030, 1634, 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, 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, 1061, 21680, 10866, 834, 25500, 49, 4674, 11300, 272, 476, 9913, 309, 25067, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Show the names of roller coasters and names of country they are in.
SELECT T2.Name, T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID
CREATE TABLE country (Name VARCHAR, Country_ID VARCHAR); CREATE TABLE roller_coaster (Name VARCHAR, Country_ID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 684, 41, 23954, 584, 4280, 28027, 6, 6993, 834, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 10866, 834, 25500, 49, 41, 23954, 584, 4280, 28027, 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, 4416, 23954, 6, 332, 5411, 23954, 21680, 684, 6157, 332, 536, 3, 15355, 3162, 10866, 834, 25500, 49, 6157, 332, 357, 9191, 332, 5411, 10628, 651, 834, 4309, 3274, 332, 4416, 10628, 651, 834, 4309, 1, -100, -100, ...
Show the names of countries that have more than one roller coaster.
SELECT T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name HAVING COUNT(*) > 1
CREATE TABLE roller_coaster (Country_ID VARCHAR); CREATE TABLE country (Name VARCHAR, Country_ID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10866, 834, 25500, 49, 41, 10628, 651, 834, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 684, 41, 23954, 584, 4280, 28027, 6, 6993, 834, 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, 332, 5411, 23954, 21680, 684, 6157, 332, 536, 3, 15355, 3162, 10866, 834, 25500, 49, 6157, 332, 357, 9191, 332, 5411, 10628, 651, 834, 4309, 3274, 332, 4416, 10628, 651, 834, 4309, 350, 4630, 6880, 272, 476, 332, 5411...
Show the name and population of the country that has the highest roller coaster.
SELECT T1.Name, T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID ORDER BY T2.Height DESC LIMIT 1
CREATE TABLE roller_coaster (Country_ID VARCHAR, Height VARCHAR); CREATE TABLE country (Name VARCHAR, population VARCHAR, Country_ID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10866, 834, 25500, 49, 41, 10628, 651, 834, 4309, 584, 4280, 28027, 6, 24231, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 684, 41, 23954, 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, 332, 5411, 23954, 6, 332, 5411, 9791, 7830, 21680, 684, 6157, 332, 536, 3, 15355, 3162, 10866, 834, 25500, 49, 6157, 332, 357, 9191, 332, 5411, 10628, 651, 834, 4309, 3274, 332, 4416, 10628, 651, 834, 4309, 4674, 1130...
Show the names of countries and the average speed of roller coasters from each country.
SELECT T1.Name, AVG(T2.Speed) FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name
CREATE TABLE roller_coaster (Speed INTEGER, Country_ID VARCHAR); CREATE TABLE country (Name VARCHAR, Country_ID VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 10866, 834, 25500, 49, 41, 28328, 3, 21342, 17966, 6, 6993, 834, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 684, 41, 23954, 584, 4280, 28027, 6, 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, 71, 17217, 599, 382, 4416, 28328, 61, 21680, 684, 6157, 332, 536, 3, 15355, 3162, 10866, 834, 25500, 49, 6157, 332, 357, 9191, 332, 5411, 10628, 651, 834, 4309, 3274, 332, 4416, 10628, 651, 834, ...
How many countries do not have an roller coaster longer than 3000?
SELECT COUNT(*) FROM country WHERE NOT country_id IN (SELECT country_id FROM roller_coaster WHERE LENGTH > 3000)
CREATE TABLE country (country_id VARCHAR, LENGTH INTEGER); CREATE TABLE roller_coaster (country_id VARCHAR, LENGTH INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 684, 41, 17529, 834, 23, 26, 584, 4280, 28027, 6, 301, 23182, 4611, 3, 21342, 17966, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 10866, 834, 25500, 49, 41, 17529, 834, 23,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 684, 549, 17444, 427, 4486, 684, 834, 23, 26, 3388, 41, 23143, 14196, 684, 834, 23, 26, 21680, 10866, 834, 25500, 49, 549, 17444, 427, 301, 23182, 4611, 2490, 220, 2313, 61, 1, -10...
What are the country names, area and population which has both roller coasters with speed higher
SELECT T1.name, T1.area, T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed > 60 INTERSECT SELECT T1.name, T1.area, T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed < 55
CREATE TABLE country (name VARCHAR, area VARCHAR, population VARCHAR, Country_ID VARCHAR); CREATE TABLE roller_coaster (Country_ID VARCHAR, speed INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 684, 41, 4350, 584, 4280, 28027, 6, 616, 584, 4280, 28027, 6, 2074, 584, 4280, 28027, 6, 6993, 834, 4309, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 108...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4350, 6, 332, 5411, 498, 6, 332, 5411, 9791, 7830, 21680, 684, 6157, 332, 536, 3, 15355, 3162, 10866, 834, 25500, 49, 6157, 332, 357, 9191, 332, 5411, 10628, 651, 834, 4309, 3274, 332, 4416, 10628, 651, 8...
How many different captain ranks are there?
SELECT COUNT(DISTINCT rank) FROM captain
CREATE TABLE captain (rank VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 14268, 41, 6254, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 315, 14268, 13799, 33, 132, 58, 1, 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, 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...
[ 3, 23143, 14196, 2847, 17161, 599, 15438, 25424, 6227, 11003, 61, 21680, 14268, 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,...
How many captains are in each rank?
SELECT COUNT(*), rank FROM captain GROUP BY rank
CREATE TABLE captain (rank VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 14268, 41, 6254, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 14268, 7, 33, 16, 284, 11003, 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, 1935, 201, 11003, 21680, 14268, 350, 4630, 6880, 272, 476, 11003, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
How many captains with younger than 50 are in each rank?
SELECT COUNT(*), rank FROM captain WHERE age < 50 GROUP BY rank
CREATE TABLE captain (rank VARCHAR, age INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 14268, 41, 6254, 584, 4280, 28027, 6, 1246, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 14268, 7, 28, 5868, 145, 943, 33, 16, 284, 11003, 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, 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, 201, 11003, 21680, 14268, 549, 17444, 427, 1246, 3, 2, 943, 350, 4630, 6880, 272, 476, 11003, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Sort all captain names by their ages from old to young.
SELECT name FROM captain ORDER BY age DESC
CREATE TABLE captain (name VARCHAR, age VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 14268, 41, 4350, 584, 4280, 28027, 6, 1246, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 18562, 66, 14268, 3056, 57, 70, 3, 2568, 45, 625, 12, 1021, 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, 564, 21680, 14268, 4674, 11300, 272, 476, 1246, 309, 25067, 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 the name, class and rank of all captains.
SELECT name, CLASS, rank FROM captain
CREATE TABLE captain (name VARCHAR, CLASS VARCHAR, rank VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 14268, 41, 4350, 584, 4280, 28027, 6, 3, 31598, 584, 4280, 28027, 6, 11003, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 564, 6, 853, 11, 11003, 13, 66, 14268, 7, 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, 564, 6, 3, 31598, 6, 11003, 21680, 14268, 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, ...
Which rank is the most common among captains?
SELECT rank FROM captain GROUP BY rank ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE captain (rank VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 14268, 41, 6254, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 4073, 11003, 19, 8, 167, 1017, 859, 14268, 7, 58, 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, 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, 11003, 21680, 14268, 350, 4630, 6880, 272, 476, 11003, 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, -100, -1...
Which classes have more than two captains?
SELECT CLASS FROM captain GROUP BY CLASS HAVING COUNT(*) > 2
CREATE TABLE captain (CLASS VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 14268, 41, 31598, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 4073, 2287, 43, 72, 145, 192, 14268, 7, 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, 3, 31598, 21680, 14268, 350, 4630, 6880, 272, 476, 3, 31598, 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, -100, -...
Find the name of captains whose rank are either Midshipman or Lieutenant.
SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant'
CREATE TABLE captain (name VARCHAR, rank VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 14268, 41, 4350, 584, 4280, 28027, 6, 11003, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 564, 13, 14268, 7, 3, 2544, 11003, 33, 893, 6650, 2009, 348, 42, 30943, 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, 564, 21680, 14268, 549, 17444, 427, 11003, 3274, 3, 31, 329, 23, 26, 2009, 348, 31, 4674, 11003, 3274, 3, 31, 19079, 76, 324, 288, 31, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...