text
stringlengths
150
1.06k
source
dict
### QUESTION Find the average grade point of student whose last name is Smith. ### CONTEXT CREATE TABLE ENROLLED_IN (Grade VARCHAR, StuID VARCHAR); CREATE TABLE STUDENT (LName VARCHAR, StuID VARCHAR); CREATE TABLE GRADECONVERSION (gradepoint INTEGER, lettergrade VARCHAR) ### ANSWER SELECT AVG(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.LName = "Smith"</s>
{ "answer": "SELECT AVG(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.LName = \"Smith\"", "context": "CREATE TABLE ENROLLED_IN (Grade VARCHAR, StuID VARCHAR); CREATE TABLE STUDENT (LName VARCHAR, StuID VARCHAR); CREATE TABLE GRADECONVERSION (gradepoint INTEGER, lettergrade VARCHAR)", "question": "Find the average grade point of student whose last name is Smith." }
### QUESTION What is the maximum and minimum grade point of students who live in NYC? ### CONTEXT CREATE TABLE ENROLLED_IN (Grade VARCHAR, StuID VARCHAR); CREATE TABLE STUDENT (city_code VARCHAR, StuID VARCHAR); CREATE TABLE GRADECONVERSION (gradepoint INTEGER, lettergrade VARCHAR) ### ANSWER SELECT MAX(T2.gradepoint), MIN(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = "NYC"</s>
{ "answer": "SELECT MAX(T2.gradepoint), MIN(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = \"NYC\"", "context": "CREATE TABLE ENROLLED_IN (Grade VARCHAR, StuID VARCHAR); CREATE TABLE STUDENT (city_code VARCHAR, StuID VARCHAR); CREATE TABLE GRADECONVERSION (gradepoint INTEGER, lettergrade VARCHAR)", "question": "What is the maximum and minimum grade point of students who live in NYC?" }
### QUESTION Name the high points for mo williams , lebron james , j.j. hickson (6) ### CONTEXT CREATE TABLE table_22654073_7 (high_points VARCHAR, high_rebounds VARCHAR) ### ANSWER SELECT COUNT(high_points) FROM table_22654073_7 WHERE high_rebounds = "Mo Williams , LeBron James , J.J. Hickson (6)"</s>
{ "answer": "SELECT COUNT(high_points) FROM table_22654073_7 WHERE high_rebounds = \"Mo Williams , LeBron James , J.J. Hickson (6)\"", "context": "CREATE TABLE table_22654073_7 (high_points VARCHAR, high_rebounds VARCHAR)", "question": "Name the high points for mo williams , lebron james , j.j. hickson (6)" }
### QUESTION How many scores are associated with a record of 27-9? ### CONTEXT CREATE TABLE table_22654073_8 (score VARCHAR, record VARCHAR) ### ANSWER SELECT COUNT(score) FROM table_22654073_8 WHERE record = "27-9"</s>
{ "answer": "SELECT COUNT(score) FROM table_22654073_8 WHERE record = \"27-9\"", "context": "CREATE TABLE table_22654073_8 (score VARCHAR, record VARCHAR)", "question": "How many scores are associated with a record of 27-9?" }
### QUESTION Which To par has a Country of united states, and a Score of 71-70=141? ### CONTEXT CREATE TABLE table_name_14 (to_par VARCHAR, country VARCHAR, score VARCHAR) ### ANSWER SELECT to_par FROM table_name_14 WHERE country = "united states" AND score = 71 - 70 = 141</s>
{ "answer": "SELECT to_par FROM table_name_14 WHERE country = \"united states\" AND score = 71 - 70 = 141", "context": "CREATE TABLE table_name_14 (to_par VARCHAR, country VARCHAR, score VARCHAR)", "question": "Which To par has a Country of united states, and a Score of 71-70=141?" }
### QUESTION What are the staff ids and genders of all staffs whose job title is Department Manager? ### CONTEXT CREATE TABLE staff_department_assignments (staff_id VARCHAR, job_title_code VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_gender VARCHAR) ### ANSWER SELECT T1.staff_id, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Department Manager"</s>
{ "answer": "SELECT T1.staff_id, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Department Manager\"", "context": "CREATE TABLE staff_department_assignments (staff_id VARCHAR, job_title_code VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_gender VARCHAR)", "question": "What are the staff ids and genders of all staffs whose job title is Department Manager?" }
### QUESTION Which Result has an Award of virgin media tv awards? ### CONTEXT CREATE TABLE table_name_45 (result VARCHAR, award VARCHAR) ### ANSWER SELECT result FROM table_name_45 WHERE award = "virgin media tv awards"</s>
{ "answer": "SELECT result FROM table_name_45 WHERE award = \"virgin media tv awards\"", "context": "CREATE TABLE table_name_45 (result VARCHAR, award VARCHAR)", "question": "Which Result has an Award of virgin media tv awards?" }
### QUESTION What are the name, phone number and email address of the customer who made the largest number of orders? ### CONTEXT CREATE TABLE customers (customer_name VARCHAR, customer_phone VARCHAR, customer_email VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR) ### ANSWER SELECT T1.customer_name, T1.customer_phone, T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT T1.customer_name, T1.customer_phone, T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE customers (customer_name VARCHAR, customer_phone VARCHAR, customer_email VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR)", "question": "What are the name, phone number and email address of the customer who made the largest number of orders?" }
### QUESTION How many department stores does the store chain South have? ### CONTEXT CREATE TABLE department_stores (dept_store_chain_id VARCHAR); CREATE TABLE department_store_chain (dept_store_chain_id VARCHAR, dept_store_chain_name VARCHAR) ### ANSWER SELECT COUNT(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = "South"</s>
{ "answer": "SELECT COUNT(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = \"South\"", "context": "CREATE TABLE department_stores (dept_store_chain_id VARCHAR); CREATE TABLE department_store_chain (dept_store_chain_id VARCHAR, dept_store_chain_name VARCHAR)", "question": "How many department stores does the store chain South have?" }
### QUESTION Which round has a win-loss result of loss and an edition of 2012 Fed Cup Europe/Africa Group I? ### CONTEXT CREATE TABLE table_22656187_9 (round VARCHAR, w_l VARCHAR, edition VARCHAR) ### ANSWER SELECT round FROM table_22656187_9 WHERE w_l = "Loss" AND edition = "2012 Fed Cup Europe/Africa Group I"</s>
{ "answer": "SELECT round FROM table_22656187_9 WHERE w_l = \"Loss\" AND edition = \"2012 Fed Cup Europe/Africa Group I\"", "context": "CREATE TABLE table_22656187_9 (round VARCHAR, w_l VARCHAR, edition VARCHAR)", "question": "Which round has a win-loss result of loss and an edition of 2012 Fed Cup Europe/Africa Group I?" }
### QUESTION Give me the product type, name and price for all the products supplied by supplier id 3. ### CONTEXT CREATE TABLE products (product_type_code VARCHAR, product_name VARCHAR, product_price VARCHAR, product_id VARCHAR); CREATE TABLE product_suppliers (product_id VARCHAR, supplier_id VARCHAR) ### ANSWER SELECT T2.product_type_code, T2.product_name, T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3</s>
{ "answer": "SELECT T2.product_type_code, T2.product_name, T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3", "context": "CREATE TABLE products (product_type_code VARCHAR, product_name VARCHAR, product_price VARCHAR, product_id VARCHAR); CREATE TABLE product_suppliers (product_id VARCHAR, supplier_id VARCHAR)", "question": "Give me the product type, name and price for all the products supplied by supplier id 3." }
### QUESTION Return the distinct name of customers whose order status is Pending, in the order of customer id. ### CONTEXT CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_status_code VARCHAR) ### ANSWER SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = "Pending" ORDER BY T2.customer_id</s>
{ "answer": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\" ORDER BY T2.customer_id", "context": "CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_status_code VARCHAR)", "question": "Return the distinct name of customers whose order status is Pending, in the order of customer id." }
### QUESTION Find the name and address of the customers who have both New and Pending orders. ### CONTEXT CREATE TABLE customers (customer_name VARCHAR, customer_address VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_status_code VARCHAR) ### ANSWER SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = "New" INTERSECT SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = "Pending"</s>
{ "answer": "SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"New\" INTERSECT SELECT T1.customer_name, T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\"", "context": "CREATE TABLE customers (customer_name VARCHAR, customer_address VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_status_code VARCHAR)", "question": "Find the name and address of the customers who have both New and Pending orders." }
### QUESTION Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products. ### CONTEXT CREATE TABLE products (product_id VARCHAR, product_price INTEGER); CREATE TABLE product_suppliers (product_id VARCHAR, supplier_id VARCHAR); CREATE TABLE products (product_price INTEGER) ### ANSWER SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT AVG(product_price) FROM products)</s>
{ "answer": "SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT AVG(product_price) FROM products)", "context": "CREATE TABLE products (product_id VARCHAR, product_price INTEGER); CREATE TABLE product_suppliers (product_id VARCHAR, supplier_id VARCHAR); CREATE TABLE products (product_price INTEGER)", "question": "Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products." }
### QUESTION What is the id and name of the department store that has both marketing and managing department? ### CONTEXT CREATE TABLE department_stores (dept_store_id VARCHAR, store_name VARCHAR); CREATE TABLE departments (dept_store_id VARCHAR, department_name VARCHAR) ### ANSWER SELECT T2.dept_store_id, T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = "marketing" INTERSECT SELECT T2.dept_store_id, T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = "managing"</s>
{ "answer": "SELECT T2.dept_store_id, T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"marketing\" INTERSECT SELECT T2.dept_store_id, T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"managing\"", "context": "CREATE TABLE department_stores (dept_store_id VARCHAR, store_name VARCHAR); CREATE TABLE departments (dept_store_id VARCHAR, department_name VARCHAR)", "question": "What is the id and name of the department store that has both marketing and managing department?" }
### QUESTION What is the name and job title of the staff who was assigned the latest? ### CONTEXT CREATE TABLE staff (staff_name VARCHAR, staff_id VARCHAR); CREATE TABLE staff_department_assignments (job_title_code VARCHAR, staff_id VARCHAR, date_assigned_to VARCHAR) ### ANSWER SELECT T1.staff_name, T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1</s>
{ "answer": "SELECT T1.staff_name, T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1", "context": "CREATE TABLE staff (staff_name VARCHAR, staff_id VARCHAR); CREATE TABLE staff_department_assignments (job_title_code VARCHAR, staff_id VARCHAR, date_assigned_to VARCHAR)", "question": "What is the name and job title of the staff who was assigned the latest?" }
### QUESTION Find the id and name of the staff who has been assigned for the shortest period. ### CONTEXT CREATE TABLE Staff_Department_Assignments (staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_name VARCHAR) ### ANSWER SELECT T1.staff_id, T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1</s>
{ "answer": "SELECT T1.staff_id, T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1", "context": "CREATE TABLE Staff_Department_Assignments (staff_id VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_name VARCHAR)", "question": "Find the id and name of the staff who has been assigned for the shortest period." }
### QUESTION Return the names and ids of all products whose price is between 600 and 700. ### CONTEXT CREATE TABLE products (product_name VARCHAR, product_id VARCHAR, product_price INTEGER) ### ANSWER SELECT product_name, product_id FROM products WHERE product_price BETWEEN 600 AND 700</s>
{ "answer": "SELECT product_name, product_id FROM products WHERE product_price BETWEEN 600 AND 700", "context": "CREATE TABLE products (product_name VARCHAR, product_id VARCHAR, product_price INTEGER)", "question": "Return the names and ids of all products whose price is between 600 and 700." }
### QUESTION What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff? ### CONTEXT CREATE TABLE Staff_Department_Assignments (staff_id VARCHAR, date_assigned_to INTEGER, job_title_code VARCHAR) ### ANSWER SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT MAX(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff')</s>
{ "answer": "SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT MAX(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff')", "context": "CREATE TABLE Staff_Department_Assignments (staff_id VARCHAR, date_assigned_to INTEGER, job_title_code VARCHAR)", "question": "What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff?" }
### QUESTION Who's the inventor when it was mutated from Redsport Type 2, has a stripe pattern and a spur habit? ### CONTEXT CREATE TABLE table_name_2 (mutated_from VARCHAR, habit VARCHAR, pattern VARCHAR) ### ANSWER SELECT "inventor" FROM table_name_2 WHERE habit = "spur" AND pattern = "stripe" AND mutated_from = "redsport type 2"</s>
{ "answer": "SELECT \"inventor\" FROM table_name_2 WHERE habit = \"spur\" AND pattern = \"stripe\" AND mutated_from = \"redsport type 2\"", "context": "CREATE TABLE table_name_2 (mutated_from VARCHAR, habit VARCHAR, pattern VARCHAR)", "question": "Who's the inventor when it was mutated from Redsport Type 2, has a stripe pattern and a spur habit?" }
### QUESTION List the name of staff who has been assigned multiple jobs. ### CONTEXT CREATE TABLE staff (staff_name VARCHAR, staff_id VARCHAR); CREATE TABLE staff_department_assignments (staff_id VARCHAR) ### ANSWER SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id HAVING COUNT(*) > 1</s>
{ "answer": "SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id HAVING COUNT(*) > 1", "context": "CREATE TABLE staff (staff_name VARCHAR, staff_id VARCHAR); CREATE TABLE staff_department_assignments (staff_id VARCHAR)", "question": "List the name of staff who has been assigned multiple jobs." }
### QUESTION List the name and phone number of all suppliers in the alphabetical order of their addresses. ### CONTEXT CREATE TABLE addresses (address_id VARCHAR, address_details VARCHAR); CREATE TABLE supplier_addresses (supplier_id VARCHAR, address_id VARCHAR); CREATE TABLE Suppliers (supplier_name VARCHAR, supplier_phone VARCHAR, supplier_id VARCHAR) ### ANSWER SELECT T1.supplier_name, T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details</s>
{ "answer": "SELECT T1.supplier_name, T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details", "context": "CREATE TABLE addresses (address_id VARCHAR, address_details VARCHAR); CREATE TABLE supplier_addresses (supplier_id VARCHAR, address_id VARCHAR); CREATE TABLE Suppliers (supplier_name VARCHAR, supplier_phone VARCHAR, supplier_id VARCHAR)", "question": "List the name and phone number of all suppliers in the alphabetical order of their addresses." }
### QUESTION Return the name and gender of the staff who was assigned in 2016. ### CONTEXT CREATE TABLE staff (staff_name VARCHAR, staff_gender VARCHAR, staff_id VARCHAR); CREATE TABLE staff_department_assignments (staff_id VARCHAR, date_assigned_from VARCHAR) ### ANSWER SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE "2016%"</s>
{ "answer": "SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE \"2016%\"", "context": "CREATE TABLE staff (staff_name VARCHAR, staff_gender VARCHAR, staff_id VARCHAR); CREATE TABLE staff_department_assignments (staff_id VARCHAR, date_assigned_from VARCHAR)", "question": "Return the name and gender of the staff who was assigned in 2016." }
### QUESTION Return the ids of all products that were ordered more than three times or supplied more than 80000. ### CONTEXT CREATE TABLE Order_Items (product_id VARCHAR, total_amount_purchased INTEGER); CREATE TABLE Product_Suppliers (product_id VARCHAR, total_amount_purchased INTEGER) ### ANSWER SELECT product_id FROM Order_Items GROUP BY product_id HAVING COUNT(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING SUM(total_amount_purchased) > 80000</s>
{ "answer": "SELECT product_id FROM Order_Items GROUP BY product_id HAVING COUNT(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING SUM(total_amount_purchased) > 80000", "context": "CREATE TABLE Order_Items (product_id VARCHAR, total_amount_purchased INTEGER); CREATE TABLE Product_Suppliers (product_id VARCHAR, total_amount_purchased INTEGER)", "question": "Return the ids of all products that were ordered more than three times or supplied more than 80000." }
### QUESTION What is the 0–100km/h (62mph) acceleration of the model with a top speed of 208km/h (129mph)? ### CONTEXT CREATE TABLE table_name_68 (top_speed VARCHAR) ### ANSWER SELECT 0 AS _100km_h__62mph_ FROM table_name_68 WHERE top_speed = "208km/h (129mph)"</s>
{ "answer": "SELECT 0 AS _100km_h__62mph_ FROM table_name_68 WHERE top_speed = \"208km/h (129mph)\"", "context": "CREATE TABLE table_name_68 (top_speed VARCHAR)", "question": "What is the 0–100km/h (62mph) acceleration of the model with a top speed of 208km/h (129mph)?" }
### QUESTION Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000. ### CONTEXT CREATE TABLE Product_Suppliers (supplier_id VARCHAR, total_amount_purchased INTEGER) ### ANSWER SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING AVG(total_amount_purchased) > 50000 OR AVG(total_amount_purchased) < 30000</s>
{ "answer": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING AVG(total_amount_purchased) > 50000 OR AVG(total_amount_purchased) < 30000", "context": "CREATE TABLE Product_Suppliers (supplier_id VARCHAR, total_amount_purchased INTEGER)", "question": "Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000." }
### QUESTION What are the average amount purchased and value purchased for the supplier who supplies the most products. ### CONTEXT CREATE TABLE Product_Suppliers (total_amount_purchased INTEGER, total_value_purchased INTEGER, supplier_id VARCHAR) ### ANSWER SELECT AVG(total_amount_purchased), AVG(total_value_purchased) FROM Product_Suppliers WHERE supplier_id = (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY COUNT(*) DESC LIMIT 1)</s>
{ "answer": "SELECT AVG(total_amount_purchased), AVG(total_value_purchased) FROM Product_Suppliers WHERE supplier_id = (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY COUNT(*) DESC LIMIT 1)", "context": "CREATE TABLE Product_Suppliers (total_amount_purchased INTEGER, total_value_purchased INTEGER, supplier_id VARCHAR)", "question": "What are the average amount purchased and value purchased for the supplier who supplies the most products." }
### QUESTION What is the total number of team classifications when the young rider classification leader was Salvatore Commesso and the combativity award winner was Jacky Durand? ### CONTEXT CREATE TABLE table_2267345_2 (team_classification VARCHAR, young_rider_classification VARCHAR, combativity_award VARCHAR) ### ANSWER SELECT COUNT(team_classification) FROM table_2267345_2 WHERE young_rider_classification = "Salvatore Commesso" AND combativity_award = "Jacky Durand"</s>
{ "answer": "SELECT COUNT(team_classification) FROM table_2267345_2 WHERE young_rider_classification = \"Salvatore Commesso\" AND combativity_award = \"Jacky Durand\"", "context": "CREATE TABLE table_2267345_2 (team_classification VARCHAR, young_rider_classification VARCHAR, combativity_award VARCHAR)", "question": "What is the total number of team classifications when the young rider classification leader was Salvatore Commesso and the combativity award winner was Jacky Durand?" }
### QUESTION Who was the general classification leader when the young rider classification leader was Salvatore Commesso and the winner was Erik Dekker? ### CONTEXT CREATE TABLE table_2267345_2 (general_classification VARCHAR, young_rider_classification VARCHAR, winner VARCHAR) ### ANSWER SELECT general_classification FROM table_2267345_2 WHERE young_rider_classification = "Salvatore Commesso" AND winner = "Erik Dekker"</s>
{ "answer": "SELECT general_classification FROM table_2267345_2 WHERE young_rider_classification = \"Salvatore Commesso\" AND winner = \"Erik Dekker\"", "context": "CREATE TABLE table_2267345_2 (general_classification VARCHAR, young_rider_classification VARCHAR, winner VARCHAR)", "question": "Who was the general classification leader when the young rider classification leader was Salvatore Commesso and the winner was Erik Dekker?" }
### QUESTION In what round did Al Unser win at Wisconsin State Fair Park Speedway? ### CONTEXT CREATE TABLE table_22673872_1 (rnd INTEGER, winning_driver VARCHAR, track VARCHAR) ### ANSWER SELECT MIN(rnd) FROM table_22673872_1 WHERE winning_driver = "Al Unser" AND track = "Wisconsin State Fair Park Speedway"</s>
{ "answer": "SELECT MIN(rnd) FROM table_22673872_1 WHERE winning_driver = \"Al Unser\" AND track = \"Wisconsin State Fair Park Speedway\"", "context": "CREATE TABLE table_22673872_1 (rnd INTEGER, winning_driver VARCHAR, track VARCHAR)", "question": "In what round did Al Unser win at Wisconsin State Fair Park Speedway? " }
### QUESTION List the names and phone numbers of all the distinct suppliers who supply red jeans. ### CONTEXT CREATE TABLE product_suppliers (supplier_id VARCHAR, product_id VARCHAR); CREATE TABLE suppliers (supplier_name VARCHAR, supplier_phone VARCHAR, supplier_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR) ### ANSWER SELECT DISTINCT T1.supplier_name, T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = "red jeans"</s>
{ "answer": "SELECT DISTINCT T1.supplier_name, T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = \"red jeans\"", "context": "CREATE TABLE product_suppliers (supplier_id VARCHAR, product_id VARCHAR); CREATE TABLE suppliers (supplier_name VARCHAR, supplier_phone VARCHAR, supplier_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR)", "question": "List the names and phone numbers of all the distinct suppliers who supply red jeans." }
### QUESTION List the names of all the distinct customers who bought a keyboard. ### CONTEXT CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR) ### ANSWER SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = "keyboard"</s>
{ "answer": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = \"keyboard\"", "context": "CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)", "question": "List the names of all the distinct customers who bought a keyboard." }
### QUESTION List the order id, customer id for orders in Cancelled status, ordered by their order dates. ### CONTEXT CREATE TABLE customer_orders (order_id VARCHAR, customer_id VARCHAR, order_status_code VARCHAR, order_date VARCHAR) ### ANSWER SELECT order_id, customer_id FROM customer_orders WHERE order_status_code = "Cancelled" ORDER BY order_date</s>
{ "answer": "SELECT order_id, customer_id FROM customer_orders WHERE order_status_code = \"Cancelled\" ORDER BY order_date", "context": "CREATE TABLE customer_orders (order_id VARCHAR, customer_id VARCHAR, order_status_code VARCHAR, order_date VARCHAR)", "question": "List the order id, customer id for orders in Cancelled status, ordered by their order dates." }
### QUESTION Find the names of products that were bought by at least two distinct customers. ### CONTEXT CREATE TABLE products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE customer_orders (order_id VARCHAR, customer_id VARCHAR); CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR) ### ANSWER SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT(DISTINCT T1.customer_id) >= 2</s>
{ "answer": "SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT(DISTINCT T1.customer_id) >= 2", "context": "CREATE TABLE products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE customer_orders (order_id VARCHAR, customer_id VARCHAR); CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR)", "question": "Find the names of products that were bought by at least two distinct customers." }
### QUESTION Find the names of customers who have bought by at least three distinct products. ### CONTEXT CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR) ### ANSWER SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT(DISTINCT T3.product_id) >= 3</s>
{ "answer": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT(DISTINCT T3.product_id) >= 3", "context": "CREATE TABLE order_items (order_id VARCHAR, product_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)", "question": "Find the names of customers who have bought by at least three distinct products." }
### QUESTION Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff. ### CONTEXT CREATE TABLE staff (staff_name VARCHAR, staff_gender VARCHAR, staff_id VARCHAR); CREATE TABLE Staff_Department_Assignments (staff_id VARCHAR, job_title_code VARCHAR) ### ANSWER SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Sales Person" EXCEPT SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Clerical Staff"</s>
{ "answer": "SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Sales Person\" EXCEPT SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Clerical Staff\"", "context": "CREATE TABLE staff (staff_name VARCHAR, staff_gender VARCHAR, staff_id VARCHAR); CREATE TABLE Staff_Department_Assignments (staff_id VARCHAR, job_title_code VARCHAR)", "question": "Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff." }
### QUESTION What is the smallest rate of burglary when forcible rape is 39.1 and motor vehicle theft is less than 568.8? ### CONTEXT CREATE TABLE table_name_90 (burglary INTEGER, forcible_rape VARCHAR, motor_vehicle_theft VARCHAR) ### ANSWER SELECT MIN(burglary) FROM table_name_90 WHERE forcible_rape = "39.1" AND motor_vehicle_theft < 568.8</s>
{ "answer": "SELECT MIN(burglary) FROM table_name_90 WHERE forcible_rape = \"39.1\" AND motor_vehicle_theft < 568.8", "context": "CREATE TABLE table_name_90 (burglary INTEGER, forcible_rape VARCHAR, motor_vehicle_theft VARCHAR)", "question": "What is the smallest rate of burglary when forcible rape is 39.1 and motor vehicle theft is less than 568.8?" }
### QUESTION What is the number for the international with 669 domestic earlier than 2005? ### CONTEXT CREATE TABLE table_name_78 (international INTEGER, domestic VARCHAR, year VARCHAR) ### ANSWER SELECT AVG(international) FROM table_name_78 WHERE domestic = 669 AND year < 2005</s>
{ "answer": "SELECT AVG(international) FROM table_name_78 WHERE domestic = 669 AND year < 2005", "context": "CREATE TABLE table_name_78 (international INTEGER, domestic VARCHAR, year VARCHAR)", "question": "What is the number for the international with 669 domestic earlier than 2005?" }
### QUESTION What is the largest issue date for an album that reached position of 3? ### CONTEXT CREATE TABLE table_name_6 (issue_date INTEGER, highest_position VARCHAR) ### ANSWER SELECT MAX(issue_date) FROM table_name_6 WHERE highest_position = 3</s>
{ "answer": "SELECT MAX(issue_date) FROM table_name_6 WHERE highest_position = 3", "context": "CREATE TABLE table_name_6 (issue_date INTEGER, highest_position VARCHAR)", "question": "What is the largest issue date for an album that reached position of 3?" }
### QUESTION What are the total number of Domestic Passengers of airports that contain the word "London". ### CONTEXT CREATE TABLE airport (Domestic_Passengers INTEGER, Airport_Name VARCHAR) ### ANSWER SELECT SUM(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%"</s>
{ "answer": "SELECT SUM(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE \"%London%\"", "context": "CREATE TABLE airport (Domestic_Passengers INTEGER, Airport_Name VARCHAR)", "question": "What are the total number of Domestic Passengers of airports that contain the word \"London\"." }
### QUESTION Please show the names of aircrafts associated with airport with name "London Gatwick". ### CONTEXT CREATE TABLE airport (Airport_ID VARCHAR, Airport_Name VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR); CREATE TABLE airport_aircraft (Aircraft_ID VARCHAR, Airport_ID VARCHAR) ### ANSWER SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick"</s>
{ "answer": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = \"London Gatwick\"", "context": "CREATE TABLE airport (Airport_ID VARCHAR, Airport_Name VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR); CREATE TABLE airport_aircraft (Aircraft_ID VARCHAR, Airport_ID VARCHAR)", "question": "Please show the names of aircrafts associated with airport with name \"London Gatwick\"." }
### QUESTION Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000. ### CONTEXT CREATE TABLE airport (Airport_ID VARCHAR, Total_Passengers INTEGER); CREATE TABLE aircraft (Aircraft VARCHAR, Description VARCHAR, Aircraft_ID VARCHAR); CREATE TABLE airport_aircraft (Aircraft_ID VARCHAR, Airport_ID VARCHAR) ### ANSWER SELECT T1.Aircraft, T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000</s>
{ "answer": "SELECT T1.Aircraft, T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000", "context": "CREATE TABLE airport (Airport_ID VARCHAR, Total_Passengers INTEGER); CREATE TABLE aircraft (Aircraft VARCHAR, Description VARCHAR, Aircraft_ID VARCHAR); CREATE TABLE airport_aircraft (Aircraft_ID VARCHAR, Airport_ID VARCHAR)", "question": "Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000." }
### QUESTION What is the average total number of passengers of airports that are associated with aircraft "Robinson R-22"? ### CONTEXT CREATE TABLE airport (Total_Passengers INTEGER, Airport_ID VARCHAR); CREATE TABLE aircraft (Aircraft_ID VARCHAR, Aircraft VARCHAR); CREATE TABLE airport_aircraft (Aircraft_ID VARCHAR, Airport_ID VARCHAR) ### ANSWER SELECT AVG(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = "Robinson R-22"</s>
{ "answer": "SELECT AVG(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = \"Robinson R-22\"", "context": "CREATE TABLE airport (Total_Passengers INTEGER, Airport_ID VARCHAR); CREATE TABLE aircraft (Aircraft_ID VARCHAR, Aircraft VARCHAR); CREATE TABLE airport_aircraft (Aircraft_ID VARCHAR, Airport_ID VARCHAR)", "question": "What is the average total number of passengers of airports that are associated with aircraft \"Robinson R-22\"?" }
### QUESTION Name the sprint classification being alejandro valverde ### CONTEXT CREATE TABLE table_22713796_14 (sprint_classification VARCHAR, winner VARCHAR) ### ANSWER SELECT sprint_classification FROM table_22713796_14 WHERE winner = "Alejandro Valverde"</s>
{ "answer": "SELECT sprint_classification FROM table_22713796_14 WHERE winner = \"Alejandro Valverde\"", "context": "CREATE TABLE table_22713796_14 (sprint_classification VARCHAR, winner VARCHAR)", "question": "Name the sprint classification being alejandro valverde" }
### QUESTION Name the most stage for alejandro valverde and astana greg henderson ### CONTEXT CREATE TABLE table_22713796_14 (stage INTEGER, winner VARCHAR, general_classification VARCHAR, team_classification VARCHAR) ### ANSWER SELECT MAX(stage) FROM table_22713796_14 WHERE general_classification = "Alejandro Valverde" AND team_classification = "Astana" AND winner = "Greg Henderson"</s>
{ "answer": "SELECT MAX(stage) FROM table_22713796_14 WHERE general_classification = \"Alejandro Valverde\" AND team_classification = \"Astana\" AND winner = \"Greg Henderson\"", "context": "CREATE TABLE table_22713796_14 (stage INTEGER, winner VARCHAR, general_classification VARCHAR, team_classification VARCHAR)", "question": "Name the most stage for alejandro valverde and astana greg henderson" }
### QUESTION Please list the location and the winning aircraft name. ### CONTEXT CREATE TABLE MATCH (Location VARCHAR, Winning_Aircraft VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR) ### ANSWER SELECT T2.Location, T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft</s>
{ "answer": "SELECT T2.Location, T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft", "context": "CREATE TABLE MATCH (Location VARCHAR, Winning_Aircraft VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR)", "question": "Please list the location and the winning aircraft name." }
### QUESTION How long has Mel Daniels been playing? ### CONTEXT CREATE TABLE table_22719663_3 (experience VARCHAR, name VARCHAR) ### ANSWER SELECT experience FROM table_22719663_3 WHERE name = "Mel Daniels"</s>
{ "answer": "SELECT experience FROM table_22719663_3 WHERE name = \"Mel Daniels\"", "context": "CREATE TABLE table_22719663_3 (experience VARCHAR, name VARCHAR)", "question": "How long has Mel Daniels been playing?" }
### QUESTION List the names of aircrafts and that won matches at least twice. ### CONTEXT CREATE TABLE MATCH (Winning_Aircraft VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR) ### ANSWER SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2</s>
{ "answer": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2", "context": "CREATE TABLE MATCH (Winning_Aircraft VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR)", "question": "List the names of aircrafts and that won matches at least twice." }
### QUESTION Show the names of aircrafts that are associated with both an airport named "London Heathrow" and an airport named "London Gatwick" ### CONTEXT CREATE TABLE airport (Airport_ID VARCHAR, Airport_Name VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR); CREATE TABLE airport_aircraft (Aircraft_ID VARCHAR, Airport_ID VARCHAR) ### ANSWER SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Heathrow" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick"</s>
{ "answer": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = \"London Heathrow\" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = \"London Gatwick\"", "context": "CREATE TABLE airport (Airport_ID VARCHAR, Airport_Name VARCHAR); CREATE TABLE aircraft (Aircraft VARCHAR, Aircraft_ID VARCHAR); CREATE TABLE airport_aircraft (Aircraft_ID VARCHAR, Airport_ID VARCHAR)", "question": "Show the names of aircrafts that are associated with both an airport named \"London Heathrow\" and an airport named \"London Gatwick\"" }
### QUESTION find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30. ### CONTEXT CREATE TABLE MATCH (winning_pilot VARCHAR); CREATE TABLE pilot (name VARCHAR, age INTEGER, pilot_id VARCHAR) ### ANSWER SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE MATCH (winning_pilot VARCHAR); CREATE TABLE pilot (name VARCHAR, age INTEGER, pilot_id VARCHAR)", "question": "find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30." }
### QUESTION What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'? ### CONTEXT CREATE TABLE services (service_type_code VARCHAR, organization_id VARCHAR); CREATE TABLE organizations (organization_id VARCHAR, organization_details VARCHAR) ### ANSWER SELECT DISTINCT T1.service_type_code FROM services AS T1 JOIN organizations AS T2 ON T1.organization_id = T2.organization_id WHERE T2.organization_details = 'Denesik and Sons Party'</s>
{ "answer": "SELECT DISTINCT T1.service_type_code FROM services AS T1 JOIN organizations AS T2 ON T1.organization_id = T2.organization_id WHERE T2.organization_details = 'Denesik and Sons Party'", "context": "CREATE TABLE services (service_type_code VARCHAR, organization_id VARCHAR); CREATE TABLE organizations (organization_id VARCHAR, organization_details VARCHAR)", "question": "What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'?" }
### QUESTION How many services has each resident requested? List the resident id, details, and the count in descending order of the count. ### CONTEXT CREATE TABLE Residents_Services (resident_id VARCHAR); CREATE TABLE Residents (resident_id VARCHAR, other_details VARCHAR) ### ANSWER SELECT T1.resident_id, T1.other_details, COUNT(*) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id = T2.resident_id GROUP BY T1.resident_id ORDER BY COUNT(*) DESC</s>
{ "answer": "SELECT T1.resident_id, T1.other_details, COUNT(*) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id = T2.resident_id GROUP BY T1.resident_id ORDER BY COUNT(*) DESC", "context": "CREATE TABLE Residents_Services (resident_id VARCHAR); CREATE TABLE Residents (resident_id VARCHAR, other_details VARCHAR)", "question": "How many services has each resident requested? List the resident id, details, and the count in descending order of the count." }
### QUESTION What is the maximum number that a certain service is provided? List the service id, details and number. ### CONTEXT CREATE TABLE Services (service_id VARCHAR, service_details VARCHAR); CREATE TABLE Residents_Services (service_id VARCHAR) ### ANSWER SELECT T1.service_id, T1.service_details, COUNT(*) FROM Services AS T1 JOIN Residents_Services AS T2 ON T1.service_id = T2.service_id GROUP BY T1.service_id ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT T1.service_id, T1.service_details, COUNT(*) FROM Services AS T1 JOIN Residents_Services AS T2 ON T1.service_id = T2.service_id GROUP BY T1.service_id ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE Services (service_id VARCHAR, service_details VARCHAR); CREATE TABLE Residents_Services (service_id VARCHAR)", "question": "What is the maximum number that a certain service is provided? List the service id, details and number." }
### QUESTION List the id and type of each thing, and the details of the organization that owns it. ### CONTEXT CREATE TABLE Organizations (organization_details VARCHAR, organization_id VARCHAR); CREATE TABLE Things (thing_id VARCHAR, type_of_Thing_Code VARCHAR, organization_id VARCHAR) ### ANSWER SELECT T1.thing_id, T1.type_of_Thing_Code, T2.organization_details FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id</s>
{ "answer": "SELECT T1.thing_id, T1.type_of_Thing_Code, T2.organization_details FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id", "context": "CREATE TABLE Organizations (organization_details VARCHAR, organization_id VARCHAR); CREATE TABLE Things (thing_id VARCHAR, type_of_Thing_Code VARCHAR, organization_id VARCHAR)", "question": "List the id and type of each thing, and the details of the organization that owns it." }
### QUESTION What is Injured, when Date is "09.15 Sep. 15"? ### CONTEXT CREATE TABLE table_name_98 (injured VARCHAR, date VARCHAR) ### ANSWER SELECT injured FROM table_name_98 WHERE date = "09.15 sep. 15"</s>
{ "answer": "SELECT injured FROM table_name_98 WHERE date = \"09.15 sep. 15\"", "context": "CREATE TABLE table_name_98 (injured VARCHAR, date VARCHAR)", "question": "What is Injured, when Date is \"09.15 Sep. 15\"?" }
### QUESTION What is each customer's move in date, and the corresponding customer id and details? ### CONTEXT CREATE TABLE Customer_Events (date_moved_in VARCHAR, customer_id VARCHAR); CREATE TABLE Customers (customer_id VARCHAR, customer_details VARCHAR) ### ANSWER SELECT T2.date_moved_in, T1.customer_id, T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id</s>
{ "answer": "SELECT T2.date_moved_in, T1.customer_id, T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id", "context": "CREATE TABLE Customer_Events (date_moved_in VARCHAR, customer_id VARCHAR); CREATE TABLE Customers (customer_id VARCHAR, customer_details VARCHAR)", "question": "What is each customer's move in date, and the corresponding customer id and details?" }
### QUESTION Which events have the number of notes between one and three? List the event id and the property id. ### CONTEXT CREATE TABLE Customer_Events (Customer_Event_ID VARCHAR, property_id VARCHAR, customer_event_id VARCHAR); CREATE TABLE Customer_Event_Notes (Customer_Event_ID VARCHAR) ### ANSWER SELECT T1.Customer_Event_ID, T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID = T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING COUNT(*) BETWEEN 1 AND 3</s>
{ "answer": "SELECT T1.Customer_Event_ID, T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID = T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING COUNT(*) BETWEEN 1 AND 3", "context": "CREATE TABLE Customer_Events (Customer_Event_ID VARCHAR, property_id VARCHAR, customer_event_id VARCHAR); CREATE TABLE Customer_Event_Notes (Customer_Event_ID VARCHAR)", "question": "Which events have the number of notes between one and three? List the event id and the property id." }
### QUESTION What are the distinct id and type of the thing that has the status 'Close' or has a status record before the date '2017-06-19 02:59:21' ### CONTEXT CREATE TABLE Timed_Status_of_Things (thing_id VARCHAR, Status_of_Thing_Code VARCHAR, Date_and_Date VARCHAR); CREATE TABLE Things (thing_id VARCHAR, Type_of_Thing_Code VARCHAR) ### ANSWER SELECT DISTINCT T2.thing_id, T2.Type_of_Thing_Code FROM Timed_Status_of_Things AS T1 JOIN Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.Status_of_Thing_Code = 'Close' OR T1.Date_and_Date < '2017-06-19 02:59:21'</s>
{ "answer": "SELECT DISTINCT T2.thing_id, T2.Type_of_Thing_Code FROM Timed_Status_of_Things AS T1 JOIN Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.Status_of_Thing_Code = 'Close' OR T1.Date_and_Date < '2017-06-19 02:59:21'", "context": "CREATE TABLE Timed_Status_of_Things (thing_id VARCHAR, Status_of_Thing_Code VARCHAR, Date_and_Date VARCHAR); CREATE TABLE Things (thing_id VARCHAR, Type_of_Thing_Code VARCHAR)", "question": "What are the distinct id and type of the thing that has the status 'Close' or has a status record before the date '2017-06-19 02:59:21'" }
### QUESTION How many distinct locations have the things with service detail 'Unsatisfied' been located in? ### CONTEXT CREATE TABLE Timed_Locations_of_Things (Location_Code VARCHAR, thing_id VARCHAR); CREATE TABLE Things (thing_id VARCHAR, service_details VARCHAR) ### ANSWER SELECT COUNT(DISTINCT T2.Location_Code) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.service_details = 'Unsatisfied'</s>
{ "answer": "SELECT COUNT(DISTINCT T2.Location_Code) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.service_details = 'Unsatisfied'", "context": "CREATE TABLE Timed_Locations_of_Things (Location_Code VARCHAR, thing_id VARCHAR); CREATE TABLE Things (thing_id VARCHAR, service_details VARCHAR)", "question": "How many distinct locations have the things with service detail 'Unsatisfied' been located in?" }
### QUESTION What is the earliest year with a Drama Desk award when the Mineola Twins was a nominated work? ### CONTEXT CREATE TABLE table_name_90 (year INTEGER, award VARCHAR, nominated_work VARCHAR) ### ANSWER SELECT MIN(year) FROM table_name_90 WHERE award = "drama desk award" AND nominated_work = "the mineola twins"</s>
{ "answer": "SELECT MIN(year) FROM table_name_90 WHERE award = \"drama desk award\" AND nominated_work = \"the mineola twins\"", "context": "CREATE TABLE table_name_90 (year INTEGER, award VARCHAR, nominated_work VARCHAR)", "question": "What is the earliest year with a Drama Desk award when the Mineola Twins was a nominated work?" }
### QUESTION What is the most recent year that the Mineola Twins was nominated for outstanding actress in a play and a Drama Desk award? ### CONTEXT CREATE TABLE table_name_54 (year INTEGER, award VARCHAR, nominated_work VARCHAR, category VARCHAR) ### ANSWER SELECT MAX(year) FROM table_name_54 WHERE nominated_work = "the mineola twins" AND category = "outstanding actress in a play" AND award = "drama desk award"</s>
{ "answer": "SELECT MAX(year) FROM table_name_54 WHERE nominated_work = \"the mineola twins\" AND category = \"outstanding actress in a play\" AND award = \"drama desk award\"", "context": "CREATE TABLE table_name_54 (year INTEGER, award VARCHAR, nominated_work VARCHAR, category VARCHAR)", "question": "What is the most recent year that the Mineola Twins was nominated for outstanding actress in a play and a Drama Desk award?" }
### QUESTION In what year was The House of Blue Leaves nominated for outstanding actress in a play? ### CONTEXT CREATE TABLE table_name_62 (year INTEGER, nominated_work VARCHAR, category VARCHAR) ### ANSWER SELECT SUM(year) FROM table_name_62 WHERE nominated_work = "the house of blue leaves" AND category = "outstanding actress in a play"</s>
{ "answer": "SELECT SUM(year) FROM table_name_62 WHERE nominated_work = \"the house of blue leaves\" AND category = \"outstanding actress in a play\"", "context": "CREATE TABLE table_name_62 (year INTEGER, nominated_work VARCHAR, category VARCHAR)", "question": "In what year was The House of Blue Leaves nominated for outstanding actress in a play?" }
### QUESTION How many winners have a runner-up of A. Karthikeyan? ### CONTEXT CREATE TABLE table_22753439_1 (winner VARCHAR, runner_up_a VARCHAR) ### ANSWER SELECT COUNT(winner) FROM table_22753439_1 WHERE runner_up_a = "A. Karthikeyan"</s>
{ "answer": "SELECT COUNT(winner) FROM table_22753439_1 WHERE runner_up_a = \"A. Karthikeyan\"", "context": "CREATE TABLE table_22753439_1 (winner VARCHAR, runner_up_a VARCHAR)", "question": "How many winners have a runner-up of A. Karthikeyan?" }
### QUESTION Which To par has a Year(s) won of 1983? ### CONTEXT CREATE TABLE table_name_15 (to_par VARCHAR, year_s__won VARCHAR) ### ANSWER SELECT to_par FROM table_name_15 WHERE year_s__won = "1983"</s>
{ "answer": "SELECT to_par FROM table_name_15 WHERE year_s__won = \"1983\"", "context": "CREATE TABLE table_name_15 (to_par VARCHAR, year_s__won VARCHAR)", "question": "Which To par has a Year(s) won of 1983?" }
### QUESTION How many customers did not have any event? ### CONTEXT CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE customer_events (customer_id VARCHAR) ### ANSWER SELECT COUNT(*) FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM customer_events)</s>
{ "answer": "SELECT COUNT(*) FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM customer_events)", "context": "CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE customer_events (customer_id VARCHAR)", "question": "How many customers did not have any event?" }
### QUESTION How many margin results are listed in the election that was won by L. Adaikalaraj C and the party was the Indian national congress? ### CONTEXT CREATE TABLE table_22753245_1 (margin VARCHAR, party VARCHAR, winner VARCHAR) ### ANSWER SELECT COUNT(margin) FROM table_22753245_1 WHERE party = "Indian National Congress" AND winner = "L. Adaikalaraj c"</s>
{ "answer": "SELECT COUNT(margin) FROM table_22753245_1 WHERE party = \"Indian National Congress\" AND winner = \"L. Adaikalaraj c\"", "context": "CREATE TABLE table_22753245_1 (margin VARCHAR, party VARCHAR, winner VARCHAR)", "question": "How many margin results are listed in the election that was won by L. Adaikalaraj C and the party was the Indian national congress? " }
### QUESTION Who had the pole position in the August 15, 1981 race? ### CONTEXT CREATE TABLE table_22765887_1 (pole_position VARCHAR, date VARCHAR) ### ANSWER SELECT pole_position FROM table_22765887_1 WHERE date = "August 15, 1981"</s>
{ "answer": "SELECT pole_position FROM table_22765887_1 WHERE date = \"August 15, 1981\"", "context": "CREATE TABLE table_22765887_1 (pole_position VARCHAR, date VARCHAR)", "question": "Who had the pole position in the August 15, 1981 race? " }
### QUESTION Show the locations of schools that have more than 1 player. ### CONTEXT CREATE TABLE player (School_ID VARCHAR); CREATE TABLE school (Location VARCHAR, School_ID VARCHAR) ### ANSWER SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1</s>
{ "answer": "SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1", "context": "CREATE TABLE player (School_ID VARCHAR); CREATE TABLE school (Location VARCHAR, School_ID VARCHAR)", "question": "Show the locations of schools that have more than 1 player." }
### QUESTION Name the extension for university of washington ### CONTEXT CREATE TABLE table_22771048_3 (extension VARCHAR, city_neighborhood VARCHAR) ### ANSWER SELECT extension FROM table_22771048_3 WHERE city_neighborhood = "University of Washington"</s>
{ "answer": "SELECT extension FROM table_22771048_3 WHERE city_neighborhood = \"University of Washington\"", "context": "CREATE TABLE table_22771048_3 (extension VARCHAR, city_neighborhood VARCHAR)", "question": "Name the extension for university of washington" }
### QUESTION List the locations of schools that do not have any player. ### CONTEXT CREATE TABLE school (LOCATION VARCHAR, School_ID VARCHAR); CREATE TABLE Player (LOCATION VARCHAR, School_ID VARCHAR) ### ANSWER SELECT LOCATION FROM school WHERE NOT School_ID IN (SELECT School_ID FROM Player)</s>
{ "answer": "SELECT LOCATION FROM school WHERE NOT School_ID IN (SELECT School_ID FROM Player)", "context": "CREATE TABLE school (LOCATION VARCHAR, School_ID VARCHAR); CREATE TABLE Player (LOCATION VARCHAR, School_ID VARCHAR)", "question": "List the locations of schools that do not have any player." }
### QUESTION Show the denomination shared by schools founded before 1890 and schools founded after 1900 ### CONTEXT CREATE TABLE school (Denomination VARCHAR, Founded INTEGER) ### ANSWER SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900</s>
{ "answer": "SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900", "context": "CREATE TABLE school (Denomination VARCHAR, Founded INTEGER)", "question": "Show the denomination shared by schools founded before 1890 and schools founded after 1900" }
### QUESTION Which Week has a Game site of oakland-alameda county coliseum, and an Attendance larger than 52,169? ### CONTEXT CREATE TABLE table_name_71 (week INTEGER, game_site VARCHAR, attendance VARCHAR) ### ANSWER SELECT MIN(week) FROM table_name_71 WHERE game_site = "oakland-alameda county coliseum" AND attendance > 52 OFFSET 169</s>
{ "answer": "SELECT MIN(week) FROM table_name_71 WHERE game_site = \"oakland-alameda county coliseum\" AND attendance > 52 OFFSET 169", "context": "CREATE TABLE table_name_71 (week INTEGER, game_site VARCHAR, attendance VARCHAR)", "question": "Which Week has a Game site of oakland-alameda county coliseum, and an Attendance larger than 52,169?" }
### QUESTION When the PCT route available is yes and the maximum term is 10 years, what are the available conversions from patent applications? ### CONTEXT CREATE TABLE table_2279413_1 (conversion_from_patent_application VARCHAR, maximum_term VARCHAR, pct_route_available VARCHAR) ### ANSWER SELECT conversion_from_patent_application FROM table_2279413_1 WHERE maximum_term = "10 years" AND pct_route_available = "Yes"</s>
{ "answer": "SELECT conversion_from_patent_application FROM table_2279413_1 WHERE maximum_term = \"10 years\" AND pct_route_available = \"Yes\"", "context": "CREATE TABLE table_2279413_1 (conversion_from_patent_application VARCHAR, maximum_term VARCHAR, pct_route_available VARCHAR)", "question": "When the PCT route available is yes and the maximum term is 10 years, what are the available conversions from patent applications?" }
### QUESTION How many names have a country of civ? ### CONTEXT CREATE TABLE table_22810095_8 (COUnT VARCHAR, country VARCHAR) ### ANSWER SELECT COUnT AS name FROM table_22810095_8 WHERE country = "CIV"</s>
{ "answer": "SELECT COUnT AS name FROM table_22810095_8 WHERE country = \"CIV\"", "context": "CREATE TABLE table_22810095_8 (COUnT VARCHAR, country VARCHAR)", "question": "How many names have a country of civ?" }
### QUESTION Find the names of all stores in Khanewal District. ### CONTEXT CREATE TABLE district (district_id VARCHAR, district_name VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR); CREATE TABLE store (store_name VARCHAR, store_id VARCHAR) ### ANSWER SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = "Khanewal District"</s>
{ "answer": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = \"Khanewal District\"", "context": "CREATE TABLE district (district_id VARCHAR, district_name VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR); CREATE TABLE store (store_name VARCHAR, store_id VARCHAR)", "question": "Find the names of all stores in Khanewal District." }
### QUESTION Find all the stores in the district with the most population. ### CONTEXT CREATE TABLE store_district (store_id VARCHAR); CREATE TABLE district (district_id VARCHAR, city_population VARCHAR); CREATE TABLE store (store_name VARCHAR, store_id VARCHAR) ### ANSWER SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)</s>
{ "answer": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)", "context": "CREATE TABLE store_district (store_id VARCHAR); CREATE TABLE district (district_id VARCHAR, city_population VARCHAR); CREATE TABLE store (store_name VARCHAR, store_id VARCHAR)", "question": "Find all the stores in the district with the most population." }
### QUESTION Which city is the headquarter of the store named "Blackville" in? ### CONTEXT CREATE TABLE store (store_id VARCHAR, store_name VARCHAR); CREATE TABLE district (headquartered_city VARCHAR, district_id VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR) ### ANSWER SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = "Blackville"</s>
{ "answer": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = \"Blackville\"", "context": "CREATE TABLE store (store_id VARCHAR, store_name VARCHAR); CREATE TABLE district (headquartered_city VARCHAR, district_id VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR)", "question": "Which city is the headquarter of the store named \"Blackville\" in?" }
### QUESTION Find the number of stores in each city. ### CONTEXT CREATE TABLE district (headquartered_city VARCHAR, district_id VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR); CREATE TABLE store (store_id VARCHAR) ### ANSWER SELECT t3.headquartered_city, COUNT(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city</s>
{ "answer": "SELECT t3.headquartered_city, COUNT(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city", "context": "CREATE TABLE district (headquartered_city VARCHAR, district_id VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR); CREATE TABLE store (store_id VARCHAR)", "question": "Find the number of stores in each city." }
### QUESTION Find the city with the most number of stores. ### CONTEXT CREATE TABLE district (headquartered_city VARCHAR, district_id VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR); CREATE TABLE store (store_id VARCHAR) ### ANSWER SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY COUNT(*) DESC LIMIT 1</s>
{ "answer": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY COUNT(*) DESC LIMIT 1", "context": "CREATE TABLE district (headquartered_city VARCHAR, district_id VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR); CREATE TABLE store (store_id VARCHAR)", "question": "Find the city with the most number of stores." }
### QUESTION What products are available at store named "Miramichi"? ### CONTEXT CREATE TABLE store_product (product_id VARCHAR, store_id VARCHAR); CREATE TABLE store (store_id VARCHAR, store_name VARCHAR); CREATE TABLE product (product VARCHAR, product_id VARCHAR) ### ANSWER SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = "Miramichi"</s>
{ "answer": "SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = \"Miramichi\"", "context": "CREATE TABLE store_product (product_id VARCHAR, store_id VARCHAR); CREATE TABLE store (store_id VARCHAR, store_name VARCHAR); CREATE TABLE product (product VARCHAR, product_id VARCHAR)", "question": "What products are available at store named \"Miramichi\"?" }
### QUESTION Find products with max page size as "A4" and pages per minute color smaller than 5. ### CONTEXT CREATE TABLE product (product VARCHAR, max_page_size VARCHAR, pages_per_minute_color VARCHAR) ### ANSWER SELECT product FROM product WHERE max_page_size = "A4" AND pages_per_minute_color < 5</s>
{ "answer": "SELECT product FROM product WHERE max_page_size = \"A4\" AND pages_per_minute_color < 5", "context": "CREATE TABLE product (product VARCHAR, max_page_size VARCHAR, pages_per_minute_color VARCHAR)", "question": "Find products with max page size as \"A4\" and pages per minute color smaller than 5." }
### QUESTION In what year did Morgan Brian win? ### CONTEXT CREATE TABLE table_name_75 (year INTEGER, winner VARCHAR) ### ANSWER SELECT AVG(year) FROM table_name_75 WHERE winner = "morgan brian"</s>
{ "answer": "SELECT AVG(year) FROM table_name_75 WHERE winner = \"morgan brian\"", "context": "CREATE TABLE table_name_75 (year INTEGER, winner VARCHAR)", "question": "In what year did Morgan Brian win?" }
### QUESTION Who is the winner who attended college at Connecticut and is from North Syracuse, NY? ### CONTEXT CREATE TABLE table_name_63 (winner VARCHAR, college VARCHAR, hometown VARCHAR) ### ANSWER SELECT winner FROM table_name_63 WHERE college = "connecticut" AND hometown = "north syracuse, ny"</s>
{ "answer": "SELECT winner FROM table_name_63 WHERE college = \"connecticut\" AND hometown = \"north syracuse, ny\"", "context": "CREATE TABLE table_name_63 (winner VARCHAR, college VARCHAR, hometown VARCHAR)", "question": "Who is the winner who attended college at Connecticut and is from North Syracuse, NY?" }
### QUESTION Find the names of districts where have both city mall and village store type stores. ### CONTEXT CREATE TABLE district (District_name VARCHAR, district_id VARCHAR); CREATE TABLE store (store_id VARCHAR, Type VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR) ### ANSWER SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = "City Mall" INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = "Village Store"</s>
{ "answer": "SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = \"City Mall\" INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = \"Village Store\"", "context": "CREATE TABLE district (District_name VARCHAR, district_id VARCHAR); CREATE TABLE store (store_id VARCHAR, Type VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR)", "question": "Find the names of districts where have both city mall and village store type stores." }
### QUESTION What is the sum of Wins, when Against is less than 1033, when Golden Rivers is "Nullawil", and when Byes is less than 2? ### CONTEXT CREATE TABLE table_name_85 (wins INTEGER, byes VARCHAR, against VARCHAR, golden_rivers VARCHAR) ### ANSWER SELECT SUM(wins) FROM table_name_85 WHERE against < 1033 AND golden_rivers = "nullawil" AND byes < 2</s>
{ "answer": "SELECT SUM(wins) FROM table_name_85 WHERE against < 1033 AND golden_rivers = \"nullawil\" AND byes < 2", "context": "CREATE TABLE table_name_85 (wins INTEGER, byes VARCHAR, against VARCHAR, golden_rivers VARCHAR)", "question": "What is the sum of Wins, when Against is less than 1033, when Golden Rivers is \"Nullawil\", and when Byes is less than 2?" }
### QUESTION Name the record for arizona ### CONTEXT CREATE TABLE table_22815259_1 (record VARCHAR, opponent VARCHAR) ### ANSWER SELECT record FROM table_22815259_1 WHERE opponent = "Arizona"</s>
{ "answer": "SELECT record FROM table_22815259_1 WHERE opponent = \"Arizona\"", "context": "CREATE TABLE table_22815259_1 (record VARCHAR, opponent VARCHAR)", "question": "Name the record for arizona" }
### QUESTION Which Year has a Competition of european championships, and Notes of 66.81 m? ### CONTEXT CREATE TABLE table_name_26 (year INTEGER, competition VARCHAR, notes VARCHAR) ### ANSWER SELECT SUM(year) FROM table_name_26 WHERE competition = "european championships" AND notes = "66.81 m"</s>
{ "answer": "SELECT SUM(year) FROM table_name_26 WHERE competition = \"european championships\" AND notes = \"66.81 m\"", "context": "CREATE TABLE table_name_26 (year INTEGER, competition VARCHAR, notes VARCHAR)", "question": "Which Year has a Competition of european championships, and Notes of 66.81 m?" }
### QUESTION Which season had less than 25.4 viewers and had a viewer rank of #6? ### CONTEXT CREATE TABLE table_name_43 (season INTEGER, households_viewers__in_millions_ VARCHAR, viewer_rank___number_ VARCHAR) ### ANSWER SELECT MIN(season) FROM table_name_43 WHERE households_viewers__in_millions_ < 25.4 AND viewer_rank___number_ = "#6"</s>
{ "answer": "SELECT MIN(season) FROM table_name_43 WHERE households_viewers__in_millions_ < 25.4 AND viewer_rank___number_ = \"#6\"", "context": "CREATE TABLE table_name_43 (season INTEGER, households_viewers__in_millions_ VARCHAR, viewer_rank___number_ VARCHAR)", "question": "Which season had less than 25.4 viewers and had a viewer rank of #6?" }
### QUESTION What is the lowest number of bronze of the nation with more than 13 total medals, more than 10 gold medals, and less than 22 silvers? ### CONTEXT CREATE TABLE table_name_3 (bronze INTEGER, silver VARCHAR, total VARCHAR, gold VARCHAR) ### ANSWER SELECT MIN(bronze) FROM table_name_3 WHERE total > 13 AND gold > 10 AND silver < 22</s>
{ "answer": "SELECT MIN(bronze) FROM table_name_3 WHERE total > 13 AND gold > 10 AND silver < 22", "context": "CREATE TABLE table_name_3 (bronze INTEGER, silver VARCHAR, total VARCHAR, gold VARCHAR)", "question": "What is the lowest number of bronze of the nation with more than 13 total medals, more than 10 gold medals, and less than 22 silvers?" }
### QUESTION If the poverty rate is 12.9%, what is the county? ### CONTEXT CREATE TABLE table_22815568_6 (county VARCHAR, poverty_rate VARCHAR) ### ANSWER SELECT county FROM table_22815568_6 WHERE poverty_rate = "12.9%"</s>
{ "answer": "SELECT county FROM table_22815568_6 WHERE poverty_rate = \"12.9%\"", "context": "CREATE TABLE table_22815568_6 (county VARCHAR, poverty_rate VARCHAR)", "question": "If the poverty rate is 12.9%, what is the county?" }
### QUESTION What was the main date of the round with 20 fixtures? ### CONTEXT CREATE TABLE table_name_81 (main_date VARCHAR, number_of_fixtures VARCHAR) ### ANSWER SELECT main_date FROM table_name_81 WHERE number_of_fixtures = 20</s>
{ "answer": "SELECT main_date FROM table_name_81 WHERE number_of_fixtures = 20", "context": "CREATE TABLE table_name_81 (main_date VARCHAR, number_of_fixtures VARCHAR)", "question": "What was the main date of the round with 20 fixtures?" }
### QUESTION If the poverty rate is 12.9%, what is the market income per capita? ### CONTEXT CREATE TABLE table_22815568_6 (market_income_per_capita VARCHAR, poverty_rate VARCHAR) ### ANSWER SELECT market_income_per_capita FROM table_22815568_6 WHERE poverty_rate = "12.9%"</s>
{ "answer": "SELECT market_income_per_capita FROM table_22815568_6 WHERE poverty_rate = \"12.9%\"", "context": "CREATE TABLE table_22815568_6 (market_income_per_capita VARCHAR, poverty_rate VARCHAR)", "question": "If the poverty rate is 12.9%, what is the market income per capita?" }
### QUESTION Name the rating for 3.79 viewers ### CONTEXT CREATE TABLE table_22822468_2 (rating VARCHAR, viewers__millions_ VARCHAR) ### ANSWER SELECT rating FROM table_22822468_2 WHERE viewers__millions_ = "3.79"</s>
{ "answer": "SELECT rating FROM table_22822468_2 WHERE viewers__millions_ = \"3.79\"", "context": "CREATE TABLE table_22822468_2 (rating VARCHAR, viewers__millions_ VARCHAR)", "question": "Name the rating for 3.79 viewers" }
### QUESTION Find the name and college of students whose decisions are yes in the tryout. ### CONTEXT CREATE TABLE tryout (cName VARCHAR, pID VARCHAR, decision VARCHAR); CREATE TABLE player (pName VARCHAR, pID VARCHAR) ### ANSWER SELECT T1.pName, T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'</s>
{ "answer": "SELECT T1.pName, T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "context": "CREATE TABLE tryout (cName VARCHAR, pID VARCHAR, decision VARCHAR); CREATE TABLE player (pName VARCHAR, pID VARCHAR)", "question": "Find the name and college of students whose decisions are yes in the tryout." }
### QUESTION What is the score of the final in $10,000 – tarakan , indonesia f2? ### CONTEXT CREATE TABLE table_name_97 (score_in_final VARCHAR, tournament VARCHAR) ### ANSWER SELECT score_in_final FROM table_name_97 WHERE tournament = "$10,000 – tarakan , indonesia f2"</s>
{ "answer": "SELECT score_in_final FROM table_name_97 WHERE tournament = \"$10,000 – tarakan , indonesia f2\"", "context": "CREATE TABLE table_name_97 (score_in_final VARCHAR, tournament VARCHAR)", "question": "What is the score of the final in $10,000 – tarakan , indonesia f2?" }
### QUESTION Find the names of the students who are in the position of striker and got a yes tryout decision. ### CONTEXT CREATE TABLE tryout (pID VARCHAR, decision VARCHAR, pPos VARCHAR); CREATE TABLE player (pName VARCHAR, pID VARCHAR) ### ANSWER SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'</s>
{ "answer": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'", "context": "CREATE TABLE tryout (pID VARCHAR, decision VARCHAR, pPos VARCHAR); CREATE TABLE player (pName VARCHAR, pID VARCHAR)", "question": "Find the names of the students who are in the position of striker and got a yes tryout decision." }
### QUESTION What was the player for t9 and a score of 73-69-74=216? ### CONTEXT CREATE TABLE table_name_97 (player VARCHAR, place VARCHAR, score VARCHAR) ### ANSWER SELECT player FROM table_name_97 WHERE place = "t9" AND score = 73 - 69 - 74 = 216</s>
{ "answer": "SELECT player FROM table_name_97 WHERE place = \"t9\" AND score = 73 - 69 - 74 = 216", "context": "CREATE TABLE table_name_97 (player VARCHAR, place VARCHAR, score VARCHAR)", "question": "What was the player for t9 and a score of 73-69-74=216?" }
### QUESTION Find the state of the college which player Charles is attending. ### CONTEXT CREATE TABLE tryout (cName VARCHAR, pID VARCHAR); CREATE TABLE player (pID VARCHAR, pName VARCHAR); CREATE TABLE college (state VARCHAR, cName VARCHAR) ### ANSWER SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles'</s>
{ "answer": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles'", "context": "CREATE TABLE tryout (cName VARCHAR, pID VARCHAR); CREATE TABLE player (pID VARCHAR, pName VARCHAR); CREATE TABLE college (state VARCHAR, cName VARCHAR)", "question": "Find the state of the college which player Charles is attending." }
### QUESTION Find the states of the colleges that have students in the tryout who played in striker position. ### CONTEXT CREATE TABLE tryout (cName VARCHAR, pPos VARCHAR); CREATE TABLE college (state VARCHAR, cName VARCHAR) ### ANSWER SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'</s>
{ "answer": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'", "context": "CREATE TABLE tryout (cName VARCHAR, pPos VARCHAR); CREATE TABLE college (state VARCHAR, cName VARCHAR)", "question": "Find the states of the colleges that have students in the tryout who played in striker position." }
### QUESTION What is the maximum training hours for the students whose training hours is greater than 1000 in different positions? ### CONTEXT CREATE TABLE player (HS INTEGER, pID VARCHAR); CREATE TABLE tryout (pPos VARCHAR, pID VARCHAR) ### ANSWER SELECT MAX(T1.HS), pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos</s>
{ "answer": "SELECT MAX(T1.HS), pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos", "context": "CREATE TABLE player (HS INTEGER, pID VARCHAR); CREATE TABLE tryout (pPos VARCHAR, pID VARCHAR)", "question": "What is the maximum training hours for the students whose training hours is greater than 1000 in different positions?" }