Chinastark/bird_dataset huggingface dataset:
Database: airline
Question: How many flights on the 1st of August 2018 were coming from Allentown, Pennsylvania?
Evidence: 1st of August 2018 refers to FL_DATE = '2018/8/1'; coming from Allentown, Pennsylvania refers to ORIGIN = 'ABE';
SQL: SELECT COUNT(*) FROM Airlines WHERE FL_DATE = '2018/8/1' AND ORIGIN = 'ABE'
Database: airline
Question: What is the only flight destination for flights from Albany?
Evidence: flight destination refers to DEST; from Albany refers to ORIGIN = 'ABY';
SQL: SELECT DEST FROM Airlines WHERE ORIGIN = 'ABY' GROUP BY DEST
Database: airline
Question: How many flights from Dallas to Santa Ana departed on time?
Evidence: from Dallas refers to ORIGIN = 'DFW'; to Santa Ana refers to DEST = 'SNA'; departed on time refers to DEP_DELAY = 0;
SQL: SELECT COUNT(*) FROM Airlines WHERE DEST = 'SNA' AND ORIGIN = 'DFW' AND DEP_DELAY = 0
Database: airline
Question: How many flights from Charlotte Douglas International Airport to Austin - Bergstrom International Airport experienced serious reasons that cause flight cancellation?
Evidence: from refers to ORIGIN; Charlotte Douglas International Airport refers to Description = 'Charlotte, NC: Charlotte Douglas International'; to refers to DEST; Austin - Bergstrom International Airport refers to Description = 'Austin, TX: Austin - Bergstrom International'; serious reasons refers to CANCELLATION_CODE = 'A';
SQL: SELECT COUNT(*) FROM Airlines AS T1 INNER JOIN Airports AS T2 ON T1.ORIGIN = T2.Code WHERE T1.ORIGIN = 'CLT' AND T1.DEST = 'AUS' AND T2.Description = 'Charlotte, NC: Charlotte Douglas International' AND T1.CANCELLATION_CODE = 'A'
Database: airline
Question: Which flight carrier operator has the most cancelled flights?
Evidence: flight carrier operator refers to OP_CARRIER_AIRLINE_ID; most cancelled flights refers to MAX(COUNT(CANCELLED = 1));
SQL: SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID ORDER BY T2.CANCELLED DESC LIMIT 1
Database: airline
Question: What is the actual departure time of JetBlue Airways with the plane's tail number N903JB to Fort Lauderdale-Hollywood International Airport on the 20th of August 2018?
Evidence: actual departure time refers to DEP_TIME; JetBlue Airways refers to Description like '%JetBlue Airways%'; tail number refers to TAIL_NUM; TAIL_NUM = 'N903JB'; to refers to DEST; Fort Lauderdale-Hollywood International Airport refers to Description like '%Fort Lauderdale-Hollywood%'; on the 20th of August 2018 refers to FL_DATE = '2018/8/20';
SQL: SELECT T1.DEP_TIME FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code INNER JOIN Airports AS T3 ON T1.DEST = T3.Code WHERE T1.FL_DATE = '2018/8/20' AND T1.TAIL_NUM = 'N903JB' AND T2.Description LIKE '%JetBlue Airways%' AND T3.Description LIKE '%Fort Lauderdale-Hollywood%'
Database: airline
Question: Which flight carrier operator flies from Atlantic City to Fort Lauderdale?
Evidence: flight carrier operator refers to OP_CARRIER_AIRLINE_ID; from Atlantic City refers to ORIGIN = 'ACY'; to Fort Lauderdale refers to DEST = 'FLL';
SQL: SELECT T2.Description FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.ORIGIN = 'ACY' AND T1.DEST = 'FLL' GROUP BY T2.Description
Database: airline
Question: What is the airport description of the airport code A11?
SQL: SELECT Description FROM Airports WHERE Code = 'A11'
Database: airline
Question: What is the total number of flights that have Oklahoma as their origin?
Evidence: Oklahoma as origin refers to Origin = 'OKC';
SQL: SELECT COUNT(*) AS num FROM Airlines WHERE Origin = 'OKC'
Database: airline
Question: How many airports have a code starting with the letter C?
Evidence: code starting with the letter C refers to Code like 'C%';
SQL: SELECT COUNT(*) FROM Airports WHERE Code LIKE 'C%'
Database: airline
Question: Provide the destinations of flight number 1596.
Evidence: destination refers to DEST; flight number refers to OP_CARRIER_FL_NUM; OP_CARRIER_FL_NUM = 1596;
SQL: SELECT DEST FROM Airlines WHERE OP_CARRIER_FL_NUM = 1596
Database: airline
Question: List the description of the airports that have code that ends with number 3?
Evidence: code that ends with number 3 refers to Code like '%3';
SQL: SELECT Description FROM Airports WHERE Code LIKE '%3'
Database: airline
Question: Give the code of the airport described as Driftwood Bay, AK: Driftwood Bay Airport.
Evidence: Driftwood Bay, AK: Driftwood Bay Airport refers to Description = 'Driftwood Bay, AK: Driftwood Bay Airport';
SQL: SELECT Code FROM Airports WHERE Description = 'Driftwood Bay, AK: Driftwood Bay Airport'
Database: airline
Question: How many cancelled flights are there?
Evidence: cancelled flights refers to CANCELLED = 1;
SQL: SELECT COUNT(*) FROM Airlines WHERE CANCELLED = 1
Database: airline
Question: List the tail number of flights that flew on August 17, 2018.
Evidence: tail number refers to TAIL_NUM; on August 17, 2018 refers to FL_DATE = '2018/8/17';
SQL: SELECT TAIL_NUM FROM Airlines WHERE FL_DATE = '2018/8/17' GROUP BY TAIL_NUM
Database: airline
Question: Provide the origin of the flight that has the shortest actual elapsed time.
Evidence: shortest actual elapsed time refers to MIN(ACTUAL_ELAPSED_TIME);
SQL: SELECT ORIGIN FROM Airlines ORDER BY ACTUAL_ELAPSED_TIME ASC LIMIT 1
Database: airline
Question: Provide the date and tail number of flight with air carrier "Ross Aviation Inc.: GWE".
Evidence: date of flight refers to FL_DATE; tail number of flight refers to TAIL_NUM; Ross Aviation Inc.: GWE refers to Description = 'Ross Aviation Inc.: GWE';
SQL: SELECT T1.FL_DATE, T1.TAIL_NUM FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T2.Description = 'Ross Aviation Inc.: GWE'
Database: airline
Question: List the air carrier description and code of the flight with the shortest arrival time.
Evidence: shortest arrival time refers to MIN(ARR_TIME);
SQL: SELECT T1.Description, T1.Code FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID ORDER BY T2.ARR_TIME ASC LIMIT 1
Database: airline
Question: How many flights of air carrier called JetBlue Airways: B6 have 0 new arrival delay?
Evidence: JetBlue Airways refers to Description = '%JetBlue Airway%'; 0 new arrival delay refers to ARR_DELAY_NEW = 0;
SQL: SELECT COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description LIKE '%JetBlue Airways: B6%' AND T2.ARR_DELAY_NEW = 0
Database: airline
Question: Provide the air carrier description of all flights arriving at Miami.
Evidence: arriving at Miami refers to DEST = 'MIA';
SQL: SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.DEST = 'MIA'
Database: airline
Question: What is the air carrier's description of the cancelled flights?
Evidence: cancelled flights refers to CANCELLED = 1;
SQL: SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.CANCELLED = 1 GROUP BY T1.Description
Database: airline
Question: Give the actual elapsed time of the flights with air carrier named Semo Aviation Inc.: SEM.
Evidence: actual elapsed time refers to ACTUAL_ELAPSED_TIME; Semo Aviation Inc.: SEM. Refers to Description = 'Semo Aviation Inc.: SEM';
SQL: SELECT T2.ACTUAL_ELAPSED_TIME FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Semo Aviation Inc.: SEM'
Database: airline
Question: Among the flights with air carrier described as Asap Air Inc.: ASP, what is the tail number of the flight with the longest departure delay?
Evidence: Asap Air Inc.: ASP refers to Description = 'Asap Air Inc.: ASP'; tail number refers to TAIL_NUM; longest departure delay refers to MAX(DEP_DELAY);
SQL: 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 = 'Asap Air Inc.: ASP' ORDER BY T2.DEP_DELAY DESC LIMIT 1
Database: airline
Question: List the air carrier's description of the flights with 0 departure delay.
Evidence: 0 departure delay refers to DEP_DELAY = 0;
SQL: SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.DEP_DELAY = 0 GROUP BY T1.Description
Database: airline
Question: Provide the air carrier description of the flight with the highest actual elapsed time.
Evidence: highest actual elapsed time refers to MAX(ACTUAL_ELAPSED_TIME);
SQL: SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID ORDER BY T2.ACTUAL_ELAPSED_TIME DESC LIMIT 1
Database: airline
Question: What are the destinations of the flights with air carrier description "Southeast Alaska Airlines: WEB"?
Evidence: destinations refers to DEST; Southeast Alaska Airlines: WEB refers to Description = 'Southeast Alaska Airlines: WEB';
SQL: 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'
Database: airline
Question: From August 10 to August 20, 2018, how many cancelled flights of air carrier named Spirit Air Lines: NK are there?
Evidence: 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';
SQL: 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'
Database: airline
Question: What is the total number of flights that flew on August 2, 2018 with air carrier described as Horizon Air?
Evidence: on August 2, 2018 refers to FL_DATE = '2018/8/2'; Horizon Air refers to Description which includs 'Horizon Air';
SQL: 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'
Database: airline
Question: What is the tail number of the flight with air carrier named Iscargo Hf: ICQ and arrival time of 1000 and below?
Evidence: 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;
SQL: 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'
Database: airline
Question: List the flight date of flights with air carrier described as Profit Airlines Inc.: XBH which have an actual elapsed time below 100.
Evidence: 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;
SQL: 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'
Database: airline
Question: Among the flights with air carrier named Republic Airline, how many of the flights have departure delay of 30 minutes and above?
Evidence: Republic Airline refers to Description which contains 'Republic Airline'; departure delay of 30 minutes and above refers to DEP_DELAY > 30;
SQL: 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
Database: airline
Question: What are the air carriers of the flights that flew on August 25, 2018 that have departure delay of -5?
Evidence: on August 25, 2018 refers to FL_DATE = '2018/8/25'; departure delay of -5 refers to DEP_DELAY = -5;
SQL: 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
Database: airline
Question: Provide the air carrier description of the flight with a tail number N922US from Phoenix.
Evidence: tail number refers to TAIL_NUM; TAIL_NUM = 'N922US'; from Phoenix refers to ORIGIN = 'PHX';
SQL: 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
Database: airline
Question: Give the air carrier description of the flights that have an earlier arrival and departure.
Evidence: earlier arrival and departure refers to ARR_DELAY < 0 AND DEP_DELAY < 0;
SQL: 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
Database: airline
Question: 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.
Evidence: 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);
SQL: 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 )
Database: airline
Question: List the air carrier's description with arrival time lower than the 40% of the average arrival time of flights that flew to Phoenix.
Evidence: 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';
SQL: 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
Database: airline
Question: Among the flights of the air carrier described as American Airlines, what is the percentage of the flights with earlier departure?
Evidence: 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;
SQL: 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%'
Database: books
Question: Among the books published by publisher ID 1929, how many of them have over 500 pages?
Evidence: books have over 500 pages refers to num_pages > 500
SQL: SELECT COUNT(*) FROM book WHERE publisher_id = 1929 AND num_pages > 500
Database: books
Question: What is the publication date of the book with the most pages?
Evidence: book with the most pages refers to Max(num_pages)
SQL: SELECT publication_date FROM book ORDER BY num_pages DESC LIMIT 1
Database: books
Question: What is the name of the publisher of the book "The Illuminati"?
Evidence: "The Illuminati" is the title of the book; name of publisher refers to publisher_name
SQL: 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'
Database: books
Question: How many books were published by publisher "Thomas Nelson"?
Evidence: "Thomas Nelson" is the publisher_name
SQL: SELECT COUNT(*) FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Thomas Nelson'
Database: books
Question: What is the name of the publisher that has published the most number of books?
Evidence: name of publisher refers to publisher_name; publisher published the most number of books refers to Max(Count(book_id))
SQL: 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
Database: books
Question: Please give the title of the oldest book published by publisher "Thomas Nelson".
Evidence: "Thomas Nelson" is the publisher_name; oldest book refers to Min(publication_date)
SQL: 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
Database: books
Question: Among the books published by publisher "Thomas Nelson", how many of them have over 300 pages?
Evidence: "Thomas Nelson" is the publisher_name; books with over 300 pages refers to num_pages > 300
SQL: 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
Database: books
Question: What is the name of the publisher of the book with the most pages?
Evidence: book with the most pages refers to Max(num_pages); name of publisher refers to publisher_name
SQL: 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
Database: books
Question: How many books are in English?
Evidence: books in English refers to language_name = 'English'
SQL: SELECT COUNT(*) FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T2.language_name = 'English'
Database: books
Question: Please list the titles of all the books in British English.
Evidence: "British English" is the language_name of the book
SQL: 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'
Database: books
Question: What is the cheapest order price of the book "The Little House"?
Evidence: "The Little House" is the title of book; cheapest order price refers to Min(price)
SQL: 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'
Database: books
Question: Please list the titles of all the books that Lucas Wyldbore has ordered.
SQL: 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'
Database: books
Question: Among the books ordered by Lucas Wyldbore, how many of them are over 300 pages?
Evidence: books have over 300 pages refers to num_pages > 300
SQL: 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
Database: books
Question: What is the total price of all the books ordered by Lucas Wyldbore?
Evidence: total price refers to Sum(price)
SQL: 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'
Database: books
Question: How much money on average does Lucas Wyldbore spend on book orders?
Evidence: average spend on book orders = AVG (price)
SQL: 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'
Database: books
Question: Among the books ordered by Lucas Wyldbore, what is the percentage of those books over $13?
Evidence: books over $13 refers to price > 13; percentage = Divide (Sum (order_id where price > 13), Count (order_id)) * 100
SQL: 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'
Database: books
Question: How many orders has Cordy Dumbarton made?
SQL: 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'
Database: books
Question: List the title of the earliest published Japanese book.
Evidence: Japanese book refers to language_name = 'Japanese'; earliest published refers to Min(publication_date)
SQL: 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
Database: books
Question: For the publisher which published the most books, show its name.
Evidence: published the most books refers to Max(Count(book_id)); publisher refers to publisher_name
SQL: 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
Database: books
Question: How many books were published by Kensington?
Evidence: "Kensington" is the publisher_name;
SQL: 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'
Database: books
Question: Which language was book id 1405 written in?
Evidence: language written in refers to language_name;
SQL: 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
Database: books
Question: Which customer has made the most orders? Show his/her full name.
Evidence: most order refers to Max(Count(order_id)); customer refers to first_name, last_name
SQL: 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
Database: books
Question: Name the book title of the bestseller.
Evidence: book title refers to title; best sellers refers to title where Max(count(order_id))
SQL: 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
Database: books
Question: How many books did David Foster Wallace write?
Evidence: "David Foster Wallace" is the author_name;
SQL: 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'
Database: books
Question: How many orders does the book "O Xará" have?
Evidence: "O Xará" is the title of the book
SQL: SELECT COUNT(*) FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T1.title = 'O Xará'
Database: books
Question: Which country does Malina Johnson live in?
Evidence: country refers to country_name
SQL: 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
Database: books
Question: Give the number of Ukrainian addresses in the database.
Evidence: Ukrainian address refers to country_name = 'Ukraine'
SQL: SELECT COUNT(*) FROM country AS T1 INNER JOIN address AS T2 ON T1.country_id = T2.country_id WHERE T1.country_name = 'Ukraine'
Database: books
Question: Which country does Žirovnica city belong to?
Evidence: "Žirovnica" is the city; country refers to country_name
SQL: SELECT T1.country_name FROM country AS T1 INNER JOIN address AS T2 ON T1.country_id = T2.country_id WHERE T2.city = 'Žirovnica'