question
string
answer
string
context
string
dialect
string
spider_hardness
string
extended_hardness
string
classification_status
string
syntax_status
string
ddl_syntax_status
string
schema_status
string
syntax_errors
list
ddl_syntax_errors
list
schema_errors
list
classification_errors
list
status_history
list
correction_status
string
component1
int64
component2
int64
others
int64
validation_source
dict
List all students' first names and last names who majored in 600.
SELECT Fname, Lname FROM Student WHERE Major = 600
CREATE TABLE Student (Fname VARCHAR(255), Lname VARCHAR(255), Major VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
1
{ "split": "train", "row_index": 1669 }
Which city does student Linda Smith live in?
SELECT city_code FROM Student WHERE Fname = 'Linda' AND Lname = 'Smith'
CREATE TABLE Student (city_code VARCHAR(255), Fname VARCHAR(255), Lname VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
1
{ "split": "train", "row_index": 1670 }
Advisor 1121 has how many students?
SELECT COUNT(*) FROM Student WHERE Advisor = 1121
CREATE TABLE Student (Advisor VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT, student_name VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 1671 }
Which Advisor has most of students? List advisor and the number of students.
SELECT Advisor, COUNT(*) FROM Student GROUP BY Advisor ORDER BY COUNT(Advisor) DESC LIMIT 1
CREATE TABLE Student (Advisor VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT, student_name VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
2
{ "split": "train", "row_index": 1672 }
Which major has least number of students? List the major and the number of students.
SELECT Major, COUNT(*) FROM Student GROUP BY Major ORDER BY COUNT(Major) LIMIT 1
CREATE TABLE Student (Major VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT, student_name VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
2
{ "split": "train", "row_index": 1673 }
Which major has between 2 and 30 number of students? List major and the number of students.
SELECT Major, COUNT(*) FROM Student GROUP BY Major HAVING COUNT(Major) BETWEEN 2 AND 30
CREATE TABLE Student (Major VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT, student_name VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
1
{ "split": "train", "row_index": 1674 }
Which student's age is older than 18 and is majoring in 600? List each student's first and last name.
SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major = 600
CREATE TABLE Student (Fname VARCHAR(255), Lname VARCHAR(255), Age VARCHAR(255), Major VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
2
{ "split": "train", "row_index": 1675 }
List all female students age is older than 18 who is not majoring in 600. List students' first name and last name.
SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major <> 600 AND Sex = 'F'
CREATE TABLE Student (Fname VARCHAR(255), Lname VARCHAR(255), Sex VARCHAR(255), Age VARCHAR(255), Major VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
2
{ "split": "train", "row_index": 1676 }
Find the ids of orders whose status is 'Success'.
SELECT actual_order_id FROM actual_orders WHERE order_status_code = 'Success'
CREATE TABLE actual_orders (actual_order_id VARCHAR(255), order_status_code VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 1683 }
Find the name and price of the product that has been ordered the greatest number of times.
SELECT t1.product_name, t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE products (product_name VARCHAR(255), product_price VARCHAR(255), product_id VARCHAR(255)); CREATE TABLE regular_order_products (product_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
1
{ "split": "train", "row_index": 1684 }
Find the number of customers in total.
SELECT COUNT(*) FROM customers
CREATE TABLE customers (Id VARCHAR(255), customer_name VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 1685 }
How many different payment methods are there?
SELECT COUNT(DISTINCT payment_method) FROM customers
CREATE TABLE customers (payment_method VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT, customer_name VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 1686 }
Show the details of all trucks in the order of their license number.
SELECT truck_details FROM trucks ORDER BY truck_licence_number
CREATE TABLE trucks (truck_details VARCHAR(255), truck_licence_number VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 1687 }
Find the name of the most expensive product.
SELECT product_name FROM products ORDER BY product_price DESC LIMIT 1
CREATE TABLE products (product_name VARCHAR(255), product_price VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 1688 }
List the names and emails of customers who payed by Visa card.
SELECT customer_email, customer_name FROM customers WHERE payment_method = 'Visa'
CREATE TABLE customers (customer_email VARCHAR(255), customer_name VARCHAR(255), payment_method VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
1
{ "split": "train", "row_index": 1690 }
Find the names and phone numbers of customers living in California state.
SELECT t1.customer_name, t1.customer_phone 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 = 'California'
CREATE TABLE customer_addresses (customer_id VARCHAR(255), address_id VARCHAR(255)); CREATE TABLE customers (customer_name VARCHAR(255), customer_phone VARCHAR(255), customer_id VARCHAR(255)); CREATE TABLE addresses (address_id VARCHAR(255), state_province_county VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
1
{ "split": "train", "row_index": 1691 }
Find the states which do not have any employee in their record.
SELECT state_province_county FROM addresses WHERE NOT address_id IN (SELECT employee_address_id FROM Employees)
CREATE TABLE Employees (state_province_county VARCHAR(255), address_id VARCHAR(255), employee_address_id VARCHAR(255)); CREATE TABLE addresses (state_province_county VARCHAR(255), address_id VARCHAR(255), employee_address_id VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
1
0
{ "split": "train", "row_index": 1692 }
List the names, phone numbers, and emails of all customers sorted by their dates of becoming customers.
SELECT customer_name, customer_phone, customer_email FROM Customers ORDER BY date_became_customer
CREATE TABLE Customers (customer_name VARCHAR(255), customer_phone VARCHAR(255), customer_email VARCHAR(255), date_became_customer VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
1
{ "split": "train", "row_index": 1693 }
Find the name of the first 5 customers.
SELECT customer_name FROM Customers ORDER BY date_became_customer LIMIT 5
CREATE TABLE Customers (customer_name VARCHAR(255), date_became_customer VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 1694 }
Find the payment method that is used most frequently.
SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Customers (payment_method VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
0
{ "split": "train", "row_index": 1695 }
List the names of all routes in alphabetic order.
SELECT route_name FROM Delivery_Routes ORDER BY route_name
CREATE TABLE Delivery_Routes (route_name VARCHAR(255), route_id VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 1696 }
Find the name of route that has the highest number of deliveries.
SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Delivery_Routes (route_name VARCHAR(255), route_id VARCHAR(255)); CREATE TABLE Delivery_Route_Locations (route_id VARCHAR(255), location_id VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
0
{ "split": "train", "row_index": 1697 }
List the state names and the number of customers living in each state.
SELECT t2.state_province_county, COUNT(*) FROM customer_addresses AS t1 JOIN addresses AS t2 ON t1.address_id = t2.address_id GROUP BY t2.state_province_county
CREATE TABLE customer_addresses (address_id VARCHAR(255), customer_id VARCHAR(255)); CREATE TABLE addresses (state_province_county VARCHAR(255), address_id VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 1698 }
How many authors are there?
SELECT COUNT(*) FROM authors
CREATE TABLE authors (Id VARCHAR(255), name VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 1699 }
How many institutions are there?
SELECT COUNT(*) FROM inst
CREATE TABLE inst (Id VARCHAR(255), name VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 1700 }
How many papers are published in total?
SELECT COUNT(*) FROM papers
CREATE TABLE papers (Id VARCHAR(255), title VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 1701 }
What are the titles of papers published by "Jeremy Gibbons"?
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Jeremy' AND t1.lname = 'Gibbons'
CREATE TABLE authorship (authid VARCHAR(255), paperid VARCHAR(255)); CREATE TABLE papers (title VARCHAR(255), paperid VARCHAR(255)); CREATE TABLE authors (authid VARCHAR(255), fname VARCHAR(255), lname VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
1
{ "split": "train", "row_index": 1702 }
Find all the papers published by "Aaron Turon".
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Aaron' AND t1.lname = 'Turon'
CREATE TABLE authorship (authid VARCHAR(255), paperid VARCHAR(255)); CREATE TABLE papers (title VARCHAR(255), paperid VARCHAR(255)); CREATE TABLE authors (authid VARCHAR(255), fname VARCHAR(255), lname VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
1
{ "split": "train", "row_index": 1703 }
How many papers have "Atsushi Ohori" published?
SELECT COUNT(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Atsushi' AND t1.lname = 'Ohori'
CREATE TABLE authorship (authid VARCHAR(255), paperid VARCHAR(255)); CREATE TABLE authors (authid VARCHAR(255), fname VARCHAR(255), lname VARCHAR(255)); CREATE TABLE papers (paperid VARCHAR(255), title VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
1
{ "split": "train", "row_index": 1704 }
What is the name of the institution that "Matthias Blume" belongs to?
SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Matthias' AND t1.lname = 'Blume'
CREATE TABLE authorship (authid VARCHAR(255), instid VARCHAR(255)); CREATE TABLE authors (authid VARCHAR(255), fname VARCHAR(255), lname VARCHAR(255)); CREATE TABLE inst (name VARCHAR(255), instid VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
1
{ "split": "train", "row_index": 1705 }
Which institution does "Katsuhiro Ueno" belong to?
SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = 'Katsuhiro' AND t1.lname = 'Ueno'
CREATE TABLE authorship (authid VARCHAR(255), instid VARCHAR(255)); CREATE TABLE authors (authid VARCHAR(255), fname VARCHAR(255), lname VARCHAR(255)); CREATE TABLE inst (name VARCHAR(255), instid VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
1
{ "split": "train", "row_index": 1706 }
Who belong to the institution "University of Oxford"? Show the first names and last names.
SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Oxford'
CREATE TABLE authorship (authid VARCHAR(255), instid VARCHAR(255)); CREATE TABLE authors (fname VARCHAR(255), lname VARCHAR(255), authid VARCHAR(255)); CREATE TABLE inst (instid VARCHAR(255), name VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
1
{ "split": "train", "row_index": 1707 }
Which authors belong to the institution "Google"? Show the first names and last names.
SELECT DISTINCT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google'
CREATE TABLE authorship (authid VARCHAR(255), instid VARCHAR(255)); CREATE TABLE authors (fname VARCHAR(255), lname VARCHAR(255), authid VARCHAR(255)); CREATE TABLE inst (instid VARCHAR(255), name VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
1
{ "split": "train", "row_index": 1708 }
What are the last names of the author of the paper titled "Binders Unbound"?
SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = 'Binders Unbound'
CREATE TABLE authorship (authid VARCHAR(255), paperid VARCHAR(255)); CREATE TABLE authors (lname VARCHAR(255), authid VARCHAR(255), fname VARCHAR(255)); CREATE TABLE papers (paperid VARCHAR(255), title VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
0
{ "split": "train", "row_index": 1709 }
Find the first and last name of the author(s) who wrote the paper "Nameless, Painless".
SELECT t1.fname, t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = 'Nameless , Painless'
CREATE TABLE authorship (authid VARCHAR(255), paperid VARCHAR(255)); CREATE TABLE papers (paperid VARCHAR(255), title VARCHAR(255)); CREATE TABLE authors (fname VARCHAR(255), lname VARCHAR(255), authid VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
1
{ "split": "train", "row_index": 1710 }
What are the papers published under the institution "Indiana University"?
SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Indiana University'
CREATE TABLE inst (instid VARCHAR(255), name VARCHAR(255)); CREATE TABLE authorship (paperid VARCHAR(255), instid VARCHAR(255)); CREATE TABLE papers (title VARCHAR(255), paperid VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
0
{ "split": "train", "row_index": 1711 }
Find all the papers published by the institution "Google".
SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Google'
CREATE TABLE inst (instid VARCHAR(255), name VARCHAR(255)); CREATE TABLE authorship (paperid VARCHAR(255), instid VARCHAR(255)); CREATE TABLE papers (title VARCHAR(255), paperid VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
0
{ "split": "train", "row_index": 1712 }
How many papers are published by the institution "Tokohu University"?
SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'Tokohu University'
CREATE TABLE inst (instid VARCHAR(255), name VARCHAR(255)); CREATE TABLE authorship (paperid VARCHAR(255), instid VARCHAR(255)); CREATE TABLE papers (title VARCHAR(255), paperid VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
0
{ "split": "train", "row_index": 1713 }
Find the number of papers published by the institution "University of Pennsylvania".
SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = 'University of Pennsylvania'
CREATE TABLE inst (instid VARCHAR(255), name VARCHAR(255)); CREATE TABLE authorship (paperid VARCHAR(255), instid VARCHAR(255)); CREATE TABLE papers (title VARCHAR(255), paperid VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
0
{ "split": "train", "row_index": 1714 }
Find the papers which have "Olin Shivers" as an author.
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Olin' AND t1.lname = 'Shivers'
CREATE TABLE authorship (authid VARCHAR(255), paperid VARCHAR(255)); CREATE TABLE papers (title VARCHAR(255), paperid VARCHAR(255)); CREATE TABLE authors (authid VARCHAR(255), fname VARCHAR(255), lname VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
1
{ "split": "train", "row_index": 1715 }
Which papers have "Stephanie Weirich" as an author?
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = 'Stephanie' AND t1.lname = 'Weirich'
CREATE TABLE authorship (authid VARCHAR(255), paperid VARCHAR(255)); CREATE TABLE papers (title VARCHAR(255), paperid VARCHAR(255)); CREATE TABLE authors (authid VARCHAR(255), fname VARCHAR(255), lname VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
1
{ "split": "train", "row_index": 1716 }
Which paper is published in an institution in "USA" and have "Turon" as its second author?
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'USA' AND t2.authorder = 2 AND t1.lname = 'Turon'
CREATE TABLE authorship (authid VARCHAR(255), paperid VARCHAR(255), instid VARCHAR(255), authorder VARCHAR(255)); CREATE TABLE authors (authid VARCHAR(255), lname VARCHAR(255), fname VARCHAR(255)); CREATE TABLE papers (title VARCHAR(255), paperid VARCHAR(255)); CREATE TABLE inst (instid VARCHAR(255), country VARCHAR(25...
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
1
{ "split": "train", "row_index": 1717 }
Find the titles of papers whose first author is affiliated with an institution in the country "Japan" and has last name "Ohori"?
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = 'Japan' AND t2.authorder = 1 AND t1.lname = 'Ohori'
CREATE TABLE authorship (authid VARCHAR(255), paperid VARCHAR(255), instid VARCHAR(255), authorder VARCHAR(255)); CREATE TABLE authors (authid VARCHAR(255), lname VARCHAR(255), fname VARCHAR(255)); CREATE TABLE papers (title VARCHAR(255), paperid VARCHAR(255)); CREATE TABLE inst (instid VARCHAR(255), country VARCHAR(25...
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
1
{ "split": "train", "row_index": 1718 }
What is the last name of the author that has published the most papers?
SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname, t1.lname ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE authorship (authid VARCHAR(255), paperid VARCHAR(255)); CREATE TABLE authors (lname VARCHAR(255), fname VARCHAR(255), authid VARCHAR(255)); CREATE TABLE papers (paperid VARCHAR(255), title VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
5
0
1
{ "split": "train", "row_index": 1719 }
Retrieve the country that has published the most papers.
SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE inst (country VARCHAR(255), instid VARCHAR(255)); CREATE TABLE authorship (instid VARCHAR(255), paperid VARCHAR(255)); CREATE TABLE papers (paperid VARCHAR(255), title VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
5
0
0
{ "split": "train", "row_index": 1720 }
Find the name of the organization that has published the largest number of papers.
SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE inst (name VARCHAR(255), instid VARCHAR(255)); CREATE TABLE authorship (instid VARCHAR(255), paperid VARCHAR(255)); CREATE TABLE papers (paperid VARCHAR(255), title VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
5
0
0
{ "split": "train", "row_index": 1721 }
Find the titles of the papers that contain the word "ML".
SELECT title FROM papers WHERE title LIKE '%ML%'
CREATE TABLE papers (title VARCHAR(255), paperid VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 1722 }
Which paper's title contains the word "Database"?
SELECT title FROM papers WHERE title LIKE '%Database%'
CREATE TABLE papers (title VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 1723 }
Find the first names of all the authors who have written a paper with title containing the word "Functional".
SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE '%Functional%'
CREATE TABLE authors (fname VARCHAR(255), authid VARCHAR(255)); CREATE TABLE papers (paperid VARCHAR(255), title VARCHAR(255)); CREATE TABLE authorship (authid VARCHAR(255), paperid VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
0
{ "split": "train", "row_index": 1724 }
What is the first name of the author with last name "Ueno"?
SELECT fname FROM authors WHERE lname = 'Ueno'
CREATE TABLE authors (fname VARCHAR(255), lname VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 1727 }
Find the last name of the author with first name "Amal".
SELECT lname FROM authors WHERE fname = 'Amal'
CREATE TABLE authors (lname VARCHAR(255), fname VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 1728 }
Find the first names of all the authors ordered in alphabetical order.
SELECT fname FROM authors ORDER BY fname
CREATE TABLE authors (fname VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 1729 }
Retrieve all the last names of authors in alphabetical order.
SELECT lname FROM authors ORDER BY lname
CREATE TABLE authors (lname VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 1730 }
Retrieve all the first and last names of authors in the alphabetical order of last names.
SELECT fname, lname FROM authors ORDER BY lname
CREATE TABLE authors (fname VARCHAR(255), lname VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
1
{ "split": "train", "row_index": 1731 }
How many different last names do the actors and actresses have?
SELECT COUNT(DISTINCT last_name) FROM actor
CREATE TABLE actor (last_name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 1732 }
What is the most popular first name of the actors?
SELECT first_name FROM actor GROUP BY first_name ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE actor (first_name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
0
{ "split": "train", "row_index": 1733 }
What is the most popular full name of the actors?
SELECT first_name, last_name FROM actor GROUP BY first_name, last_name ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE actor (first_name VARCHAR(255), last_name VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
2
{ "split": "train", "row_index": 1734 }
Which districts have at least two addresses?
SELECT district FROM address GROUP BY district HAVING COUNT(*) >= 2
CREATE TABLE address (district VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 1735 }
What is the phone number and postal code of the address 1031 Daugavpils Parkway?
SELECT phone, postal_code FROM address WHERE address = '1031 Daugavpils Parkway'
CREATE TABLE address (phone VARCHAR(255), postal_code VARCHAR(255), address VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
1
{ "split": "train", "row_index": 1736 }
Which city has the most addresses? List the city name, number of addresses, and city id.
SELECT T2.city, COUNT(*), T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE address (city_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE city (city VARCHAR(255), city_id VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
2
{ "split": "train", "row_index": 1737 }
How many addresses are in the district of California?
SELECT COUNT(*) FROM address WHERE district = 'California'
CREATE TABLE address (district VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 1738 }
How many cities are in Australia?
SELECT COUNT(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'
CREATE TABLE country (country_id VARCHAR(255), country VARCHAR(255)); CREATE TABLE city (country_id VARCHAR(255), city_id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 1740 }
Which countries have at least 3 cities?
SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id HAVING COUNT(*) >= 3
CREATE TABLE country (country VARCHAR(255), country_id VARCHAR(255)); CREATE TABLE city (country_id VARCHAR(255), name VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 1741 }
How many customers have an active value of 1?
SELECT COUNT(*) FROM customer WHERE active = '1'
CREATE TABLE customer (active VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 1743 }
Which film has the highest rental rate? And what is the rate?
SELECT title, rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1
CREATE TABLE film (title VARCHAR(255), rental_rate VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 1744 }
Which film has the most number of actors or actresses? List the film name, film id and description.
SELECT T2.title, T2.film_id, T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE film_actor (film_id VARCHAR(255), actor_id VARCHAR(255)); CREATE TABLE film (title VARCHAR(255), film_id VARCHAR(255), description VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
1
{ "split": "train", "row_index": 1745 }
Which film actor (actress) starred the most films? List his or her first name, last name and actor id.
SELECT T2.first_name, T2.last_name, T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE film_actor (actor_id VARCHAR(255)); CREATE TABLE actor (first_name VARCHAR(255), last_name VARCHAR(255), actor_id VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
1
{ "split": "train", "row_index": 1746 }
Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.
SELECT T2.first_name, T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING COUNT(*) > 30
CREATE TABLE film_actor (actor_id VARCHAR(255)); CREATE TABLE actor (first_name VARCHAR(255), last_name VARCHAR(255), actor_id VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 1747 }
Which store owns most items?
SELECT store_id FROM inventory GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE inventory (store_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
0
{ "split": "train", "row_index": 1748 }
What is the total amount of all payments?
SELECT SUM(amount) FROM payment
CREATE TABLE payment (amount INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 1749 }
What is the genre name of the film HUNGER ROOF?
SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF'
CREATE TABLE film_category (category_id VARCHAR(255), film_id VARCHAR(255)); CREATE TABLE film (film_id VARCHAR(255), title VARCHAR(255)); CREATE TABLE category (name VARCHAR(255), category_id VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
0
{ "split": "train", "row_index": 1751 }
How many films are there in each category? List the genre name, genre id and the count.
SELECT T2.name, T1.category_id, COUNT(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id
CREATE TABLE film_category (category_id VARCHAR(255), film_id VARCHAR(255)); CREATE TABLE category (name VARCHAR(255), category_id VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 1752 }
Which film has the most copies in the inventory? List both title and id.
SELECT T1.title, T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE film (title VARCHAR(255), film_id VARCHAR(255)); CREATE TABLE inventory (film_id VARCHAR(255), inventory_id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
1
{ "split": "train", "row_index": 1753 }
What is the film title and inventory id of the item in the inventory which was rented most frequently?
SELECT T1.title, T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T2.inventory_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE film (title VARCHAR(255), film_id VARCHAR(255)); CREATE TABLE inventory (inventory_id VARCHAR(255), film_id VARCHAR(255)); CREATE TABLE rental (inventory_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
5
0
1
{ "split": "train", "row_index": 1754 }
How many languages are in these films?
SELECT COUNT(DISTINCT language_id) FROM film
CREATE TABLE film (language_id VARCHAR(255), film_id VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 1755 }
What are all the movies rated as R? List the titles.
SELECT title FROM film WHERE rating = 'R'
CREATE TABLE film (title VARCHAR(255), rating VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 1756 }
Which staff handled least number of payments? List the full name and the id.
SELECT T1.first_name, T1.last_name, T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY COUNT(*) LIMIT 1
CREATE TABLE payment (staff_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE staff (first_name VARCHAR(255), last_name VARCHAR(255), staff_id VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
4
0
1
{ "split": "train", "row_index": 1758 }
Which language does the film AIRPORT POLLOCK use? List the language name.
SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'
CREATE TABLE film (language_id VARCHAR(255), title VARCHAR(255), film_id VARCHAR(255)); CREATE TABLE LANGUAGE (name VARCHAR(255), language_id VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 1759 }
How many stores are there?
SELECT COUNT(*) FROM store
CREATE TABLE store (Id VARCHAR(255), name VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 1760 }
How many kinds of different ratings are listed?
SELECT COUNT(DISTINCT rating) FROM film
CREATE TABLE film (rating VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 1761 }
Which movies have 'Deleted Scenes' as a substring in the special feature?
SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'
CREATE TABLE film (title VARCHAR(255), special_features VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 1762 }
How many items in inventory does store 1 have?
SELECT COUNT(*) FROM inventory WHERE store_id = 1
CREATE TABLE inventory (store_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 1763 }
When did the first payment happen?
SELECT payment_date FROM payment ORDER BY payment_date LIMIT 1
CREATE TABLE payment (payment_date VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 1764 }
Where does the customer with the first name Linda live? And what is her email?
SELECT T2.address, T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA'
CREATE TABLE customer (email VARCHAR(255), address_id VARCHAR(255), first_name VARCHAR(255)); CREATE TABLE address (address VARCHAR(255), address_id VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
1
{ "split": "train", "row_index": 1765 }
Find all the films longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles.
SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200
CREATE TABLE film (title VARCHAR(255), replacement_cost INTEGER, LENGTH VARCHAR(255), rating VARCHAR(255))
generic
extra
extra
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
1
1
{ "split": "train", "row_index": 1766 }
What is the first name and the last name of the customer who made the earliest rental?
SELECT T1.first_name, T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date LIMIT 1
CREATE TABLE customer (first_name VARCHAR(255), last_name VARCHAR(255), customer_id VARCHAR(255)); CREATE TABLE rental (customer_id VARCHAR(255), rental_date VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
1
{ "split": "train", "row_index": 1767 }
What is the full name of the staff member who has rented a film to a customer with the first name April and the last name Burns?
SELECT DISTINCT T1.first_name, T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS'
CREATE TABLE customer (customer_id VARCHAR(255), first_name VARCHAR(255), last_name VARCHAR(255)); CREATE TABLE rental (staff_id VARCHAR(255), customer_id VARCHAR(255)); CREATE TABLE staff (first_name VARCHAR(255), last_name VARCHAR(255), staff_id VARCHAR(255))
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
2
{ "split": "train", "row_index": 1768 }
Which store has most the customers?
SELECT store_id FROM customer GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE customer (store_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
0
{ "split": "train", "row_index": 1769 }
What is the largest payment amount?
SELECT amount FROM payment ORDER BY amount DESC LIMIT 1
CREATE TABLE payment (amount VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 1770 }
Where does the staff member with the first name Elsa live?
SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa'
CREATE TABLE staff (address_id VARCHAR(255), first_name VARCHAR(255)); CREATE TABLE address (address VARCHAR(255), address_id VARCHAR(255))
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
2
0
0
{ "split": "train", "row_index": 1771 }
What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'?
SELECT first_name FROM customer WHERE NOT customer_id IN (SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01')
CREATE TABLE customer (first_name VARCHAR(255), customer_id VARCHAR(255), rental_date INTEGER); CREATE TABLE rental (first_name VARCHAR(255), customer_id VARCHAR(255), rental_date INTEGER)
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
1
0
{ "split": "train", "row_index": 1772 }
How many bank branches are there?
SELECT COUNT(*) FROM bank
CREATE TABLE bank (Id VARCHAR(255), name VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 1773 }
How many customers are there?
SELECT SUM(no_of_customers) FROM bank
CREATE TABLE bank (no_of_customers INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 1774 }
Find the number of customers in the banks at New York City.
SELECT SUM(no_of_customers) FROM bank WHERE city = 'New York City'
CREATE TABLE bank (no_of_customers INTEGER, city VARCHAR(255))
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 1775 }
Find the average number of customers in all banks of Utah state.
SELECT AVG(no_of_customers) FROM bank WHERE state = 'Utah'
CREATE TABLE bank (no_of_customers INTEGER, state VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 1776 }
Find the average number of customers cross all banks.
SELECT AVG(no_of_customers) FROM bank
CREATE TABLE bank (no_of_customers INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
0
0
0
{ "split": "train", "row_index": 1777 }
Find the city and state of the bank branch named morningside.
SELECT city, state FROM bank WHERE bname = 'morningside'
CREATE TABLE bank (city VARCHAR(255), state VARCHAR(255), bname VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
medium
medium
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
1
{ "split": "train", "row_index": 1778 }
Find the branch names of banks in the New York state.
SELECT bname FROM bank WHERE state = 'New York'
CREATE TABLE bank (bname VARCHAR(255), state VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 1779 }
List the name of all customers sorted by their account balance in ascending order.
SELECT cust_name FROM customer ORDER BY acc_bal
CREATE TABLE customer (cust_name VARCHAR(255), acc_bal VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
easy
easy
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
1
0
0
{ "split": "train", "row_index": 1780 }
List the name of all different customers who have some loan sorted by their total loan amount.
SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY SUM(T2.amount)
CREATE TABLE loan (cust_id VARCHAR(255), amount INTEGER, id INTEGER PRIMARY KEY AUTO_INCREMENT); CREATE TABLE customer (cust_name VARCHAR(255), cust_id VARCHAR(255), id INTEGER PRIMARY KEY AUTO_INCREMENT)
generic
hard
hard
classified
valid
valid
valid
[]
[]
[]
[]
[ "validated", "extended", "classified" ]
null
3
0
0
{ "split": "train", "row_index": 1781 }