text
stringlengths
150
1.06k
source
dict
### QUESTION Find the name and city of the airport which is the destination of the most number of routes. ### CONTEXT CREATE TABLE airports (name VARCHAR, city VARCHAR, apid VARCHAR); CREATE TABLE routes (dst_apid VARCHAR) ### ANSWER SELECT T1.name, T1.city, T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid GROUP BY T2.dst_apid ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT T1.name, T1.city, T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid GROUP BY T2.dst_apid ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE airports (name VARCHAR, city VARCHAR, apid VARCHAR); CREATE TABLE routes (dst_apid VARCHAR)", "question": "Find the name and city of the airport which is the destination of the most number of routes." }
### QUESTION Find the names of the top 10 airlines that operate the most number of routes. ### CONTEXT CREATE TABLE airlines (name VARCHAR, alid VARCHAR); CREATE TABLE routes (alid VARCHAR) ### ANSWER SELECT T1.name, T2.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T2.alid ORDER BY COUNT(*) DESC LIMIT 10</s>
{ "answer": "SELECT T1.name, T2.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T2.alid ORDER BY COUNT(*) DESC LIMIT 10", "context": "CREATE TABLE airlines (name VARCHAR, alid VARCHAR); CREATE TABLE routes (alid VARCHAR)", "question": "Find the names of the top 10 airlines that operate the most number of routes." }
### QUESTION Find the name and city of the airport which is the source for the most number of flight routes. ### CONTEXT CREATE TABLE airports (name VARCHAR, city VARCHAR, apid VARCHAR); CREATE TABLE routes (src_apid VARCHAR) ### ANSWER SELECT T1.name, T1.city, T2.src_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T2.src_apid ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT T1.name, T1.city, T2.src_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T2.src_apid ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE airports (name VARCHAR, city VARCHAR, apid VARCHAR); CREATE TABLE routes (src_apid VARCHAR)", "question": "Find the name and city of the airport which is the source for the most number of flight routes." }
### QUESTION Find the number of different airports which are the destinations of the American Airlines. ### CONTEXT CREATE TABLE routes (alid VARCHAR); CREATE TABLE airlines (alid VARCHAR, name VARCHAR) ### ANSWER SELECT COUNT(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'</s>
{ "answer": "SELECT COUNT(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'", "context": "CREATE TABLE routes (alid VARCHAR); CREATE TABLE airlines (alid VARCHAR, name VARCHAR)", "question": "Find the number of different airports which are the destinations of the American Airlines." }
### QUESTION Who directed the epsiode with production number 109? ### CONTEXT CREATE TABLE table_2400842_1 (directed_by VARCHAR, prod__number VARCHAR) ### ANSWER SELECT directed_by FROM table_2400842_1 WHERE prod__number = 109</s>
{ "answer": "SELECT directed_by FROM table_2400842_1 WHERE prod__number = 109", "context": "CREATE TABLE table_2400842_1 (directed_by VARCHAR, prod__number VARCHAR)", "question": "Who directed the epsiode with production number 109?" }
### QUESTION For each country and airline name, how many routes are there? ### CONTEXT CREATE TABLE airlines (country VARCHAR, name VARCHAR, alid VARCHAR); CREATE TABLE routes (alid VARCHAR) ### ANSWER SELECT T1.country, T1.name, COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.country, T1.name</s>
{ "answer": "SELECT T1.country, T1.name, COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.country, T1.name", "context": "CREATE TABLE airlines (country VARCHAR, name VARCHAR, alid VARCHAR); CREATE TABLE routes (alid VARCHAR)", "question": "For each country and airline name, how many routes are there?" }
### QUESTION Find the number of routes with destination airports in Italy. ### CONTEXT CREATE TABLE routes (dst_apid VARCHAR); CREATE TABLE airports (apid VARCHAR, country VARCHAR) ### ANSWER SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy'</s>
{ "answer": "SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy'", "context": "CREATE TABLE routes (dst_apid VARCHAR); CREATE TABLE airports (apid VARCHAR, country VARCHAR)", "question": "Find the number of routes with destination airports in Italy." }
### QUESTION What is Category, when Result is "Nominated", when Award is "Drama Desk Award", and when Nominee is "Nathan Lane"? ### CONTEXT CREATE TABLE table_name_95 (category VARCHAR, nominee VARCHAR, result VARCHAR, award VARCHAR) ### ANSWER SELECT category FROM table_name_95 WHERE result = "nominated" AND award = "drama desk award" AND nominee = "nathan lane"</s>
{ "answer": "SELECT category FROM table_name_95 WHERE result = \"nominated\" AND award = \"drama desk award\" AND nominee = \"nathan lane\"", "context": "CREATE TABLE table_name_95 (category VARCHAR, nominee VARCHAR, result VARCHAR, award VARCHAR)", "question": "What is Category, when Result is \"Nominated\", when Award is \"Drama Desk Award\", and when Nominee is \"Nathan Lane\"?" }
### QUESTION What is the total number of Year, when Result is "Nominated", when Category is "Outstanding Actor in a Musical", and when Award is "Drama Desk Award"? ### CONTEXT CREATE TABLE table_name_68 (year VARCHAR, award VARCHAR, result VARCHAR, category VARCHAR) ### ANSWER SELECT COUNT(year) FROM table_name_68 WHERE result = "nominated" AND category = "outstanding actor in a musical" AND award = "drama desk award"</s>
{ "answer": "SELECT COUNT(year) FROM table_name_68 WHERE result = \"nominated\" AND category = \"outstanding actor in a musical\" AND award = \"drama desk award\"", "context": "CREATE TABLE table_name_68 (year VARCHAR, award VARCHAR, result VARCHAR, category VARCHAR)", "question": "What is the total number of Year, when Result is \"Nominated\", when Category is \"Outstanding Actor in a Musical\", and when Award is \"Drama Desk Award\"?" }
### QUESTION Find the number of routes that have destination John F Kennedy International Airport. ### CONTEXT CREATE TABLE airports (apid VARCHAR, name VARCHAR); CREATE TABLE routes (dst_apid VARCHAR) ### ANSWER SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport'</s>
{ "answer": "SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport'", "context": "CREATE TABLE airports (apid VARCHAR, name VARCHAR); CREATE TABLE routes (dst_apid VARCHAR)", "question": "Find the number of routes that have destination John F Kennedy International Airport." }
### QUESTION Return the number of routes with destination airport in Italy operated by the airline with name 'American Airlines'. ### CONTEXT CREATE TABLE routes (dst_apid VARCHAR, alid VARCHAR); CREATE TABLE airports (apid VARCHAR, country VARCHAR); CREATE TABLE airlines (alid VARCHAR, name VARCHAR) ### ANSWER SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid JOIN airlines AS T3 ON T1.alid = T3.alid WHERE T2.country = 'Italy' AND T3.name = 'American Airlines'</s>
{ "answer": "SELECT COUNT(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid JOIN airlines AS T3 ON T1.alid = T3.alid WHERE T2.country = 'Italy' AND T3.name = 'American Airlines'", "context": "CREATE TABLE routes (dst_apid VARCHAR, alid VARCHAR); CREATE TABLE airports (apid VARCHAR, country VARCHAR); CREATE TABLE airlines (alid VARCHAR, name VARCHAR)", "question": "Return the number of routes with destination airport in Italy operated by the airline with name 'American Airlines'." }
### QUESTION Find the number of routes from the United States to Canada. ### CONTEXT CREATE TABLE airports (dst_apid VARCHAR, src_apid VARCHAR, apid VARCHAR, country VARCHAR); CREATE TABLE routes (dst_apid VARCHAR, src_apid VARCHAR, apid VARCHAR, country VARCHAR) ### ANSWER SELECT COUNT(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')</s>
{ "answer": "SELECT COUNT(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')", "context": "CREATE TABLE airports (dst_apid VARCHAR, src_apid VARCHAR, apid VARCHAR, country VARCHAR); CREATE TABLE routes (dst_apid VARCHAR, src_apid VARCHAR, apid VARCHAR, country VARCHAR)", "question": "Find the number of routes from the United States to Canada." }
### QUESTION Find the busiest source airport that runs most number of routes in China. ### CONTEXT CREATE TABLE routes (src_apid VARCHAR); CREATE TABLE airports (name VARCHAR, apid VARCHAR, country VARCHAR) ### ANSWER SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE routes (src_apid VARCHAR); CREATE TABLE airports (name VARCHAR, apid VARCHAR, country VARCHAR)", "question": "Find the busiest source airport that runs most number of routes in China." }
### QUESTION Find the busiest destination airport that runs most number of routes in China. ### CONTEXT CREATE TABLE routes (dst_apid VARCHAR); CREATE TABLE airports (name VARCHAR, apid VARCHAR, country VARCHAR) ### ANSWER SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE routes (dst_apid VARCHAR); CREATE TABLE airports (name VARCHAR, apid VARCHAR, country VARCHAR)", "question": "Find the busiest destination airport that runs most number of routes in China." }
### QUESTION Find the id of routes whose source and destination airports are in the United States. ### CONTEXT CREATE TABLE routes (rid VARCHAR, dst_apid VARCHAR, src_apid VARCHAR, apid VARCHAR, country VARCHAR); CREATE TABLE airports (rid VARCHAR, dst_apid VARCHAR, src_apid VARCHAR, apid VARCHAR, country VARCHAR) ### ANSWER SELECT rid FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'United States') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')</s>
{ "answer": "SELECT rid FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country = 'United States') AND src_apid IN (SELECT apid FROM airports WHERE country = 'United States')", "context": "CREATE TABLE routes (rid VARCHAR, dst_apid VARCHAR, src_apid VARCHAR, apid VARCHAR, country VARCHAR); CREATE TABLE airports (rid VARCHAR, dst_apid VARCHAR, src_apid VARCHAR, apid VARCHAR, country VARCHAR)", "question": "Find the id of routes whose source and destination airports are in the United States." }
### QUESTION List the name of all the distinct customers who have orders with status "Packing". ### CONTEXT CREATE TABLE orders (customer_id VARCHAR, order_status VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR) ### ANSWER SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Packing"</s>
{ "answer": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Packing\"", "context": "CREATE TABLE orders (customer_id VARCHAR, order_status VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR)", "question": "List the name of all the distinct customers who have orders with status \"Packing\"." }
### QUESTION Find the details of all the distinct customers who have orders with status "On Road". ### CONTEXT CREATE TABLE orders (customer_id VARCHAR, order_status VARCHAR); CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR) ### ANSWER SELECT DISTINCT T1.customer_details FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road"</s>
{ "answer": "SELECT DISTINCT T1.customer_details FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\"", "context": "CREATE TABLE orders (customer_id VARCHAR, order_status VARCHAR); CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR)", "question": "Find the details of all the distinct customers who have orders with status \"On Road\"." }
### QUESTION How many circuits had a winning team of #1 patrón highcroft racing ang gtc winning team #81 alex job racing ? ### CONTEXT CREATE TABLE table_24037660_2 (circuit VARCHAR, lmp_winning_team VARCHAR, gtc_winning_team VARCHAR) ### ANSWER SELECT COUNT(circuit) FROM table_24037660_2 WHERE lmp_winning_team = "#1 Patrón Highcroft Racing" AND gtc_winning_team = "#81 Alex Job Racing"</s>
{ "answer": "SELECT COUNT(circuit) FROM table_24037660_2 WHERE lmp_winning_team = \"#1 Patrón Highcroft Racing\" AND gtc_winning_team = \"#81 Alex Job Racing\"", "context": "CREATE TABLE table_24037660_2 (circuit VARCHAR, lmp_winning_team VARCHAR, gtc_winning_team VARCHAR)", "question": "How many circuits had a winning team of #1 patrón highcroft racing ang gtc winning team #81 alex job racing ?" }
### QUESTION What is the name of the customer who has the most orders? ### CONTEXT CREATE TABLE orders (customer_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR) ### ANSWER SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE orders (customer_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR)", "question": "What is the name of the customer who has the most orders?" }
### QUESTION What date has 11 as the tie no.? ### CONTEXT CREATE TABLE table_name_48 (date VARCHAR, tie_no VARCHAR) ### ANSWER SELECT date FROM table_name_48 WHERE tie_no = "11"</s>
{ "answer": "SELECT date FROM table_name_48 WHERE tie_no = \"11\"", "context": "CREATE TABLE table_name_48 (date VARCHAR, tie_no VARCHAR)", "question": "What date has 11 as the tie no.?" }
### QUESTION Find the dates of orders which belong to the customer named "Jeramie". ### CONTEXT CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE orders (date_order_placed VARCHAR, customer_id VARCHAR) ### ANSWER SELECT T2.date_order_placed FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = "Jeramie"</s>
{ "answer": "SELECT T2.date_order_placed FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = \"Jeramie\"", "context": "CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE orders (date_order_placed VARCHAR, customer_id VARCHAR)", "question": "Find the dates of orders which belong to the customer named \"Jeramie\"." }
### QUESTION Give me the names of customers who have placed orders between 2009-01-01 and 2010-01-01. ### CONTEXT CREATE TABLE orders (customer_id VARCHAR, date_order_placed VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR) ### ANSWER SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.date_order_placed >= "2009-01-01" AND T2.date_order_placed <= "2010-01-01"</s>
{ "answer": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.date_order_placed >= \"2009-01-01\" AND T2.date_order_placed <= \"2010-01-01\"", "context": "CREATE TABLE orders (customer_id VARCHAR, date_order_placed VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR)", "question": "Give me the names of customers who have placed orders between 2009-01-01 and 2010-01-01." }
### QUESTION Give me a list of distinct product ids from orders placed between 1975-01-01 and 1976-01-01? ### CONTEXT CREATE TABLE order_items (product_id VARCHAR, order_id VARCHAR); CREATE TABLE orders (order_id VARCHAR, date_order_placed VARCHAR) ### ANSWER SELECT DISTINCT T2.product_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id WHERE T1.date_order_placed >= "1975-01-01" AND T1.date_order_placed <= "1976-01-01"</s>
{ "answer": "SELECT DISTINCT T2.product_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id WHERE T1.date_order_placed >= \"1975-01-01\" AND T1.date_order_placed <= \"1976-01-01\"", "context": "CREATE TABLE order_items (product_id VARCHAR, order_id VARCHAR); CREATE TABLE orders (order_id VARCHAR, date_order_placed VARCHAR)", "question": "Give me a list of distinct product ids from orders placed between 1975-01-01 and 1976-01-01?" }
### QUESTION Find the names of the customers who have order status both "On Road" and "Shipped". ### CONTEXT CREATE TABLE orders (customer_id VARCHAR, order_status VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR) ### ANSWER SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road" INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Shipped"</s>
{ "answer": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\" INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Shipped\"", "context": "CREATE TABLE orders (customer_id VARCHAR, order_status VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR)", "question": "Find the names of the customers who have order status both \"On Road\" and \"Shipped\"." }
### QUESTION Find the id of the customers who have order status both "On Road" and "Shipped". ### CONTEXT CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE orders (customer_id VARCHAR, order_status VARCHAR) ### ANSWER SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road" INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Shipped"</s>
{ "answer": "SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\" INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Shipped\"", "context": "CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE orders (customer_id VARCHAR, order_status VARCHAR)", "question": "Find the id of the customers who have order status both \"On Road\" and \"Shipped\"." }
### QUESTION What is the placement date of the order whose invoice number is 10? ### CONTEXT CREATE TABLE orders (date_order_placed VARCHAR, order_id VARCHAR); CREATE TABLE shipments (order_id VARCHAR, invoice_number VARCHAR) ### ANSWER SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.invoice_number = 10</s>
{ "answer": "SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.invoice_number = 10", "context": "CREATE TABLE orders (date_order_placed VARCHAR, order_id VARCHAR); CREATE TABLE shipments (order_id VARCHAR, invoice_number VARCHAR)", "question": "What is the placement date of the order whose invoice number is 10?" }
### QUESTION List the count and id of each product in all the orders. ### CONTEXT CREATE TABLE orders (order_id VARCHAR); CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR); CREATE TABLE products (product_id VARCHAR) ### ANSWER SELECT COUNT(*), T3.product_id FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id</s>
{ "answer": "SELECT COUNT(*), T3.product_id FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id", "context": "CREATE TABLE orders (order_id VARCHAR); CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR); CREATE TABLE products (product_id VARCHAR)", "question": "List the count and id of each product in all the orders." }
### QUESTION What is the best top-10 result when events are fewer than 39, top-5 is 1 and more than 5 cuts are made? ### CONTEXT CREATE TABLE table_name_89 (top_10 INTEGER, cuts_made VARCHAR, events VARCHAR, top_5 VARCHAR) ### ANSWER SELECT MAX(top_10) FROM table_name_89 WHERE events < 39 AND top_5 = 1 AND cuts_made > 5</s>
{ "answer": "SELECT MAX(top_10) FROM table_name_89 WHERE events < 39 AND top_5 = 1 AND cuts_made > 5", "context": "CREATE TABLE table_name_89 (top_10 INTEGER, cuts_made VARCHAR, events VARCHAR, top_5 VARCHAR)", "question": "What is the best top-10 result when events are fewer than 39, top-5 is 1 and more than 5 cuts are made?" }
### QUESTION What was the earliest year where USL PDL played in 3rd, Southeast season? ### CONTEXT CREATE TABLE table_2402864_1 (year INTEGER, regular_season VARCHAR, league VARCHAR) ### ANSWER SELECT MIN(year) FROM table_2402864_1 WHERE regular_season = "3rd, Southeast" AND league = "USL PDL"</s>
{ "answer": "SELECT MIN(year) FROM table_2402864_1 WHERE regular_season = \"3rd, Southeast\" AND league = \"USL PDL\"", "context": "CREATE TABLE table_2402864_1 (year INTEGER, regular_season VARCHAR, league VARCHAR)", "question": "What was the earliest year where USL PDL played in 3rd, Southeast season?" }
### QUESTION List the name and count of each product in all orders. ### CONTEXT CREATE TABLE orders (order_id VARCHAR); CREATE TABLE products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR) ### ANSWER SELECT T3.product_name, COUNT(*) FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id</s>
{ "answer": "SELECT T3.product_name, COUNT(*) FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id", "context": "CREATE TABLE orders (order_id VARCHAR); CREATE TABLE products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR)", "question": "List the name and count of each product in all orders." }
### QUESTION What is the id of the order which has the most items? ### CONTEXT CREATE TABLE orders (order_id VARCHAR); CREATE TABLE order_items (order_id VARCHAR) ### ANSWER SELECT T1.order_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT T1.order_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE orders (order_id VARCHAR); CREATE TABLE order_items (order_id VARCHAR)", "question": "What is the id of the order which has the most items?" }
### QUESTION Find the distinct details of invoices which are created before 1989-09-03 or after 2007-12-25. ### CONTEXT CREATE TABLE invoices (invoice_details VARCHAR, invoice_date VARCHAR) ### ANSWER SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < "1989-09-03" OR invoice_date > "2007-12-25"</s>
{ "answer": "SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < \"1989-09-03\" OR invoice_date > \"2007-12-25\"", "context": "CREATE TABLE invoices (invoice_details VARCHAR, invoice_date VARCHAR)", "question": "Find the distinct details of invoices which are created before 1989-09-03 or after 2007-12-25." }
### QUESTION For each customer who has at least two orders, find the customer name and number of orders made. ### CONTEXT CREATE TABLE orders (customer_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR) ### ANSWER SELECT T2.customer_name, COUNT(*) FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING COUNT(*) >= 2</s>
{ "answer": "SELECT T2.customer_name, COUNT(*) FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING COUNT(*) >= 2", "context": "CREATE TABLE orders (customer_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR)", "question": "For each customer who has at least two orders, find the customer name and number of orders made." }
### QUESTION List the names of the customers who have once bought product "food". ### CONTEXT CREATE TABLE products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE orders (customer_id VARCHAR, order_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE order_items (product_id VARCHAR, order_id VARCHAR) ### ANSWER SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T4.product_name = "food" GROUP BY T1.customer_id HAVING COUNT(*) >= 1</s>
{ "answer": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T4.product_name = \"food\" GROUP BY T1.customer_id HAVING COUNT(*) >= 1", "context": "CREATE TABLE products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE orders (customer_id VARCHAR, order_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE order_items (product_id VARCHAR, order_id VARCHAR)", "question": "List the names of the customers who have once bought product \"food\"." }
### QUESTION List the names of customers who have once canceled the purchase of the product "food" (the item status is "Cancel"). ### CONTEXT CREATE TABLE orders (customer_id VARCHAR, order_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR); CREATE TABLE order_items (product_id VARCHAR, order_item_status VARCHAR, order_id VARCHAR) ### ANSWER SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T3.order_item_status = "Cancel" AND T4.product_name = "food" GROUP BY T1.customer_id HAVING COUNT(*) >= 1</s>
{ "answer": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T3.order_item_status = \"Cancel\" AND T4.product_name = \"food\" GROUP BY T1.customer_id HAVING COUNT(*) >= 1", "context": "CREATE TABLE orders (customer_id VARCHAR, order_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR); CREATE TABLE order_items (product_id VARCHAR, order_item_status VARCHAR, order_id VARCHAR)", "question": "List the names of customers who have once canceled the purchase of the product \"food\" (the item status is \"Cancel\")." }
### QUESTION How many times is the award ceremony laurence olivier award, result is won and the nominee is imelda staunton? ### CONTEXT CREATE TABLE table_name_3 (year VARCHAR, nominee VARCHAR, award_ceremony VARCHAR, result VARCHAR) ### ANSWER SELECT COUNT(year) FROM table_name_3 WHERE award_ceremony = "laurence olivier award" AND result = "won" AND nominee = "imelda staunton"</s>
{ "answer": "SELECT COUNT(year) FROM table_name_3 WHERE award_ceremony = \"laurence olivier award\" AND result = \"won\" AND nominee = \"imelda staunton\"", "context": "CREATE TABLE table_name_3 (year VARCHAR, nominee VARCHAR, award_ceremony VARCHAR, result VARCHAR)", "question": "How many times is the award ceremony laurence olivier award, result is won and the nominee is imelda staunton?" }
### QUESTION What Hometown/School had a pick above 30, position of OF and team of Cleveland Indians? ### CONTEXT CREATE TABLE table_name_79 (hometown_school VARCHAR, team VARCHAR, pick VARCHAR, position VARCHAR) ### ANSWER SELECT hometown_school FROM table_name_79 WHERE pick > 30 AND position = "of" AND team = "cleveland indians"</s>
{ "answer": "SELECT hometown_school FROM table_name_79 WHERE pick > 30 AND position = \"of\" AND team = \"cleveland indians\"", "context": "CREATE TABLE table_name_79 (hometown_school VARCHAR, team VARCHAR, pick VARCHAR, position VARCHAR)", "question": "What Hometown/School had a pick above 30, position of OF and team of Cleveland Indians?" }
### QUESTION What is the average Wins, when Against is less than 1786, when Losses is less than 4, and when Byes is less than 2? ### CONTEXT CREATE TABLE table_name_51 (wins INTEGER, byes VARCHAR, against VARCHAR, losses VARCHAR) ### ANSWER SELECT AVG(wins) FROM table_name_51 WHERE against < 1786 AND losses < 4 AND byes < 2</s>
{ "answer": "SELECT AVG(wins) FROM table_name_51 WHERE against < 1786 AND losses < 4 AND byes < 2", "context": "CREATE TABLE table_name_51 (wins INTEGER, byes VARCHAR, against VARCHAR, losses VARCHAR)", "question": "What is the average Wins, when Against is less than 1786, when Losses is less than 4, and when Byes is less than 2?" }
### QUESTION How many production codes were in series 39? ### CONTEXT CREATE TABLE table_2409041_3 (production_code VARCHAR, no_in_series VARCHAR) ### ANSWER SELECT COUNT(production_code) FROM table_2409041_3 WHERE no_in_series = 39</s>
{ "answer": "SELECT COUNT(production_code) FROM table_2409041_3 WHERE no_in_series = 39", "context": "CREATE TABLE table_2409041_3 (production_code VARCHAR, no_in_series VARCHAR)", "question": "How many production codes were in series 39?" }
### QUESTION What is Builder, when Country is "United Kingdom", and when Location is "Chatham, Kent"? ### CONTEXT CREATE TABLE table_name_35 (builder VARCHAR, country VARCHAR, location VARCHAR) ### ANSWER SELECT builder FROM table_name_35 WHERE country = "united kingdom" AND location = "chatham, kent"</s>
{ "answer": "SELECT builder FROM table_name_35 WHERE country = \"united kingdom\" AND location = \"chatham, kent\"", "context": "CREATE TABLE table_name_35 (builder VARCHAR, country VARCHAR, location VARCHAR)", "question": "What is Builder, when Country is \"United Kingdom\", and when Location is \"Chatham, Kent\"?" }
### QUESTION What are the ids and names of the architects who built at least 3 bridges ? ### CONTEXT CREATE TABLE architect (id VARCHAR, name VARCHAR); CREATE TABLE bridge (architect_id VARCHAR) ### ANSWER SELECT T1.id, T1.name FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING COUNT(*) >= 3</s>
{ "answer": "SELECT T1.id, T1.name FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING COUNT(*) >= 3", "context": "CREATE TABLE architect (id VARCHAR, name VARCHAR); CREATE TABLE bridge (architect_id VARCHAR)", "question": "What are the ids and names of the architects who built at least 3 bridges ?" }
### QUESTION What is the id, name and nationality of the architect who built most mills? ### CONTEXT CREATE TABLE architect (id VARCHAR, name VARCHAR, nationality VARCHAR); CREATE TABLE mill (architect_id VARCHAR) ### ANSWER SELECT T1.id, T1.name, T1.nationality FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT T1.id, T1.name, T1.nationality FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE architect (id VARCHAR, name VARCHAR, nationality VARCHAR); CREATE TABLE mill (architect_id VARCHAR)", "question": "What is the id, name and nationality of the architect who built most mills?" }
### QUESTION What are the ids, names and genders of the architects who built two bridges or one mill? ### CONTEXT CREATE TABLE mill (architect_id VARCHAR); CREATE TABLE architect (id VARCHAR, name VARCHAR, gender VARCHAR); CREATE TABLE bridge (architect_id VARCHAR) ### ANSWER SELECT T1.id, T1.name, T1.gender FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING COUNT(*) = 2 UNION SELECT T1.id, T1.name, T1.gender FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING COUNT(*) = 1</s>
{ "answer": "SELECT T1.id, T1.name, T1.gender FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING COUNT(*) = 2 UNION SELECT T1.id, T1.name, T1.gender FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING COUNT(*) = 1", "context": "CREATE TABLE mill (architect_id VARCHAR); CREATE TABLE architect (id VARCHAR, name VARCHAR, gender VARCHAR); CREATE TABLE bridge (architect_id VARCHAR)", "question": "What are the ids, names and genders of the architects who built two bridges or one mill?" }
### QUESTION What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters? ### CONTEXT CREATE TABLE architect (Id VARCHAR); CREATE TABLE mill (name VARCHAR, architect_id VARCHAR); CREATE TABLE bridge (architect_id VARCHAR, length_meters INTEGER) ### ANSWER SELECT DISTINCT T1.name FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id = T2.id JOIN bridge AS T3 ON T3.architect_id = T2.id WHERE T3.length_meters > 80</s>
{ "answer": "SELECT DISTINCT T1.name FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id = T2.id JOIN bridge AS T3 ON T3.architect_id = T2.id WHERE T3.length_meters > 80", "context": "CREATE TABLE architect (Id VARCHAR); CREATE TABLE mill (name VARCHAR, architect_id VARCHAR); CREATE TABLE bridge (architect_id VARCHAR, length_meters INTEGER)", "question": "What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters?" }
### QUESTION When 446004 is the production code who are the writers? ### CONTEXT CREATE TABLE table_2409041_2 (written_by VARCHAR, production_code VARCHAR) ### ANSWER SELECT written_by FROM table_2409041_2 WHERE production_code = 446004</s>
{ "answer": "SELECT written_by FROM table_2409041_2 WHERE production_code = 446004", "context": "CREATE TABLE table_2409041_2 (written_by VARCHAR, production_code VARCHAR)", "question": "When 446004 is the production code who are the writers?" }
### QUESTION How many architects haven't built a mill before year 1850? ### CONTEXT CREATE TABLE mill (id VARCHAR, architect_id VARCHAR, built_year INTEGER); CREATE TABLE architect (id VARCHAR, architect_id VARCHAR, built_year INTEGER) ### ANSWER SELECT COUNT(*) FROM architect WHERE NOT id IN (SELECT architect_id FROM mill WHERE built_year < 1850)</s>
{ "answer": "SELECT COUNT(*) FROM architect WHERE NOT id IN (SELECT architect_id FROM mill WHERE built_year < 1850)", "context": "CREATE TABLE mill (id VARCHAR, architect_id VARCHAR, built_year INTEGER); CREATE TABLE architect (id VARCHAR, architect_id VARCHAR, built_year INTEGER)", "question": "How many architects haven't built a mill before year 1850?" }
### QUESTION Show the years, book titles, and publishers for all books, in descending order by year. ### CONTEXT CREATE TABLE book_club (YEAR VARCHAR, book_title VARCHAR, publisher VARCHAR) ### ANSWER SELECT YEAR, book_title, publisher FROM book_club ORDER BY YEAR DESC</s>
{ "answer": "SELECT YEAR, book_title, publisher FROM book_club ORDER BY YEAR DESC", "context": "CREATE TABLE book_club (YEAR VARCHAR, book_title VARCHAR, publisher VARCHAR)", "question": "Show the years, book titles, and publishers for all books, in descending order by year." }
### QUESTION What is the region 1 (Canada) date associated with a region 2 (UK) date of May 18, 2009? ### CONTEXT CREATE TABLE table_240936_2 (region_1__can_ VARCHAR, region_2__uk_ VARCHAR) ### ANSWER SELECT region_1__can_ FROM table_240936_2 WHERE region_2__uk_ = "May 18, 2009"</s>
{ "answer": "SELECT region_1__can_ FROM table_240936_2 WHERE region_2__uk_ = \"May 18, 2009\"", "context": "CREATE TABLE table_240936_2 (region_1__can_ VARCHAR, region_2__uk_ VARCHAR)", "question": "What is the region 1 (Canada) date associated with a region 2 (UK) date of May 18, 2009?" }
### QUESTION Show publishers with a book published in 1989 and a book in 1990. ### CONTEXT CREATE TABLE book_club (publisher VARCHAR, YEAR VARCHAR) ### ANSWER SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990</s>
{ "answer": "SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990", "context": "CREATE TABLE book_club (publisher VARCHAR, YEAR VARCHAR)", "question": "Show publishers with a book published in 1989 and a book in 1990." }
### QUESTION List all company names with a book published by Alyson. ### CONTEXT CREATE TABLE culture_company (company_name VARCHAR, book_club_id VARCHAR); CREATE TABLE book_club (book_club_id VARCHAR, publisher VARCHAR) ### ANSWER SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id = T2.book_club_id WHERE T2.publisher = 'Alyson'</s>
{ "answer": "SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id = T2.book_club_id WHERE T2.publisher = 'Alyson'", "context": "CREATE TABLE culture_company (company_name VARCHAR, book_club_id VARCHAR); CREATE TABLE book_club (book_club_id VARCHAR, publisher VARCHAR)", "question": "List all company names with a book published by Alyson." }
### QUESTION Show the movie titles and book titles for all companies in China. ### CONTEXT CREATE TABLE movie (title VARCHAR, movie_id VARCHAR); CREATE TABLE culture_company (movie_id VARCHAR, book_club_id VARCHAR, incorporated_in VARCHAR); CREATE TABLE book_club (book_title VARCHAR, book_club_id VARCHAR) ### ANSWER SELECT T1.title, T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id JOIN book_club AS T3 ON T3.book_club_id = T2.book_club_id WHERE T2.incorporated_in = 'China'</s>
{ "answer": "SELECT T1.title, T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id JOIN book_club AS T3 ON T3.book_club_id = T2.book_club_id WHERE T2.incorporated_in = 'China'", "context": "CREATE TABLE movie (title VARCHAR, movie_id VARCHAR); CREATE TABLE culture_company (movie_id VARCHAR, book_club_id VARCHAR, incorporated_in VARCHAR); CREATE TABLE book_club (book_title VARCHAR, book_club_id VARCHAR)", "question": "Show the movie titles and book titles for all companies in China." }
### QUESTION How many points were scored by the player with 79 goals and who played 38 games? ### CONTEXT CREATE TABLE table_name_32 (points VARCHAR, goals VARCHAR, games VARCHAR) ### ANSWER SELECT points FROM table_name_32 WHERE goals = "79" AND games = "38"</s>
{ "answer": "SELECT points FROM table_name_32 WHERE goals = \"79\" AND games = \"38\"", "context": "CREATE TABLE table_name_32 (points VARCHAR, goals VARCHAR, games VARCHAR)", "question": "How many points were scored by the player with 79 goals and who played 38 games?" }
### QUESTION Show the stadium name and capacity with most number of concerts in year 2014 or after. ### CONTEXT CREATE TABLE stadium (name VARCHAR, capacity VARCHAR, stadium_id VARCHAR); CREATE TABLE concert (stadium_id VARCHAR, year VARCHAR) ### ANSWER SELECT T2.name, T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year >= 2014 GROUP BY T2.stadium_id ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT T2.name, T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year >= 2014 GROUP BY T2.stadium_id ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE stadium (name VARCHAR, capacity VARCHAR, stadium_id VARCHAR); CREATE TABLE concert (stadium_id VARCHAR, year VARCHAR)", "question": "Show the stadium name and capacity with most number of concerts in year 2014 or after." }
### QUESTION What is the name and capacity of the stadium with the most concerts after 2013 ? ### CONTEXT CREATE TABLE concert (stadium_id VARCHAR, year INTEGER); CREATE TABLE stadium (name VARCHAR, capacity VARCHAR, stadium_id VARCHAR) ### ANSWER SELECT t2.name, t2.capacity FROM concert AS t1 JOIN stadium AS t2 ON t1.stadium_id = t2.stadium_id WHERE t1.year > 2013 GROUP BY t2.stadium_id ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT t2.name, t2.capacity FROM concert AS t1 JOIN stadium AS t2 ON t1.stadium_id = t2.stadium_id WHERE t1.year > 2013 GROUP BY t2.stadium_id ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE concert (stadium_id VARCHAR, year INTEGER); CREATE TABLE stadium (name VARCHAR, capacity VARCHAR, stadium_id VARCHAR)", "question": "What is the name and capacity of the stadium with the most concerts after 2013 ?" }
### QUESTION Show the name and theme for all concerts and the number of singers in each concert. ### CONTEXT CREATE TABLE singer_in_concert (concert_id VARCHAR); CREATE TABLE concert (concert_name VARCHAR, theme VARCHAR, concert_id VARCHAR) ### ANSWER SELECT T2.concert_name, T2.theme, COUNT(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T2.concert_id</s>
{ "answer": "SELECT T2.concert_name, T2.theme, COUNT(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T2.concert_id", "context": "CREATE TABLE singer_in_concert (concert_id VARCHAR); CREATE TABLE concert (concert_name VARCHAR, theme VARCHAR, concert_id VARCHAR)", "question": "Show the name and theme for all concerts and the number of singers in each concert." }
### QUESTION What are the names , themes , and number of singers for every concert ? ### CONTEXT CREATE TABLE singer_in_concert (concert_id VARCHAR); CREATE TABLE concert (concert_name VARCHAR, theme VARCHAR, concert_id VARCHAR) ### ANSWER SELECT t2.concert_name, t2.theme, COUNT(*) FROM singer_in_concert AS t1 JOIN concert AS t2 ON t1.concert_id = t2.concert_id GROUP BY t2.concert_id</s>
{ "answer": "SELECT t2.concert_name, t2.theme, COUNT(*) FROM singer_in_concert AS t1 JOIN concert AS t2 ON t1.concert_id = t2.concert_id GROUP BY t2.concert_id", "context": "CREATE TABLE singer_in_concert (concert_id VARCHAR); CREATE TABLE concert (concert_name VARCHAR, theme VARCHAR, concert_id VARCHAR)", "question": "What are the names , themes , and number of singers for every concert ?" }
### QUESTION List singer names and number of concerts for each singer. ### CONTEXT CREATE TABLE singer_in_concert (singer_id VARCHAR); CREATE TABLE singer (name VARCHAR, singer_id VARCHAR) ### ANSWER SELECT T2.name, COUNT(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id</s>
{ "answer": "SELECT T2.name, COUNT(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id", "context": "CREATE TABLE singer_in_concert (singer_id VARCHAR); CREATE TABLE singer (name VARCHAR, singer_id VARCHAR)", "question": "List singer names and number of concerts for each singer." }
### QUESTION List all singer names in concerts in year 2014. ### CONTEXT CREATE TABLE singer_in_concert (singer_id VARCHAR, concert_id VARCHAR); CREATE TABLE concert (concert_id VARCHAR, year VARCHAR); CREATE TABLE singer (name VARCHAR, singer_id VARCHAR) ### ANSWER SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014</s>
{ "answer": "SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014", "context": "CREATE TABLE singer_in_concert (singer_id VARCHAR, concert_id VARCHAR); CREATE TABLE concert (concert_id VARCHAR, year VARCHAR); CREATE TABLE singer (name VARCHAR, singer_id VARCHAR)", "question": "List all singer names in concerts in year 2014." }
### QUESTION Find the name and location of the stadiums which some concerts happened in the years of both 2014 and 2015. ### CONTEXT CREATE TABLE stadium (name VARCHAR, location VARCHAR, stadium_id VARCHAR); CREATE TABLE concert (stadium_id VARCHAR, Year VARCHAR) ### ANSWER SELECT T2.name, T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name, T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015</s>
{ "answer": "SELECT T2.name, T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name, T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015", "context": "CREATE TABLE stadium (name VARCHAR, location VARCHAR, stadium_id VARCHAR); CREATE TABLE concert (stadium_id VARCHAR, Year VARCHAR)", "question": "Find the name and location of the stadiums which some concerts happened in the years of both 2014 and 2015." }
### QUESTION Find the number of concerts happened in the stadium with the highest capacity . ### CONTEXT CREATE TABLE concert (stadium_id VARCHAR, capacity VARCHAR); CREATE TABLE stadium (stadium_id VARCHAR, capacity VARCHAR) ### ANSWER SELECT COUNT(*) FROM concert WHERE stadium_id = (SELECT stadium_id FROM stadium ORDER BY capacity DESC LIMIT 1)</s>
{ "answer": "SELECT COUNT(*) FROM concert WHERE stadium_id = (SELECT stadium_id FROM stadium ORDER BY capacity DESC LIMIT 1)", "context": "CREATE TABLE concert (stadium_id VARCHAR, capacity VARCHAR); CREATE TABLE stadium (stadium_id VARCHAR, capacity VARCHAR)", "question": "Find the number of concerts happened in the stadium with the highest capacity ." }
### QUESTION What in the series number of the episode written by Lauren Gussis? ### CONTEXT CREATE TABLE table_24132083_1 (no_in_series INTEGER, written_by VARCHAR) ### ANSWER SELECT MIN(no_in_series) FROM table_24132083_1 WHERE written_by = "Lauren Gussis"</s>
{ "answer": "SELECT MIN(no_in_series) FROM table_24132083_1 WHERE written_by = \"Lauren Gussis\"", "context": "CREATE TABLE table_24132083_1 (no_in_series INTEGER, written_by VARCHAR)", "question": "What in the series number of the episode written by Lauren Gussis?" }
### QUESTION On how many different dates did the episode directed by Marcos Siega and written by Scott Buck air for the first time? ### CONTEXT CREATE TABLE table_24132083_1 (original_air_date VARCHAR, directed_by VARCHAR, written_by VARCHAR) ### ANSWER SELECT COUNT(original_air_date) FROM table_24132083_1 WHERE directed_by = "Marcos Siega" AND written_by = "Scott Buck"</s>
{ "answer": "SELECT COUNT(original_air_date) FROM table_24132083_1 WHERE directed_by = \"Marcos Siega\" AND written_by = \"Scott Buck\"", "context": "CREATE TABLE table_24132083_1 (original_air_date VARCHAR, directed_by VARCHAR, written_by VARCHAR)", "question": "On how many different dates did the episode directed by Marcos Siega and written by Scott Buck air for the first time?" }
### QUESTION Find the number of dog pets that are raised by female students (with sex F). ### CONTEXT CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR); CREATE TABLE student (stuid VARCHAR, sex VARCHAR) ### ANSWER SELECT COUNT(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'</s>
{ "answer": "SELECT COUNT(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'", "context": "CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR); CREATE TABLE student (stuid VARCHAR, sex VARCHAR)", "question": "Find the number of dog pets that are raised by female students (with sex F)." }
### QUESTION Find the first name of students who have cat or dog pet. ### CONTEXT CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE student (Fname VARCHAR, stuid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR) ### ANSWER SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' OR T3.pettype = 'dog'</s>
{ "answer": "SELECT DISTINCT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' OR T3.pettype = 'dog'", "context": "CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE student (Fname VARCHAR, stuid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR)", "question": "Find the first name of students who have cat or dog pet." }
### QUESTION Find the first name of students who have both cat and dog pets . ### CONTEXT CREATE TABLE student (fname VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR) ### ANSWER SELECT t1.fname FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid JOIN pets AS t3 ON t3.petid = t2.petid WHERE t3.pettype = 'cat' INTERSECT SELECT t1.fname FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid JOIN pets AS t3 ON t3.petid = t2.petid WHERE t3.pettype = 'dog'</s>
{ "answer": "SELECT t1.fname FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid JOIN pets AS t3 ON t3.petid = t2.petid WHERE t3.pettype = 'cat' INTERSECT SELECT t1.fname FROM student AS t1 JOIN has_pet AS t2 ON t1.stuid = t2.stuid JOIN pets AS t3 ON t3.petid = t2.petid WHERE t3.pettype = 'dog'", "context": "CREATE TABLE student (fname VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR)", "question": "Find the first name of students who have both cat and dog pets ." }
### QUESTION What are the students' first names who have both cats and dogs as pets? ### CONTEXT CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE student (Fname VARCHAR, stuid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR) ### ANSWER SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog'</s>
{ "answer": "SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog'", "context": "CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE student (Fname VARCHAR, stuid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR)", "question": "What are the students' first names who have both cats and dogs as pets?" }
### QUESTION Find the major and age of students who do not have a cat pet. ### CONTEXT CREATE TABLE student (stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR); CREATE TABLE student (major VARCHAR, age VARCHAR, stuid VARCHAR) ### ANSWER SELECT major, age FROM student WHERE NOT stuid IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')</s>
{ "answer": "SELECT major, age FROM student WHERE NOT stuid IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "context": "CREATE TABLE student (stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR); CREATE TABLE student (major VARCHAR, age VARCHAR, stuid VARCHAR)", "question": "Find the major and age of students who do not have a cat pet." }
### QUESTION Find the id of students who do not have a cat pet. ### CONTEXT CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR); CREATE TABLE student (stuid VARCHAR) ### ANSWER SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat'</s>
{ "answer": "SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat'", "context": "CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR); CREATE TABLE student (stuid VARCHAR)", "question": "Find the id of students who do not have a cat pet." }
### QUESTION Find the first name and age of students who have a dog but do not have a cat as a pet. ### CONTEXT CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE student (fname VARCHAR, age VARCHAR, stuid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR) ### ANSWER SELECT T1.fname, T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND NOT T1.stuid IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')</s>
{ "answer": "SELECT T1.fname, T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND NOT T1.stuid IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat')", "context": "CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE student (fname VARCHAR, age VARCHAR, stuid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR)", "question": "Find the first name and age of students who have a dog but do not have a cat as a pet." }
### QUESTION Find the average weight for each pet type. ### CONTEXT CREATE TABLE pets (pettype VARCHAR, weight INTEGER) ### ANSWER SELECT AVG(weight), pettype FROM pets GROUP BY pettype</s>
{ "answer": "SELECT AVG(weight), pettype FROM pets GROUP BY pettype", "context": "CREATE TABLE pets (pettype VARCHAR, weight INTEGER)", "question": "Find the average weight for each pet type." }
### QUESTION Find the id of the pet owned by student whose last name is ‘Smith’. ### CONTEXT CREATE TABLE has_pet (petid VARCHAR, stuid VARCHAR); CREATE TABLE student (stuid VARCHAR, Lname VARCHAR) ### ANSWER SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'</s>
{ "answer": "SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'", "context": "CREATE TABLE has_pet (petid VARCHAR, stuid VARCHAR); CREATE TABLE student (stuid VARCHAR, Lname VARCHAR)", "question": "Find the id of the pet owned by student whose last name is ‘Smith’." }
### QUESTION Find the first name and gender of student who have more than one pet. ### CONTEXT CREATE TABLE student (fname VARCHAR, sex VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR) ### ANSWER SELECT T1.fname, T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING COUNT(*) > 1</s>
{ "answer": "SELECT T1.fname, T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING COUNT(*) > 1", "context": "CREATE TABLE student (fname VARCHAR, sex VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR)", "question": "Find the first name and gender of student who have more than one pet." }
### QUESTION Find the last name of the student who has a cat that is age 3. ### CONTEXT CREATE TABLE student (lname VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pet_age VARCHAR, pettype VARCHAR) ### ANSWER SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'</s>
{ "answer": "SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'", "context": "CREATE TABLE student (lname VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pet_age VARCHAR, pettype VARCHAR)", "question": "Find the last name of the student who has a cat that is age 3." }
### QUESTION How many countries does each continent have? List the continent id, continent name and the number of countries. ### CONTEXT CREATE TABLE COUNTRIES (Continent VARCHAR); CREATE TABLE CONTINENTS (ContId VARCHAR, Continent VARCHAR) ### ANSWER SELECT T1.ContId, T1.Continent, COUNT(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId</s>
{ "answer": "SELECT T1.ContId, T1.Continent, COUNT(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId", "context": "CREATE TABLE COUNTRIES (Continent VARCHAR); CREATE TABLE CONTINENTS (ContId VARCHAR, Continent VARCHAR)", "question": "How many countries does each continent have? List the continent id, continent name and the number of countries." }
### QUESTION Who were the children of Benjamin Harrison? ### CONTEXT CREATE TABLE table_24143253_5 (children_together VARCHAR, name VARCHAR) ### ANSWER SELECT children_together FROM table_24143253_5 WHERE name = "Benjamin Harrison"</s>
{ "answer": "SELECT children_together FROM table_24143253_5 WHERE name = \"Benjamin Harrison\"", "context": "CREATE TABLE table_24143253_5 (children_together VARCHAR, name VARCHAR)", "question": "Who were the children of Benjamin Harrison?" }
### QUESTION How many models does each car maker produce? List maker full name, id and the number. ### CONTEXT CREATE TABLE MODEL_LIST (Maker VARCHAR); CREATE TABLE CAR_MAKERS (FullName VARCHAR, Id VARCHAR) ### ANSWER SELECT T1.FullName, T1.Id, COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id</s>
{ "answer": "SELECT T1.FullName, T1.Id, COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id", "context": "CREATE TABLE MODEL_LIST (Maker VARCHAR); CREATE TABLE CAR_MAKERS (FullName VARCHAR, Id VARCHAR)", "question": "How many models does each car maker produce? List maker full name, id and the number." }
### QUESTION Name the lessons taught for episode # 2/205 ### CONTEXT CREATE TABLE table_24172078_2 (lessons_taught VARCHAR, episode__number VARCHAR) ### ANSWER SELECT lessons_taught FROM table_24172078_2 WHERE episode__number = "2/205"</s>
{ "answer": "SELECT lessons_taught FROM table_24172078_2 WHERE episode__number = \"2/205\"", "context": "CREATE TABLE table_24172078_2 (lessons_taught VARCHAR, episode__number VARCHAR)", "question": "Name the lessons taught for episode # 2/205" }
### QUESTION Find the name of the makers that produced some cars in the year of 1970? ### CONTEXT CREATE TABLE MODEL_LIST (Maker VARCHAR, model VARCHAR); CREATE TABLE CAR_MAKERS (Maker VARCHAR, Id VARCHAR); CREATE TABLE CARS_DATA (id VARCHAR, year VARCHAR); CREATE TABLE CAR_NAMES (model VARCHAR, MakeId VARCHAR) ### ANSWER SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970'</s>
{ "answer": "SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970'", "context": "CREATE TABLE MODEL_LIST (Maker VARCHAR, model VARCHAR); CREATE TABLE CAR_MAKERS (Maker VARCHAR, Id VARCHAR); CREATE TABLE CARS_DATA (id VARCHAR, year VARCHAR); CREATE TABLE CAR_NAMES (model VARCHAR, MakeId VARCHAR)", "question": "Find the name of the makers that produced some cars in the year of 1970?" }
### QUESTION Find the make and production time of the cars that were produced in the earliest year? ### CONTEXT CREATE TABLE CARS_DATA (YEAR INTEGER); CREATE TABLE CAR_NAMES (Make VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (Year VARCHAR, Id VARCHAR) ### ANSWER SELECT T2.Make, T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT MIN(YEAR) FROM CARS_DATA)</s>
{ "answer": "SELECT T2.Make, T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T1.Year = (SELECT MIN(YEAR) FROM CARS_DATA)", "context": "CREATE TABLE CARS_DATA (YEAR INTEGER); CREATE TABLE CAR_NAMES (Make VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (Year VARCHAR, Id VARCHAR)", "question": "Find the make and production time of the cars that were produced in the earliest year?" }
### QUESTION Which Pick # has a League from of ontario hockey league, a Nationality of united states, and a Team from of brampton battalion? ### CONTEXT CREATE TABLE table_name_61 (pick__number VARCHAR, team_from VARCHAR, league_from VARCHAR, nationality VARCHAR) ### ANSWER SELECT COUNT(pick__number) FROM table_name_61 WHERE league_from = "ontario hockey league" AND nationality = "united states" AND team_from = "brampton battalion"</s>
{ "answer": "SELECT COUNT(pick__number) FROM table_name_61 WHERE league_from = \"ontario hockey league\" AND nationality = \"united states\" AND team_from = \"brampton battalion\"", "context": "CREATE TABLE table_name_61 (pick__number VARCHAR, team_from VARCHAR, league_from VARCHAR, nationality VARCHAR)", "question": "Which Pick # has a League from of ontario hockey league, a Nationality of united states, and a Team from of brampton battalion?" }
### QUESTION How many car makers are there in each continents? List the continent name and the count. ### CONTEXT CREATE TABLE COUNTRIES (continent VARCHAR, CountryId VARCHAR); CREATE TABLE CONTINENTS (Continent VARCHAR, ContId VARCHAR); CREATE TABLE car_makers (Country VARCHAR) ### ANSWER SELECT T1.Continent, COUNT(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent</s>
{ "answer": "SELECT T1.Continent, COUNT(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.continent JOIN car_makers AS T3 ON T2.CountryId = T3.Country GROUP BY T1.Continent", "context": "CREATE TABLE COUNTRIES (continent VARCHAR, CountryId VARCHAR); CREATE TABLE CONTINENTS (Continent VARCHAR, ContId VARCHAR); CREATE TABLE car_makers (Country VARCHAR)", "question": "How many car makers are there in each continents? List the continent name and the count." }
### QUESTION Name the successor for vacant and december 3, 1862 ### CONTEXT CREATE TABLE table_2417330_4 (successor VARCHAR, reason_for_change VARCHAR, date_successor_seated VARCHAR) ### ANSWER SELECT successor FROM table_2417330_4 WHERE reason_for_change = "Vacant" AND date_successor_seated = "December 3, 1862"</s>
{ "answer": "SELECT successor FROM table_2417330_4 WHERE reason_for_change = \"Vacant\" AND date_successor_seated = \"December 3, 1862\"", "context": "CREATE TABLE table_2417330_4 (successor VARCHAR, reason_for_change VARCHAR, date_successor_seated VARCHAR)", "question": "Name the successor for vacant and december 3, 1862" }
### QUESTION Who was the successor for vacant louisiana 5th ### CONTEXT CREATE TABLE table_2417340_4 (successor VARCHAR, vacator VARCHAR, district VARCHAR) ### ANSWER SELECT successor FROM table_2417340_4 WHERE vacator = "Vacant" AND district = "Louisiana 5th"</s>
{ "answer": "SELECT successor FROM table_2417340_4 WHERE vacator = \"Vacant\" AND district = \"Louisiana 5th\"", "context": "CREATE TABLE table_2417340_4 (successor VARCHAR, vacator VARCHAR, district VARCHAR)", "question": "Who was the successor for vacant louisiana 5th" }
### QUESTION What is the number of car models that are produced by each maker and what is the id and full name of each maker? ### CONTEXT CREATE TABLE CAR_MAKERS (FullName VARCHAR, id VARCHAR, Id VARCHAR); CREATE TABLE MODEL_LIST (Maker VARCHAR) ### ANSWER SELECT COUNT(*), T2.FullName, T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id</s>
{ "answer": "SELECT COUNT(*), T2.FullName, T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id", "context": "CREATE TABLE CAR_MAKERS (FullName VARCHAR, id VARCHAR, Id VARCHAR); CREATE TABLE MODEL_LIST (Maker VARCHAR)", "question": "What is the number of car models that are produced by each maker and what is the id and full name of each maker?" }
### QUESTION Which distinct car models are the produced after 1980? ### CONTEXT CREATE TABLE CARS_DATA (id VARCHAR, year INTEGER); CREATE TABLE MODEL_LIST (model VARCHAR); CREATE TABLE CAR_NAMES (model VARCHAR, MakeId VARCHAR) ### ANSWER SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980</s>
{ "answer": "SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980", "context": "CREATE TABLE CARS_DATA (id VARCHAR, year INTEGER); CREATE TABLE MODEL_LIST (model VARCHAR); CREATE TABLE CAR_NAMES (model VARCHAR, MakeId VARCHAR)", "question": "Which distinct car models are the produced after 1980?" }
### QUESTION Who was the successor that was formally installed on March 30, 1870? ### CONTEXT CREATE TABLE table_2417345_3 (successor VARCHAR, date_of_successors_formal_installation VARCHAR) ### ANSWER SELECT successor FROM table_2417345_3 WHERE date_of_successors_formal_installation = "March 30, 1870"</s>
{ "answer": "SELECT successor FROM table_2417345_3 WHERE date_of_successors_formal_installation = \"March 30, 1870\"", "context": "CREATE TABLE table_2417345_3 (successor VARCHAR, date_of_successors_formal_installation VARCHAR)", "question": "Who was the successor that was formally installed on March 30, 1870?" }
### QUESTION Who won Miss Universe Philippines when the first runner-up was Danielle Castaño and Janina San Miguel won Binibining Pilipinas-World? ### CONTEXT CREATE TABLE table_name_82 (miss_universe_philippines VARCHAR, first_runner_up VARCHAR, binibining_pilipinas_world VARCHAR) ### ANSWER SELECT miss_universe_philippines FROM table_name_82 WHERE first_runner_up = "danielle castaño" AND binibining_pilipinas_world = "janina san miguel"</s>
{ "answer": "SELECT miss_universe_philippines FROM table_name_82 WHERE first_runner_up = \"danielle castaño\" AND binibining_pilipinas_world = \"janina san miguel\"", "context": "CREATE TABLE table_name_82 (miss_universe_philippines VARCHAR, first_runner_up VARCHAR, binibining_pilipinas_world VARCHAR)", "question": "Who won Miss Universe Philippines when the first runner-up was Danielle Castaño and Janina San Miguel won Binibining Pilipinas-World?" }
### QUESTION What are the countries having at least one car maker? List name and id. ### CONTEXT CREATE TABLE CAR_MAKERS (Country VARCHAR); CREATE TABLE COUNTRIES (CountryName VARCHAR, CountryId VARCHAR) ### ANSWER SELECT T1.CountryName, T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING COUNT(*) >= 1</s>
{ "answer": "SELECT T1.CountryName, T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.CountryId HAVING COUNT(*) >= 1", "context": "CREATE TABLE CAR_MAKERS (Country VARCHAR); CREATE TABLE COUNTRIES (CountryName VARCHAR, CountryId VARCHAR)", "question": "What are the countries having at least one car maker? List name and id." }
### QUESTION When frederick remann (r) is the vacator what is the reason for vacancy? ### CONTEXT CREATE TABLE table_2417445_4 (reason_for_vacancy VARCHAR, vacator VARCHAR) ### ANSWER SELECT reason_for_vacancy FROM table_2417445_4 WHERE vacator = "Frederick Remann (R)"</s>
{ "answer": "SELECT reason_for_vacancy FROM table_2417445_4 WHERE vacator = \"Frederick Remann (R)\"", "context": "CREATE TABLE table_2417445_4 (reason_for_vacancy VARCHAR, vacator VARCHAR)", "question": "When frederick remann (r) is the vacator what is the reason for vacancy?" }
### QUESTION Which countries in europe have at least 3 car manufacturers? ### CONTEXT CREATE TABLE COUNTRIES (CountryName VARCHAR, Continent VARCHAR, CountryId VARCHAR); CREATE TABLE CONTINENTS (ContId VARCHAR, Continent VARCHAR); CREATE TABLE CAR_MAKERS (Country VARCHAR) ### ANSWER SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING COUNT(*) >= 3</s>
{ "answer": "SELECT T1.CountryName FROM COUNTRIES AS T1 JOIN CONTINENTS AS T2 ON T1.Continent = T2.ContId JOIN CAR_MAKERS AS T3 ON T1.CountryId = T3.Country WHERE T2.Continent = 'europe' GROUP BY T1.CountryName HAVING COUNT(*) >= 3", "context": "CREATE TABLE COUNTRIES (CountryName VARCHAR, Continent VARCHAR, CountryId VARCHAR); CREATE TABLE CONTINENTS (ContId VARCHAR, Continent VARCHAR); CREATE TABLE CAR_MAKERS (Country VARCHAR)", "question": "Which countries in europe have at least 3 car manufacturers?" }
### QUESTION When massachusetts 6th is the district what is the reason for vacancy? ### CONTEXT CREATE TABLE table_2417445_4 (reason_for_vacancy VARCHAR, district VARCHAR) ### ANSWER SELECT reason_for_vacancy FROM table_2417445_4 WHERE district = "Massachusetts 6th"</s>
{ "answer": "SELECT reason_for_vacancy FROM table_2417445_4 WHERE district = \"Massachusetts 6th\"", "context": "CREATE TABLE table_2417445_4 (reason_for_vacancy VARCHAR, district VARCHAR)", "question": "When massachusetts 6th is the district what is the reason for vacancy?" }
### QUESTION What was the reason for change to the successor that was seated on December 13, 1880? ### CONTEXT CREATE TABLE table_2417395_4 (reason_for_change VARCHAR, date_successor_seated VARCHAR) ### ANSWER SELECT reason_for_change FROM table_2417395_4 WHERE date_successor_seated = "December 13, 1880"</s>
{ "answer": "SELECT reason_for_change FROM table_2417395_4 WHERE date_successor_seated = \"December 13, 1880\"", "context": "CREATE TABLE table_2417395_4 (reason_for_change VARCHAR, date_successor_seated VARCHAR)", "question": "What was the reason for change to the successor that was seated on December 13, 1880?" }
### QUESTION What is the maximum horsepower and the make of the car models with 3 cylinders? ### CONTEXT CREATE TABLE CAR_NAMES (Make VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (horsepower VARCHAR, Id VARCHAR, cylinders VARCHAR) ### ANSWER SELECT T2.horsepower, T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1</s>
{ "answer": "SELECT T2.horsepower, T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.cylinders = 3 ORDER BY T2.horsepower DESC LIMIT 1", "context": "CREATE TABLE CAR_NAMES (Make VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (horsepower VARCHAR, Id VARCHAR, cylinders VARCHAR)", "question": "What is the maximum horsepower and the make of the car models with 3 cylinders?" }
### QUESTION Name the division for detroit diesel series 50egr allison wb-400r ### CONTEXT CREATE TABLE table_24193494_3 (division VARCHAR, powertrain__engine_transmission_ VARCHAR) ### ANSWER SELECT division FROM table_24193494_3 WHERE powertrain__engine_transmission_ = "Detroit Diesel Series 50EGR Allison WB-400R"</s>
{ "answer": "SELECT division FROM table_24193494_3 WHERE powertrain__engine_transmission_ = \"Detroit Diesel Series 50EGR Allison WB-400R\"", "context": "CREATE TABLE table_24193494_3 (division VARCHAR, powertrain__engine_transmission_ VARCHAR)", "question": "Name the division for detroit diesel series 50egr allison wb-400r" }
### QUESTION How many car models were produced by the maker with full name American Motor Company? ### CONTEXT CREATE TABLE CAR_MAKERS (Id VARCHAR, FullName VARCHAR); CREATE TABLE MODEL_LIST (Maker VARCHAR) ### ANSWER SELECT COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company'</s>
{ "answer": "SELECT COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker WHERE T1.FullName = 'American Motor Company'", "context": "CREATE TABLE CAR_MAKERS (Id VARCHAR, FullName VARCHAR); CREATE TABLE MODEL_LIST (Maker VARCHAR)", "question": "How many car models were produced by the maker with full name American Motor Company?" }
### QUESTION List the number of locations for the team known as the billikens. ### CONTEXT CREATE TABLE table_2419754_1 (location VARCHAR, nickname VARCHAR) ### ANSWER SELECT COUNT(location) FROM table_2419754_1 WHERE nickname = "Billikens"</s>
{ "answer": "SELECT COUNT(location) FROM table_2419754_1 WHERE nickname = \"Billikens\"", "context": "CREATE TABLE table_2419754_1 (location VARCHAR, nickname VARCHAR)", "question": "List the number of locations for the team known as the billikens." }
### QUESTION Which distinctive models are produced by maker with the full name General Motors or weighing more than 3500? ### CONTEXT CREATE TABLE MODEL_LIST (Model VARCHAR, Maker VARCHAR); CREATE TABLE CAR_MAKERS (Id VARCHAR, FullName VARCHAR); CREATE TABLE CAR_NAMES (Model VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (Id VARCHAR, weight VARCHAR) ### ANSWER SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500</s>
{ "answer": "SELECT DISTINCT T2.Model FROM CAR_NAMES AS T1 JOIN MODEL_LIST AS T2 ON T1.Model = T2.Model JOIN CAR_MAKERS AS T3 ON T2.Maker = T3.Id JOIN CARS_DATA AS T4 ON T1.MakeId = T4.Id WHERE T3.FullName = 'General Motors' OR T4.weight > 3500", "context": "CREATE TABLE MODEL_LIST (Model VARCHAR, Maker VARCHAR); CREATE TABLE CAR_MAKERS (Id VARCHAR, FullName VARCHAR); CREATE TABLE CAR_NAMES (Model VARCHAR, MakeId VARCHAR); CREATE TABLE CARS_DATA (Id VARCHAR, weight VARCHAR)", "question": "Which distinctive models are produced by maker with the full name General Motors or weighing more than 3500?" }
### QUESTION For model volvo, how many cylinders does the car with the least accelerate have? ### CONTEXT CREATE TABLE CARS_DATA (cylinders VARCHAR, Id VARCHAR, accelerate VARCHAR); CREATE TABLE CAR_NAMES (MakeId VARCHAR, Model VARCHAR) ### ANSWER SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate LIMIT 1</s>
{ "answer": "SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Model = 'volvo' ORDER BY T1.accelerate LIMIT 1", "context": "CREATE TABLE CARS_DATA (cylinders VARCHAR, Id VARCHAR, accelerate VARCHAR); CREATE TABLE CAR_NAMES (MakeId VARCHAR, Model VARCHAR)", "question": "For model volvo, how many cylinders does the car with the least accelerate have?" }
### QUESTION What number corresponds to the quantity of 24? ### CONTEXT CREATE TABLE table_name_50 (number_s_ VARCHAR, quantity VARCHAR) ### ANSWER SELECT number_s_ FROM table_name_50 WHERE quantity = "24"</s>
{ "answer": "SELECT number_s_ FROM table_name_50 WHERE quantity = \"24\"", "context": "CREATE TABLE table_name_50 (number_s_ VARCHAR, quantity VARCHAR)", "question": "What number corresponds to the quantity of 24?" }
### QUESTION How many countries has more than 2 car makers ? ### CONTEXT CREATE TABLE car_makers (country VARCHAR); CREATE TABLE countries (countryid VARCHAR) ### ANSWER SELECT COUNT(*) FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country GROUP BY t1.countryid HAVING COUNT(*) > 2</s>
{ "answer": "SELECT COUNT(*) FROM countries AS t1 JOIN car_makers AS t2 ON t1.countryid = t2.country GROUP BY t1.countryid HAVING COUNT(*) > 2", "context": "CREATE TABLE car_makers (country VARCHAR); CREATE TABLE countries (countryid VARCHAR)", "question": "How many countries has more than 2 car makers ?" }