id int64 0 9.43k | db_id stringclasses 69
values | schema stringclasses 69
values | question stringlengths 24 325 | output stringlengths 23 804 | evidence stringlengths 0 673 | filtered_schema listlengths 0 16 |
|---|---|---|---|---|---|---|
5,900 | airline | CREATE TABLE "Air Carriers"
(
Code INTEGER
primary key,
Description TEXT
);
CREATE TABLE Airports
(
Code TEXT
primary key,
Description TEXT
);
CREATE TABLE Airlines
(
FL_DATE TEXT,
OP_CARRIER_AIRLINE_ID INTEGER,
TAIL_NUM TEXT... | What are the destinations of the flights with air carrier description "Southeast Alaska Airlines: WEB"? | SELECT T2.DEST FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Southeast Alaska Airlines: WEB' | destinations refers to DEST; Southeast Alaska Airlines: WEB refers to Description = 'Southeast Alaska Airlines: WEB'; | [
"Air Carriers.Code",
"Air Carriers.Description",
"Airlines.DEST",
"Airlines.OP_CARRIER_AIRLINE_ID"
] |
5,901 | airline | CREATE TABLE "Air Carriers"
(
Code INTEGER
primary key,
Description TEXT
);
CREATE TABLE Airports
(
Code TEXT
primary key,
Description TEXT
);
CREATE TABLE Airlines
(
FL_DATE TEXT,
OP_CARRIER_AIRLINE_ID INTEGER,
TAIL_NUM TEXT... | From August 10 to August 20, 2018, how many cancelled flights of air carrier named Spirit Air Lines: NK are there? | SELECT COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Spirit Air Lines: NK' AND T2.CANCELLED = 0 AND T2.FL_DATE BETWEEN '2018/8/10' AND '2018/8/20' | From August 10 to August 20, 2018 refers to FL_DATE BETWEEN '2018/8/10' AND '2018/8/20'; cancelled flights refers to CANCELLED = 1; Trans Southern Airways: 'Spirit Air Lines: NK' refers to Description = 'Spirit Air Lines: NK'; | [
"Air Carriers.Code",
"Air Carriers.Description",
"Airlines.CANCELLED",
"Airlines.FL_DATE",
"Airlines.OP_CARRIER_AIRLINE_ID"
] |
5,902 | airline | CREATE TABLE "Air Carriers"
(
Code INTEGER
primary key,
Description TEXT
);
CREATE TABLE Airports
(
Code TEXT
primary key,
Description TEXT
);
CREATE TABLE Airlines
(
FL_DATE TEXT,
OP_CARRIER_AIRLINE_ID INTEGER,
TAIL_NUM TEXT... | What is the total number of flights that flew on August 2, 2018 with air carrier described as Horizon Air? | SELECT COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description LIKE '%Horizon Air%' AND T2.FL_DATE = '2018/8/2' | on August 2, 2018 refers to FL_DATE = '2018/8/2'; Horizon Air refers to Description which includs 'Horizon Air'; | [
"Air Carriers.Code",
"Air Carriers.Description",
"Airlines.FL_DATE",
"Airlines.OP_CARRIER_AIRLINE_ID"
] |
5,903 | airline | CREATE TABLE "Air Carriers"
(
Code INTEGER
primary key,
Description TEXT
);
CREATE TABLE Airports
(
Code TEXT
primary key,
Description TEXT
);
CREATE TABLE Airlines
(
FL_DATE TEXT,
OP_CARRIER_AIRLINE_ID INTEGER,
TAIL_NUM TEXT... | What is the tail number of the flight with air carrier named Iscargo Hf: ICQ and arrival time of 1000 and below? | SELECT T2.TAIL_NUM FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.ARR_TIME <= 1000 AND T1.Description = 'Iscargo Hf: ICQ' | tail number refers to TAIL_NUM; Iscargo Hf: ICQ refers to Description = 'Iscargo Hf: ICQ'; arrival time of 1000 and below refers to ARR_TIME < = 1000; | [
"Air Carriers.Code",
"Air Carriers.Description",
"Airlines.ARR_TIME",
"Airlines.OP_CARRIER_AIRLINE_ID",
"Airlines.TAIL_NUM"
] |
5,904 | airline | CREATE TABLE "Air Carriers"
(
Code INTEGER
primary key,
Description TEXT
);
CREATE TABLE Airports
(
Code TEXT
primary key,
Description TEXT
);
CREATE TABLE Airlines
(
FL_DATE TEXT,
OP_CARRIER_AIRLINE_ID INTEGER,
TAIL_NUM TEXT... | List the flight date of flights with air carrier described as Profit Airlines Inc.: XBH which have an actual elapsed time below 100. | SELECT T2.FL_DATE FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.ACTUAL_ELAPSED_TIME < 100 AND T1.Description = 'Profit Airlines Inc.: XBH' | flight date refers to FL_DATE; Profit Airlines Inc.: XBH refers to Description = 'Profit Airlines Inc.: XBH'; actual elapsed time below 100 refers to ACTUAL_ELAPSED_TIME < 100; | [
"Air Carriers.Code",
"Air Carriers.Description",
"Airlines.ACTUAL_ELAPSED_TIME",
"Airlines.FL_DATE",
"Airlines.OP_CARRIER_AIRLINE_ID"
] |
5,905 | airline | CREATE TABLE "Air Carriers"
(
Code INTEGER
primary key,
Description TEXT
);
CREATE TABLE Airports
(
Code TEXT
primary key,
Description TEXT
);
CREATE TABLE Airlines
(
FL_DATE TEXT,
OP_CARRIER_AIRLINE_ID INTEGER,
TAIL_NUM TEXT... | Among the flights with air carrier named Republic Airline, how many of the flights have departure delay of 30 minutes and above? | SELECT COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description LIKE '%Republic Airline%' AND T2.DEP_DELAY > 30 | Republic Airline refers to Description which contains 'Republic Airline'; departure delay of 30 minutes and above refers to DEP_DELAY > 30; | [
"Air Carriers.Code",
"Air Carriers.Description",
"Airlines.DEP_DELAY",
"Airlines.OP_CARRIER_AIRLINE_ID"
] |
5,906 | airline | CREATE TABLE "Air Carriers"
(
Code INTEGER
primary key,
Description TEXT
);
CREATE TABLE Airports
(
Code TEXT
primary key,
Description TEXT
);
CREATE TABLE Airlines
(
FL_DATE TEXT,
OP_CARRIER_AIRLINE_ID INTEGER,
TAIL_NUM TEXT... | What are the air carriers of the flights that flew on August 25, 2018 that have departure delay of -5? | SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.FL_DATE = '2018/8/25' GROUP BY T1.Description | on August 25, 2018 refers to FL_DATE = '2018/8/25'; departure delay of -5 refers to DEP_DELAY = -5; | [
"Air Carriers.Code",
"Air Carriers.Description",
"Airlines.FL_DATE",
"Airlines.OP_CARRIER_AIRLINE_ID"
] |
5,907 | airline | CREATE TABLE "Air Carriers"
(
Code INTEGER
primary key,
Description TEXT
);
CREATE TABLE Airports
(
Code TEXT
primary key,
Description TEXT
);
CREATE TABLE Airlines
(
FL_DATE TEXT,
OP_CARRIER_AIRLINE_ID INTEGER,
TAIL_NUM TEXT... | Provide the air carrier description of the flight with a tail number N922US from Phoenix. | SELECT T2.Description FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T2.Code = T1.OP_CARRIER_AIRLINE_ID WHERE T1.TAIL_NUM = 'N922US' AND T1.ORIGIN = 'PHX' GROUP BY T2.Description | tail number refers to TAIL_NUM; TAIL_NUM = 'N922US'; from Phoenix refers to ORIGIN = 'PHX'; | [
"Air Carriers.Code",
"Air Carriers.Description",
"Airlines.OP_CARRIER_AIRLINE_ID",
"Airlines.ORIGIN",
"Airlines.TAIL_NUM"
] |
5,908 | airline | CREATE TABLE "Air Carriers"
(
Code INTEGER
primary key,
Description TEXT
);
CREATE TABLE Airports
(
Code TEXT
primary key,
Description TEXT
);
CREATE TABLE Airlines
(
FL_DATE TEXT,
OP_CARRIER_AIRLINE_ID INTEGER,
TAIL_NUM TEXT... | Give the air carrier description of the flights that have an earlier arrival and departure. | SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.ARR_DELAY < 0 AND T2.DEP_DELAY < 0 GROUP BY T1.Description | earlier arrival and departure refers to ARR_DELAY < 0 AND DEP_DELAY < 0; | [
"Air Carriers.Code",
"Air Carriers.Description",
"Airlines.ARR_DELAY",
"Airlines.DEP_DELAY",
"Airlines.OP_CARRIER_AIRLINE_ID"
] |
5,909 | airline | CREATE TABLE "Air Carriers"
(
Code INTEGER
primary key,
Description TEXT
);
CREATE TABLE Airports
(
Code TEXT
primary key,
Description TEXT
);
CREATE TABLE Airlines
(
FL_DATE TEXT,
OP_CARRIER_AIRLINE_ID INTEGER,
TAIL_NUM TEXT... | Among the flights with air carrier "Southwest Airlines Co.: WN", provide the tail number of flights with an actual elapsed time lower than the 80% of the average actual elapsed time of listed flights. | SELECT T2.TAIL_NUM FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Southwest Airlines Co.: WN' AND T2.ACTUAL_ELAPSED_TIME < ( SELECT AVG(ACTUAL_ELAPSED_TIME) * 0.8 FROM Airlines ) | Southwest Airlines Co.: WN refers to Description = 'Southwest Airlines Co.: WN'; tail number refers to TAIL_NUM; actual elapsed time lower than the 80% of the average actual elapsed time refers to ACTUAL_ELAPSED_TIME < (MULTIPLY AVG(ACTUAL_ELAPSED_TIME), 0.8); | [
"Air Carriers.Code",
"Air Carriers.Description",
"Airlines.ACTUAL_ELAPSED_TIME",
"Airlines.OP_CARRIER_AIRLINE_ID",
"Airlines.TAIL_NUM"
] |
5,910 | airline | CREATE TABLE "Air Carriers"
(
Code INTEGER
primary key,
Description TEXT
);
CREATE TABLE Airports
(
Code TEXT
primary key,
Description TEXT
);
CREATE TABLE Airlines
(
FL_DATE TEXT,
OP_CARRIER_AIRLINE_ID INTEGER,
TAIL_NUM TEXT... | List the air carrier's description with arrival time lower than the 40% of the average arrival time of flights that flew to Phoenix. | SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.DEST = 'PHX' AND T2.ARR_TIME < ( SELECT AVG(ARR_TIME) * 0.4 FROM Airlines ) GROUP BY T1.Description | arrival time lower than the 40% of the average arrival time refers to ARR_TIME < MULTIPLY(AVG(ARR_TIME), 0.4); flew to Phoenix refers to DEST = 'PHX'; | [
"Air Carriers.Code",
"Air Carriers.Description",
"Airlines.ARR_TIME",
"Airlines.DEST",
"Airlines.OP_CARRIER_AIRLINE_ID"
] |
5,911 | airline | CREATE TABLE "Air Carriers"
(
Code INTEGER
primary key,
Description TEXT
);
CREATE TABLE Airports
(
Code TEXT
primary key,
Description TEXT
);
CREATE TABLE Airlines
(
FL_DATE TEXT,
OP_CARRIER_AIRLINE_ID INTEGER,
TAIL_NUM TEXT... | Among the flights of the air carrier described as American Airlines, what is the percentage of the flights with earlier departure? | SELECT CAST(SUM(CASE WHEN T2.DEP_DELAY < 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description LIKE '%American Airlines%' | American Airlines can be found in Description which contains 'American Airlines'; percentage = MULTIPLY(DIVIDE(SUM(DEP_DELAY < 0), COUNT(DEP_DELAY)), 1.0); earlier departure refers to DEP_DELAY < 0; | [
"Air Carriers.Code",
"Air Carriers.Description",
"Airlines.DEP_DELAY",
"Airlines.OP_CARRIER_AIRLINE_ID"
] |
5,912 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Among the books published by publisher ID 1929, how many of them have over 500 pages? | SELECT COUNT(*) FROM book WHERE publisher_id = 1929 AND num_pages > 500 | books have over 500 pages refers to num_pages > 500 | [
"book.num_pages",
"book.publisher_id"
] |
5,913 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the publication date of the book with the most pages? | SELECT publication_date FROM book ORDER BY num_pages DESC LIMIT 1 | book with the most pages refers to Max(num_pages) | [
"book.num_pages",
"book.publication_date"
] |
5,914 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the name of the publisher of the book "The Illuminati"? | SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T1.title = 'The Illuminati' | "The Illuminati" is the title of the book; name of publisher refers to publisher_name | [
"book.publisher_id",
"book.title",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,915 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many books were published by publisher "Thomas Nelson"? | SELECT COUNT(*) FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Thomas Nelson' | "Thomas Nelson" is the publisher_name | [
"book.publisher_id",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,916 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the name of the publisher that has published the most number of books? | SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id GROUP BY T2.publisher_name ORDER BY COUNT(T1.book_id) DESC LIMIT 1 | name of publisher refers to publisher_name; publisher published the most number of books refers to Max(Count(book_id)) | [
"book.book_id",
"book.publisher_id",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,917 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Please give the title of the oldest book published by publisher "Thomas Nelson". | SELECT T1.title FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Thomas Nelson' ORDER BY T1.publication_date ASC LIMIT 1 | "Thomas Nelson" is the publisher_name; oldest book refers to Min(publication_date) | [
"book.publication_date",
"book.publisher_id",
"book.title",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,918 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Among the books published by publisher "Thomas Nelson", how many of them have over 300 pages? | SELECT COUNT(*) FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Thomas Nelson' AND T1.num_pages > 300 | "Thomas Nelson" is the publisher_name; books with over 300 pages refers to num_pages > 300 | [
"book.num_pages",
"book.publisher_id",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,919 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the name of the publisher of the book with the most pages? | SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id ORDER BY T1.num_pages DESC LIMIT 1 | book with the most pages refers to Max(num_pages); name of publisher refers to publisher_name | [
"book.num_pages",
"book.publisher_id",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,920 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many books are in English? | SELECT COUNT(*) FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T2.language_name = 'English' | books in English refers to language_name = 'English' | [
"book.language_id",
"book_language.language_id",
"book_language.language_name"
] |
5,921 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Please list the titles of all the books in British English. | SELECT T1.title FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T2.language_name = 'British English' | "British English" is the language_name of the book | [
"book.language_id",
"book.title",
"book_language.language_id",
"book_language.language_name"
] |
5,922 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the cheapest order price of the book "The Little House"? | SELECT MIN(T2.price) FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T1.title = 'The Little House' | "The Little House" is the title of book; cheapest order price refers to Min(price) | [
"book.book_id",
"book.title",
"order_line.book_id",
"order_line.price"
] |
5,923 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Please list the titles of all the books that Lucas Wyldbore has ordered. | SELECT T1.title FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T4.first_name = 'Lucas' AND T4.last_name = 'Wyldbore' | [
"book.book_id",
"book.title",
"cust_order.customer_id",
"cust_order.order_id",
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"order_line.book_id",
"order_line.order_id"
] | |
5,924 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Among the books ordered by Lucas Wyldbore, how many of them are over 300 pages? | SELECT COUNT(*) FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T4.first_name = 'Lucas' AND T4.last_name = 'Wyldbore' AND T1.num_pages > 300 | books have over 300 pages refers to num_pages > 300 | [
"book.book_id",
"book.num_pages",
"cust_order.customer_id",
"cust_order.order_id",
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"order_line.book_id",
"order_line.order_id"
] |
5,925 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the total price of all the books ordered by Lucas Wyldbore? | SELECT SUM(T1.price) FROM order_line AS T1 INNER JOIN cust_order AS T2 ON T2.order_id = T1.order_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id WHERE T3.first_name = 'Lucas' AND T3.last_name = 'Wyldbore' | total price refers to Sum(price) | [
"cust_order.customer_id",
"cust_order.order_id",
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"order_line.order_id",
"order_line.price"
] |
5,926 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How much money on average does Lucas Wyldbore spend on book orders? | SELECT SUM(T1.price) / COUNT(*) FROM order_line AS T1 INNER JOIN cust_order AS T2 ON T2.order_id = T1.order_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id WHERE T3.first_name = 'Lucas' AND T3.last_name = 'Wyldbore' | average spend on book orders = AVG (price) | [
"cust_order.customer_id",
"cust_order.order_id",
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"order_line.order_id",
"order_line.price"
] |
5,927 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Among the books ordered by Lucas Wyldbore, what is the percentage of those books over $13? | SELECT CAST(SUM(CASE WHEN T1.price > 13 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM order_line AS T1 INNER JOIN cust_order AS T2 ON T2.order_id = T1.order_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id WHERE T3.first_name = 'Lucas' AND T3.last_name = 'Wyldbore' | books over $13 refers to price > 13; percentage = Divide (Sum (order_id where price > 13), Count (order_id)) * 100 | [
"cust_order.customer_id",
"cust_order.order_id",
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"order_line.order_id",
"order_line.price"
] |
5,928 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Which city does the address id 547 belong to? | SELECT city FROM address WHERE address_id = 547 | [
"address.address_id",
"address.city"
] | |
5,929 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many orders has Cordy Dumbarton made? | SELECT COUNT(*) FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'Cordy' AND T1.last_name = 'Dumbarton' | [
"cust_order.customer_id",
"customer.customer_id",
"customer.first_name",
"customer.last_name"
] | |
5,930 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | List the title of the earliest published Japanese book. | SELECT T1.title FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T2.language_name = 'Japanese' ORDER BY T1.publication_date ASC LIMIT 1 | Japanese book refers to language_name = 'Japanese'; earliest published refers to Min(publication_date) | [
"book.language_id",
"book.publication_date",
"book.title",
"book_language.language_id",
"book_language.language_name"
] |
5,931 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | For the publisher which published the most books, show its name. | SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id GROUP BY T2.publisher_name ORDER BY COUNT(T2.publisher_id) DESC LIMIT 1 | published the most books refers to Max(Count(book_id)); publisher refers to publisher_name | [
"book.publisher_id",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,932 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many books were published by Kensington? | SELECT COUNT(T1.book_id) FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Kensington' | "Kensington" is the publisher_name; | [
"book.book_id",
"book.publisher_id",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,933 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Which language was book id 1405 written in? | SELECT T2.language_name FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T1.book_id = 1405 | language written in refers to language_name; | [
"book.book_id",
"book.language_id",
"book_language.language_id",
"book_language.language_name"
] |
5,934 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Which customer has made the most orders? Show his/her full name. | SELECT T1.first_name, T1.last_name FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.first_name, T1.last_name ORDER BY COUNT(*) DESC LIMIT 1 | most order refers to Max(Count(order_id)); customer refers to first_name, last_name | [
"cust_order.customer_id",
"customer.customer_id",
"customer.first_name",
"customer.last_name"
] |
5,935 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Name the book title of the bestseller. | SELECT T1.title FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id GROUP BY T1.title ORDER BY COUNT(T1.title) DESC LIMIT 1 | book title refers to title; best sellers refers to title where Max(count(order_id)) | [
"book.book_id",
"book.title",
"order_line.book_id"
] |
5,936 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many books did David Foster Wallace write? | SELECT COUNT(T1.title) FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'David Foster Wallace' | "David Foster Wallace" is the author_name; | [
"author.author_id",
"author.author_name",
"book.book_id",
"book.title",
"book_author.author_id",
"book_author.book_id"
] |
5,937 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many orders does the book "O Xará" have? | SELECT COUNT(*) FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T1.title = 'O Xará' | "O Xará" is the title of the book | [
"book.book_id",
"book.title",
"order_line.book_id"
] |
5,938 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Which country does Malina Johnson live in? | SELECT T4.country_name FROM customer AS T1 INNER JOIN customer_address AS T2 ON T1.customer_id = T2.customer_id INNER JOIN address AS T3 ON T3.address_id = T2.address_id INNER JOIN country AS T4 ON T4.country_id = T3.country_id WHERE T1.first_name = 'Malina' AND T1.last_name = 'Johnson' AND T2.status_id = 2 | country refers to country_name | [
"address.address_id",
"address.country_id",
"country.country_id",
"country.country_name",
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"customer_address.address_id",
"customer_address.customer_id",
"customer_address.status_id"
] |
5,939 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Give the number of Ukrainian addresses in the database. | SELECT COUNT(*) FROM country AS T1 INNER JOIN address AS T2 ON T1.country_id = T2.country_id WHERE T1.country_name = 'Ukraine' | Ukrainian address refers to country_name = 'Ukraine' | [
"address.country_id",
"country.country_id",
"country.country_name"
] |
5,940 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Which country does Žirovnica city belong to? | SELECT T1.country_name FROM country AS T1 INNER JOIN address AS T2 ON T1.country_id = T2.country_id WHERE T2.city = 'Žirovnica' | "Žirovnica" is the city; country refers to country_name | [
"address.city",
"address.country_id",
"country.country_id",
"country.country_name"
] |
5,941 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Calculate the percentage of the International shipping orders on 2022/11/10. | SELECT CAST(SUM(CASE WHEN T1.method_name = 'International' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM shipping_method AS T1 INNER JOIN cust_order AS T2 ON T1.method_id = T2.shipping_method_id WHERE T2.order_date LIKE '2022-11-10%' | International shipping order refers to method_name = 'International'; orders on 2022/11/10 refers to order_date LIKE '2022-11-10%'; percentage = Divide (Sum(order_id where method_name = 'International'), Count(order_id)) * 100 | [
"cust_order.order_date",
"cust_order.shipping_method_id",
"shipping_method.method_id",
"shipping_method.method_name"
] |
5,942 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the average number of pages of David Coward's books? | SELECT AVG(T1.num_pages) FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'David Coward' | number of pages refers to num_pages; average = Divide (Sum(num_pages), Count(book_id)) | [
"author.author_id",
"author.author_name",
"book.book_id",
"book.num_pages",
"book_author.author_id",
"book_author.book_id"
] |
5,943 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the cost of the slowest and least expensive shipping method? | SELECT method_name FROM shipping_method ORDER BY cost ASC LIMIT 1 | slowest and least expesive method refers to shipping_method = 'Standard' | [
"shipping_method.cost",
"shipping_method.method_name"
] |
5,944 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the title of the first book that was published in 1900? | SELECT title FROM book WHERE STRFTIME('%Y', publication_date) = '1900' ORDER BY publication_date LIMIT 1 | published in 1900 refers to publication_date LIKE '1900%'; first book refers to Min(publication_date) | [
"book.publication_date",
"book.title"
] |
5,945 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the full name of the customer who owns the "aalleburtonkc@yellowbook.com" e-mail address? | SELECT first_name, last_name FROM customer WHERE email = 'aalleburtonkc@yellowbook.com' | "aalleburtonkc@yellowbook.com" is the email of customer; full name refers to first_name, last_name | [
"customer.email",
"customer.first_name",
"customer.last_name"
] |
5,946 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many orders in 2022 have Iran as their destinations? | SELECT COUNT(*) FROM country AS T1 INNER JOIN address AS T2 ON T1.country_id = T2.country_id INNER JOIN cust_order AS T3 ON T3.dest_address_id = T2.address_id WHERE T1.country_name = 'Iran' AND STRFTIME('%Y', T3.order_date) = '2022' | Iran as their destination refers to country_name = 'Iran'; orders in 2022 refers to order_date LIKE '2022%' | [
"address.address_id",
"address.country_id",
"country.country_id",
"country.country_name",
"cust_order.dest_address_id",
"cust_order.order_date"
] |
5,947 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Among Daisey Lamball's orders, how many were shipped via International shipping? | SELECT COUNT(*) FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id INNER JOIN shipping_method AS T3 ON T3.method_id = T2.shipping_method_id WHERE T1.first_name = 'Daisey' AND T1.last_name = 'Lamball' AND T3.method_name = 'International' | via international shipping refers to method_name = 'International' | [
"cust_order.customer_id",
"cust_order.shipping_method_id",
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"shipping_method.method_id",
"shipping_method.method_name"
] |
5,948 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the full name of the customer who ordered the most books of all time? | SELECT T1.first_name, T1.last_name FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.first_name, T1.last_name ORDER BY COUNT(*) DESC LIMIT 1 | customer who ordered the most book refers to customer_id where Max(count(order_id)); full name refers to first_name, last_name | [
"cust_order.customer_id",
"customer.customer_id",
"customer.first_name",
"customer.last_name"
] |
5,949 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many orders did Antonia Poltun return? | SELECT COUNT(*) FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T1.status_value = 'Returned' AND T4.first_name = 'Antonia' AND T4.last_name = 'Poltun' | order returned refers to status_value = 'Returned' | [
"cust_order.customer_id",
"cust_order.order_id",
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"order_history.order_id",
"order_history.status_id",
"order_status.status_id",
"order_status.status_value"
] |
5,950 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Which shipping method is preferred by customers the most? | SELECT T2.method_name FROM cust_order AS T1 INNER JOIN shipping_method AS T2 ON T1.shipping_method_id = T2.method_id GROUP BY T2.method_name ORDER BY COUNT(T2.method_id) DESC LIMIT 1 | shipping method preferred the most by customers refers to method_id where Max(Count(method_id)); which shipping method refers to method_name | [
"cust_order.shipping_method_id",
"shipping_method.method_id",
"shipping_method.method_name"
] |
5,951 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many orders were delivered in 2021? | SELECT COUNT(*) FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE T1.status_value = 'Delivered' AND STRFTIME('%Y', T2.status_date) = '2021' | delivered refers to status_value = 'Delivered'; in 2021 refers to status_date LIKE '2021%' | [
"order_history.status_date",
"order_history.status_id",
"order_status.status_id",
"order_status.status_value"
] |
5,952 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the name of the first book written by J.K Rowling? | SELECT T1.title FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'J.K. Rowling' ORDER BY T1.publication_date ASC LIMIT 1 | "J.K Rowling" is the author_name; first published book refers to book_id where Min(publication_date); name of the book refers to title | [
"author.author_id",
"author.author_name",
"book.book_id",
"book.publication_date",
"book.title",
"book_author.author_id",
"book_author.book_id"
] |
5,953 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many books did A.R. Braunmuller write? | SELECT COUNT(*) FROM author AS T1 INNER JOIN book_author AS T2 ON T1.author_id = T2.author_id WHERE T1.author_name = 'A.R. Braunmuller' | "A.R. Braunmuller" is the author_name | [
"author.author_id",
"author.author_name",
"book_author.author_id"
] |
5,954 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the name of the publisher who published Agatha Christie's first book? | SELECT T4.publisher_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id INNER JOIN publisher AS T4 ON T4.publisher_id = T1.publisher_id WHERE T3.author_name = 'Agatha Christie' ORDER BY T1.publication_date ASC LIMIT 1 | "Agatha Christie" is the author_name; name of publisher refers to publisher_name; first book refers to Min(publication_date) | [
"author.author_id",
"author.author_name",
"book.book_id",
"book.publication_date",
"book.publisher_id",
"book_author.author_id",
"book_author.book_id",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,955 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | List all the names of the books written by Danielle Steel. | SELECT T1.title FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Danielle Steel' | "Danielle Steel" is the author_name; name of books refers to title | [
"author.author_id",
"author.author_name",
"book.book_id",
"book.title",
"book_author.author_id",
"book_author.book_id"
] |
5,956 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many books by William Shakespeare were published by Penguin Classics? | SELECT COUNT(*) FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id INNER JOIN publisher AS T4 ON T4.publisher_id = T1.publisher_id WHERE T3.author_name = 'William Shakespeare' AND T4.publisher_name = 'Penguin Classics' | "William Shakespeare" is the author_name; "Penguin Classics" is the publisher_name | [
"author.author_id",
"author.author_name",
"book.book_id",
"book.publisher_id",
"book_author.author_id",
"book_author.book_id",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,957 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the name of the publisher that published the most books? | SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id GROUP BY T2.publisher_name ORDER BY COUNT(T2.publisher_id) DESC LIMIT 1 | name of publisher refers to publisher_name; publisher published the most number of books refers to Max(Count(book_id)) | [
"book.publisher_id",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,958 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the total shipping cost of all the orders made by Page Holsey? Indicate how many of the said orders were ordered in 2022. | SELECT SUM(T3.cost) FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id INNER JOIN shipping_method AS T3 ON T3.method_id = T2.shipping_method_id WHERE T1.first_name = 'Page' AND T1.last_name = 'Holsey' AND STRFTIME('%Y', T2.order_date) = '2022' | shipping cost refers to cost; ordered in 2022 refers to order_date LIKE '2022%' | [
"cust_order.customer_id",
"cust_order.order_date",
"cust_order.shipping_method_id",
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"shipping_method.cost",
"shipping_method.method_id"
] |
5,959 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the name of the publisher with publisher ID 22? | SELECT publisher_name FROM publisher WHERE publisher_id = 22 | name of publisher refers to publisher_name | [
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,960 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many of the books authored by Al Gore have less than 400 pages? | SELECT COUNT(*) FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Al Gore' AND T1.num_pages < 400 | "AI Gore" is the author_name; have less than 400 pages refers to num_pages < 400 | [
"author.author_id",
"author.author_name",
"book.book_id",
"book.num_pages",
"book_author.author_id",
"book_author.book_id"
] |
5,961 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | List the author's and publisher's name of the book published on July 10, 1997. | SELECT T3.author_name, T4.publisher_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id INNER JOIN publisher AS T4 ON T4.publisher_id = T1.publisher_id WHERE T1.publication_date = '1997-07-10' | author's name refers to author_name; publisher's name refers to publisher_name; book published on July 10, 1997 refers to publication_date LIKE '1997-07-10' | [
"author.author_id",
"author.author_name",
"book.book_id",
"book.publication_date",
"book.publisher_id",
"book_author.author_id",
"book_author.book_id",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,962 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the language of the book with ISBN 23755004321? | SELECT T2.language_name FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T1.isbn13 = 23755004321 | "23755004321" is the isbn13; language refers to language_name | [
"book.isbn13",
"book.language_id",
"book_language.language_id",
"book_language.language_name"
] |
5,963 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the title of the most expensive book? | SELECT T1.title FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id ORDER BY T2.price DESC LIMIT 1 | most expensive book refers to Max(price) | [
"book.book_id",
"book.title",
"order_line.book_id",
"order_line.price"
] |
5,964 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Calculate the total price of books ordered by customer named Lucas Wyldbore. | SELECT SUM(T1.price) FROM order_line AS T1 INNER JOIN cust_order AS T2 ON T2.order_id = T1.order_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id WHERE T3.first_name = 'Lucas' AND T3.last_name = 'Wyldbore' | total price refers to Sum(price); full name is composed of first name, last name | [
"cust_order.customer_id",
"cust_order.order_id",
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"order_line.order_id",
"order_line.price"
] |
5,965 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | List the ISBN of the book published in Spanish. | SELECT T1.isbn13 FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T2.language_name = 'Spanish' | "Spanish" is the language_name; ISBN refers to isbn13 | [
"book.isbn13",
"book.language_id",
"book_language.language_id",
"book_language.language_name"
] |
5,966 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Among the books that cost less than 1 dollar, how many were published by Berkley Trade? | SELECT COUNT(*) FROM publisher AS T1 INNER JOIN book AS T2 ON T1.publisher_id = T2.publisher_id INNER JOIN order_line AS T3 ON T3.book_id = T2.book_id WHERE T1.publisher_name = 'Berkley' AND T3.price < 1 | book cost less than 1 dollar refers to price < 1; 'Berkley Trade' is the publisher_name; | [
"book.book_id",
"book.publisher_id",
"order_line.book_id",
"order_line.price",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,967 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | List the title of the books purchased by the customer named Zia Roizin. | SELECT T1.title FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T4.first_name = 'Zia' AND T4.last_name = 'Roizin' | [
"book.book_id",
"book.title",
"cust_order.customer_id",
"cust_order.order_id",
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"order_line.book_id",
"order_line.order_id"
] | |
5,968 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Who authored the book with greatest number of pages? | SELECT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id ORDER BY T1.num_pages DESC LIMIT 1 | greatest number of pages refers to Max(num_pages); who authored refers to author_name | [
"author.author_id",
"author.author_name",
"book.book_id",
"book.num_pages",
"book_author.author_id",
"book_author.book_id"
] |
5,969 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | List the email of customers that bought the book titled Switch on the Night. | SELECT T4.email FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T1.title = 'Switch on the Night' | "Switch on the Night" is the title | [
"book.book_id",
"book.title",
"cust_order.customer_id",
"cust_order.order_id",
"customer.customer_id",
"customer.email",
"order_line.book_id",
"order_line.order_id"
] |
5,970 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | List the author's name of the books published by Abrams. | SELECT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id INNER JOIN publisher AS T4 ON T4.publisher_id = T1.publisher_id WHERE T4.publisher_name = 'Abrams' | "Abrams" is the publisher_name; author's name refers to author_name | [
"author.author_id",
"author.author_name",
"book.book_id",
"book.publisher_id",
"book_author.author_id",
"book_author.book_id",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,971 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the publisher name of the book titled The Illuminati? | SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T1.title = 'The Illuminati' | "The Illuminati" is the title of book | [
"book.publisher_id",
"book.title",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,972 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | In books authored by Abraham Lincoln, what is the percentage of the books published in 1992? | SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', T1.publication_date) = '1992' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Abraham Lincoln' | "Abraham Lincoln" is the author_name; published in 1992 refers to publication_date LIKE '1992%'; percentage = Divide (Sum(publication_date LIKE '1992%'), Count(publication_date)) * 100 | [
"author.author_id",
"author.author_name",
"book.book_id",
"book.publication_date",
"book_author.author_id",
"book_author.book_id"
] |
5,973 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Among the books published in 2004, list the name of the publisher of books with number of pages greater than 70% of the average number of pages of all books. | SELECT T1.title, T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE STRFTIME('%Y', T1.publication_date) = '2004' AND T1.num_pages * 100 > ( SELECT AVG(num_pages) FROM book ) * 70 | published in 2004 refers to publication_date LIKE '2004%'; books with number of pages greater than 70% of the average number of pages refers to num_pages > Multiply(Avg(num_pages), 0.7); name of publisher refers to publisher_name | [
"book.num_pages",
"book.publication_date",
"book.publisher_id",
"book.title",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,974 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Provide the contact email of Moss Zarb. | SELECT email FROM customer WHERE first_name = 'Moss' AND last_name = 'Zarb' | [
"customer.email",
"customer.first_name",
"customer.last_name"
] | |
5,975 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Name the streets in Dallas. | SELECT street_name FROM address WHERE city = 'Dallas' | "Dallas" is the city; streets refers to street_name | [
"address.city",
"address.street_name"
] |
5,976 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Which books were released by Orson Scott Card in 2001? | SELECT T1.title FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Orson Scott Card' AND STRFTIME('%Y', T1.publication_date) = '2001' | "Orson Scott Card" is the author_name; released in 2001 refers to publication_date LIKE '2001%'; books refers to title | [
"author.author_id",
"author.author_name",
"book.book_id",
"book.publication_date",
"book.title",
"book_author.author_id",
"book_author.book_id"
] |
5,977 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Count the number of books written by Orson Scott Card. | SELECT COUNT(*) FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Orson Scott Card' | "Orson Scott Card" is the author_name | [
"author.author_id",
"author.author_name",
"book.book_id",
"book_author.author_id",
"book_author.book_id"
] |
5,978 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Provide the authors and titles of the books which have more than 3000 pages. | SELECT T3.author_name, T1.title FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T1.num_pages > 3000 | authors refers to author_name; more than 3000 pages refers to num_pages > 3000 | [
"author.author_id",
"author.author_name",
"book.book_id",
"book.num_pages",
"book.title",
"book_author.author_id",
"book_author.book_id"
] |
5,979 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Who wrote "The Prophet"? | SELECT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T1.title = 'The Prophet' | "The Prophet" is the title of the book: who wrote refers to author_name | [
"author.author_id",
"author.author_name",
"book.book_id",
"book.title",
"book_author.author_id",
"book_author.book_id"
] |
5,980 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many books were published by Ace Hardcover? | SELECT COUNT(*) FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Ace Hardcover' | "Ace Hardcover" is the publisher_name | [
"book.publisher_id",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,981 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Which publisher published Barry Eisler's book? | SELECT T4.publisher_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id INNER JOIN publisher AS T4 ON T4.publisher_id = T1.publisher_id WHERE T3.author_name = 'Barry Eisler' | "Barry Eisler" is the author_name; publisher refers to publisher_name | [
"author.author_id",
"author.author_name",
"book.book_id",
"book.publisher_id",
"book_author.author_id",
"book_author.book_id",
"publisher.publisher_id",
"publisher.publisher_name"
] |
5,982 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many books were published in Japanese? | SELECT COUNT(T2.book_id) FROM book_language AS T1 INNER JOIN book AS T2 ON T1.language_id = T2.language_id WHERE T1.language_name = 'Japanese' | published in Japanese refers to language_name = 'Japanese' | [
"book.book_id",
"book.language_id",
"book_language.language_id",
"book_language.language_name"
] |
5,983 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Sum the total price of the orders for The Prophet book. | SELECT SUM(T1.price) FROM order_line AS T1 INNER JOIN book AS T2 ON T1.book_id = T2.book_id WHERE T2.title = 'The Prophet' | "The Prophet" is the title of the book: total price refers to Sum(price) | [
"book.book_id",
"book.title",
"order_line.book_id",
"order_line.price"
] |
5,984 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Provide the number of orders by Daisey Lamball in 2021. | SELECT COUNT(*) FROM cust_order AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Daisey' AND T2.last_name = 'Lamball' AND STRFTIME('%Y', T1.order_date) = '2021' | in 2021 refers to order_date LIKE '2021%' | [
"cust_order.customer_id",
"cust_order.order_date",
"customer.customer_id",
"customer.first_name",
"customer.last_name"
] |
5,985 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many customers are from Australia? | SELECT COUNT(*) FROM customer_address AS T1 INNER JOIN address AS T2 ON T2.address_id = T1.address_id INNER JOIN country AS T3 ON T3.country_id = T2.country_id WHERE T3.country_name = 'Australia' | "Australia" is the country_name; | [
"address.address_id",
"address.country_id",
"country.country_id",
"country.country_name",
"customer_address.address_id"
] |
5,986 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many orders were delivered in December 2019? | SELECT COUNT(*) FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE T1.status_value = 'Delivered' AND STRFTIME('%Y', T2.status_date) = '2019' | delivered refers to status_value = 'Delivered'; in December 2019 refers to status_date LIKE '2019-12%' | [
"order_history.status_date",
"order_history.status_id",
"order_status.status_id",
"order_status.status_value"
] |
5,987 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Provide the customers' names who ordered the Fantasmas. | SELECT T4.first_name, T4.last_name FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T1.title = 'Fantasmas' | "Fantasmas" is the title of the book; customer names refers to first_name, last_name | [
"book.book_id",
"book.title",
"cust_order.customer_id",
"cust_order.order_id",
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"order_line.book_id",
"order_line.order_id"
] |
5,988 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many percent of orders in 2020 used international shipping? | SELECT CAST(SUM(CASE WHEN T2.method_name = 'International' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cust_order AS T1 INNER JOIN shipping_method AS T2 ON T1.shipping_method_id = T2.method_id WHERE STRFTIME('%Y', T1.order_date) = '2020' | international shipping refers to method_name = 'International'; orders in 2020 refers to order_date = '2020%'; percentage = Divide (Sum(method_name = 'International'), Count(order_id)) * 100 | [
"cust_order.order_date",
"cust_order.shipping_method_id",
"shipping_method.method_id",
"shipping_method.method_name"
] |
5,989 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | List all the authors named "George". | SELECT author_name FROM author WHERE author_name LIKE 'George%' | author named 'George' refers to author_name = 'George%' | [
"author.author_name"
] |
5,990 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Which year has the most customer orders? | SELECT strftime('%Y', order_date) FROM cust_order GROUP BY strftime('%Y', order_date) ORDER BY COUNT(strftime('%Y', order_date)) DESC LIMIT 1 | year with the most customer orders refers to Max(count(order_id)) | [
"cust_order.order_date"
] |
5,991 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the average price for the order line? | SELECT AVG(price) FROM order_line | average price refers to AVG(price) | [
"order_line.price"
] |
5,992 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | List all of the books that were published in 1995. | SELECT title FROM book WHERE STRFTIME('%Y', publication_date) = '1995' | published in 1995 refers to publication_date LIKE '1995%'; ; list of book refers to title | [
"book.publication_date",
"book.title"
] |
5,993 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What is the most common domain for the email address among all the customers? | SELECT SUBSTR(email, INSTR(email, '@') + 1, LENGTH(email) - INSTR(email, '@')) AS ym FROM customer GROUP BY SUBSTR(email, INSTR(email, '@') + 1, LENGTH(email) - INSTR(email, '@')) ORDER BY COUNT(*) DESC LIMIT 1 | most common domain for the email refers to Max(Count(SUBSTR(email, CHARINDEX('@', email) + 1, length(email) - charindex('@', email)))) | [
"customer.email"
] |
5,994 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many publishers have the word "book" in their name? | SELECT COUNT(*) FROM publisher WHERE publisher_name LIKE '%book%' | publisher have the word 'book' refers to publisher_name LIKE '%book%' | [
"publisher.publisher_name"
] |
5,995 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Which language is the rarest among all the books? | SELECT T2.language_name FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id GROUP BY T2.language_name ORDER BY COUNT(T2.language_name) ASC LIMIT 1 | language written in refers to language_name; rarest refers to Min(Count(book_id)) | [
"book.language_id",
"book_language.language_id",
"book_language.language_name"
] |
5,996 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | List all the order dates for the customer named "Adrian Kunzelmann". | SELECT T3.order_date FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T4.first_name = 'Adrian' AND T4.last_name = 'Kunzelmann' | [
"book.book_id",
"cust_order.customer_id",
"cust_order.order_date",
"cust_order.order_id",
"customer.customer_id",
"customer.first_name",
"customer.last_name",
"order_line.book_id",
"order_line.order_id"
] | |
5,997 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | How many addresses are from the Philippines? | SELECT COUNT(T2.country_id) FROM address AS T1 INNER JOIN country AS T2 ON T2.country_id = T1.country_id WHERE T2.country_name = 'Philippines' | "Philippines" is the country_name | [
"address.country_id",
"country.country_id",
"country.country_name"
] |
5,998 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | Who is the author who wrote the most books? | SELECT T1.author_name FROM author AS T1 INNER JOIN book_author AS T2 ON T1.author_id = T2.author_id GROUP BY T1.author_name ORDER BY COUNT(T2.author_id) DESC LIMIT 1 | author refers to author_name; who wrote the most book refers to Max(Count(author_id)) | [
"author.author_id",
"author.author_name",
"book_author.author_id"
] |
5,999 | books | CREATE TABLE address_status
(
status_id INTEGER
primary key,
address_status TEXT
);
CREATE TABLE author
(
author_id INTEGER
primary key,
author_name TEXT
);
CREATE TABLE book_language
(
language_id INTEGER
primary key,
language_code TEXT,
langua... | What are the books published by "Harper Collins"? | SELECT T1.title FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Harper Collins' | "Harper Collins" is the publisher_name; books refers to title | [
"book.publisher_id",
"book.title",
"publisher.publisher_id",
"publisher.publisher_name"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.