text
stringlengths
147
1.06k
source
dict
### INSTRUCTION Which team has a Game of 49? ### INPUT CREATE TABLE table_name_18 (team VARCHAR, game VARCHAR) ### OUTPUT SELECT team FROM table_name_18 WHERE game = 49
{ "input": "CREATE TABLE table_name_18 (team VARCHAR, game VARCHAR)", "instruction": "Which team has a Game of 49?", "output": "SELECT team FROM table_name_18 WHERE game = 49" }
### INSTRUCTION What was the highest attendance on December 23? ### INPUT CREATE TABLE table_name_91 (attendance INTEGER, date VARCHAR) ### OUTPUT SELECT MAX(attendance) FROM table_name_91 WHERE date = "december 23"
{ "input": "CREATE TABLE table_name_91 (attendance INTEGER, date VARCHAR)", "instruction": "What was the highest attendance on December 23?", "output": "SELECT MAX(attendance) FROM table_name_91 WHERE date = \"december 23\"" }
### INSTRUCTION What is Points Against, when Try Diff is +22? ### INPUT CREATE TABLE table_name_88 (points_against VARCHAR, try_diff VARCHAR) ### OUTPUT SELECT points_against FROM table_name_88 WHERE try_diff = "+22"
{ "input": "CREATE TABLE table_name_88 (points_against VARCHAR, try_diff VARCHAR)", "instruction": "What is Points Against, when Try Diff is +22?", "output": "SELECT points_against FROM table_name_88 WHERE try_diff = \"+22\"" }
### INSTRUCTION Which unique cities are in Asian countries where Chinese is the official language ? ### INPUT CREATE TABLE city (name VARCHAR, countrycode VARCHAR); CREATE TABLE countrylanguage (countrycode VARCHAR, isofficial VARCHAR, language VARCHAR); CREATE TABLE country (code VARCHAR, continent VARCHAR) ### OUTPUT SELECT DISTINCT t3.name FROM country AS t1 JOIN countrylanguage AS t2 ON t1.code = t2.countrycode JOIN city AS t3 ON t1.code = t3.countrycode WHERE t2.isofficial = 't' AND t2.language = 'chinese' AND t1.continent = "asia"
{ "input": "CREATE TABLE city (name VARCHAR, countrycode VARCHAR); CREATE TABLE countrylanguage (countrycode VARCHAR, isofficial VARCHAR, language VARCHAR); CREATE TABLE country (code VARCHAR, continent VARCHAR)", "instruction": "Which unique cities are in Asian countries where Chinese is the official language ?", "output": "SELECT DISTINCT t3.name FROM country AS t1 JOIN countrylanguage AS t2 ON t1.code = t2.countrycode JOIN city AS t3 ON t1.code = t3.countrycode WHERE t2.isofficial = 't' AND t2.language = 'chinese' AND t1.continent = \"asia\"" }
### INSTRUCTION What is the highest crowd with north melbourne as away team? ### INPUT CREATE TABLE table_name_10 (crowd INTEGER, away_team VARCHAR) ### OUTPUT SELECT MAX(crowd) FROM table_name_10 WHERE away_team = "north melbourne"
{ "input": "CREATE TABLE table_name_10 (crowd INTEGER, away_team VARCHAR)", "instruction": "What is the highest crowd with north melbourne as away team?", "output": "SELECT MAX(crowd) FROM table_name_10 WHERE away_team = \"north melbourne\"" }
### INSTRUCTION How many professors who are from either Accounting or Biology department? ### INPUT CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE professor (dept_code VARCHAR) ### OUTPUT SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T2.dept_name = 'Accounting' OR T2.dept_name = 'Biology'
{ "input": "CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE professor (dept_code VARCHAR)", "instruction": "How many professors who are from either Accounting or Biology department?", "output": "SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T2.dept_name = 'Accounting' OR T2.dept_name = 'Biology'" }
### INSTRUCTION Which hanzi's launch is before 2009, when the language was tibetan, and the name was qinghai tibetian general channel? ### INPUT CREATE TABLE table_name_71 (hanzi VARCHAR, name VARCHAR, launch VARCHAR, language VARCHAR) ### OUTPUT SELECT hanzi FROM table_name_71 WHERE launch < 2009 AND language = "tibetan" AND name = "qinghai tibetian general channel"
{ "input": "CREATE TABLE table_name_71 (hanzi VARCHAR, name VARCHAR, launch VARCHAR, language VARCHAR)", "instruction": "Which hanzi's launch is before 2009, when the language was tibetan, and the name was qinghai tibetian general channel?", "output": "SELECT hanzi FROM table_name_71 WHERE launch < 2009 AND language = \"tibetan\" AND name = \"qinghai tibetian general channel\"" }
### INSTRUCTION What shows for 2nd round when the team 1 was Rc Strasbourg (d1)? ### INPUT CREATE TABLE table_name_63 (team_1 VARCHAR) ### OUTPUT SELECT 2 AS nd_round FROM table_name_63 WHERE team_1 = "rc strasbourg (d1)"
{ "input": "CREATE TABLE table_name_63 (team_1 VARCHAR)", "instruction": "What shows for 2nd round when the team 1 was Rc Strasbourg (d1)?", "output": "SELECT 2 AS nd_round FROM table_name_63 WHERE team_1 = \"rc strasbourg (d1)\"" }
### INSTRUCTION How many departments are led by heads who are not mentioned? ### INPUT CREATE TABLE management (department_id VARCHAR); CREATE TABLE department (department_id VARCHAR) ### OUTPUT SELECT COUNT(*) FROM department WHERE NOT department_id IN (SELECT department_id FROM management)
{ "input": "CREATE TABLE management (department_id VARCHAR); CREATE TABLE department (department_id VARCHAR)", "instruction": "How many departments are led by heads who are not mentioned?", "output": "SELECT COUNT(*) FROM department WHERE NOT department_id IN (SELECT department_id FROM management)" }
### INSTRUCTION How many transfer fees did Afonso Alves have after 2008? ### INPUT CREATE TABLE table_name_13 (transfer_fee___ VARCHAR, player VARCHAR, year VARCHAR) ### OUTPUT SELECT COUNT(transfer_fee___) AS €_million_ FROM table_name_13 WHERE player = "afonso alves" AND year > 2008
{ "input": "CREATE TABLE table_name_13 (transfer_fee___ VARCHAR, player VARCHAR, year VARCHAR)", "instruction": "How many transfer fees did Afonso Alves have after 2008?", "output": "SELECT COUNT(transfer_fee___) AS €_million_ FROM table_name_13 WHERE player = \"afonso alves\" AND year > 2008" }
### INSTRUCTION What is Area km 2, when Population is greater than 1,395? ### INPUT CREATE TABLE table_name_21 (area_km_2 INTEGER, population INTEGER) ### OUTPUT SELECT MIN(area_km_2) FROM table_name_21 WHERE population > 1 OFFSET 395
{ "input": "CREATE TABLE table_name_21 (area_km_2 INTEGER, population INTEGER)", "instruction": "What is Area km 2, when Population is greater than 1,395?", "output": "SELECT MIN(area_km_2) FROM table_name_21 WHERE population > 1 OFFSET 395" }
### INSTRUCTION What is the average total for countries with under 3 golds and 0 silvers? ### INPUT CREATE TABLE table_name_83 (total INTEGER, gold VARCHAR, silver VARCHAR) ### OUTPUT SELECT AVG(total) FROM table_name_83 WHERE gold < 3 AND silver < 0
{ "input": "CREATE TABLE table_name_83 (total INTEGER, gold VARCHAR, silver VARCHAR)", "instruction": "What is the average total for countries with under 3 golds and 0 silvers?", "output": "SELECT AVG(total) FROM table_name_83 WHERE gold < 3 AND silver < 0" }
### INSTRUCTION Show the names of climbers and the heights of mountains they climb. ### INPUT CREATE TABLE mountain (Height VARCHAR, Mountain_ID VARCHAR); CREATE TABLE climber (Name VARCHAR, Mountain_ID VARCHAR) ### OUTPUT SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID
{ "input": "CREATE TABLE mountain (Height VARCHAR, Mountain_ID VARCHAR); CREATE TABLE climber (Name VARCHAR, Mountain_ID VARCHAR)", "instruction": "Show the names of climbers and the heights of mountains they climb.", "output": "SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID" }
### INSTRUCTION What is the university where the soccer stadium is terrain #2 of complexe sportif claude-robillard? ### INPUT CREATE TABLE table_27369069_4 (university VARCHAR, soccer_stadium VARCHAR) ### OUTPUT SELECT university FROM table_27369069_4 WHERE soccer_stadium = "terrain #2 of Complexe sportif Claude-Robillard"
{ "input": "CREATE TABLE table_27369069_4 (university VARCHAR, soccer_stadium VARCHAR)", "instruction": "What is the university where the soccer stadium is terrain #2 of complexe sportif claude-robillard?", "output": "SELECT university FROM table_27369069_4 WHERE soccer_stadium = \"terrain #2 of Complexe sportif Claude-Robillard\"" }
### INSTRUCTION At what venue did Alex Mettam/Mark Williams be named Man of the Match? ### INPUT CREATE TABLE table_17120964_6 (venue VARCHAR, man_of_the_match VARCHAR) ### OUTPUT SELECT venue FROM table_17120964_6 WHERE man_of_the_match = "Alex Mettam/Mark Williams"
{ "input": "CREATE TABLE table_17120964_6 (venue VARCHAR, man_of_the_match VARCHAR)", "instruction": "At what venue did Alex Mettam/Mark Williams be named Man of the Match?", "output": "SELECT venue FROM table_17120964_6 WHERE man_of_the_match = \"Alex Mettam/Mark Williams\"" }
### INSTRUCTION What Outgoing manager left at his end of tenure as caretaker and was Replaced by Jesper Hansen? ### INPUT CREATE TABLE table_name_78 (outgoing_manager VARCHAR, manner_of_departure VARCHAR, replaced_by VARCHAR) ### OUTPUT SELECT outgoing_manager FROM table_name_78 WHERE manner_of_departure = "end of tenure as caretaker" AND replaced_by = "jesper hansen"
{ "input": "CREATE TABLE table_name_78 (outgoing_manager VARCHAR, manner_of_departure VARCHAR, replaced_by VARCHAR)", "instruction": "What Outgoing manager left at his end of tenure as caretaker and was Replaced by Jesper Hansen?", "output": "SELECT outgoing_manager FROM table_name_78 WHERE manner_of_departure = \"end of tenure as caretaker\" AND replaced_by = \"jesper hansen\"" }
### INSTRUCTION When bahamas is the country what is the height in centimeters? ### INPUT CREATE TABLE table_18626383_2 (height__cm_ VARCHAR, country VARCHAR) ### OUTPUT SELECT height__cm_ FROM table_18626383_2 WHERE country = "Bahamas"
{ "input": "CREATE TABLE table_18626383_2 (height__cm_ VARCHAR, country VARCHAR)", "instruction": "When bahamas is the country what is the height in centimeters?", "output": "SELECT height__cm_ FROM table_18626383_2 WHERE country = \"Bahamas\"" }
### INSTRUCTION When bmw activee is the vehicle type how many clean electric grid california (san francisco) measurements are there? ### INPUT CREATE TABLE table_24620684_2 (clean_electric_grid_california__san_francisco_ VARCHAR, vehicle VARCHAR) ### OUTPUT SELECT COUNT(clean_electric_grid_california__san_francisco_) FROM table_24620684_2 WHERE vehicle = "BMW ActiveE"
{ "input": "CREATE TABLE table_24620684_2 (clean_electric_grid_california__san_francisco_ VARCHAR, vehicle VARCHAR)", "instruction": "When bmw activee is the vehicle type how many clean electric grid california (san francisco) measurements are there?", "output": "SELECT COUNT(clean_electric_grid_california__san_francisco_) FROM table_24620684_2 WHERE vehicle = \"BMW ActiveE\"" }
### INSTRUCTION what tournament was on a hard surface and saw jacob adaktusson as the opponent? ### INPUT CREATE TABLE table_name_78 (tournament VARCHAR, surface VARCHAR, opponent VARCHAR) ### OUTPUT SELECT tournament FROM table_name_78 WHERE surface = "hard" AND opponent = "jacob adaktusson"
{ "input": "CREATE TABLE table_name_78 (tournament VARCHAR, surface VARCHAR, opponent VARCHAR)", "instruction": "what tournament was on a hard surface and saw jacob adaktusson as the opponent?", "output": "SELECT tournament FROM table_name_78 WHERE surface = \"hard\" AND opponent = \"jacob adaktusson\"" }
### INSTRUCTION What is the channel when the analogue terrestrial channel shows n/a, and the internet is itv.com, with a position larger than 6, and digital terrestrial channel is 6 27 (+1)? ### INPUT CREATE TABLE table_name_10 (channel VARCHAR, digital_terrestrial_channel VARCHAR, position VARCHAR, analogue_terrestrial_channel VARCHAR, internet VARCHAR) ### OUTPUT SELECT channel FROM table_name_10 WHERE analogue_terrestrial_channel = "n/a" AND internet = "itv.com" AND position > 6 AND digital_terrestrial_channel = "6 27 (+1)"
{ "input": "CREATE TABLE table_name_10 (channel VARCHAR, digital_terrestrial_channel VARCHAR, position VARCHAR, analogue_terrestrial_channel VARCHAR, internet VARCHAR)", "instruction": "What is the channel when the analogue terrestrial channel shows n/a, and the internet is itv.com, with a position larger than 6, and digital terrestrial channel is 6 27 (+1)?", "output": "SELECT channel FROM table_name_10 WHERE analogue_terrestrial_channel = \"n/a\" AND internet = \"itv.com\" AND position > 6 AND digital_terrestrial_channel = \"6 27 (+1)\"" }
### INSTRUCTION Name the Losing BP with 22 played and 9 Try BP. ### INPUT CREATE TABLE table_name_72 (losing_bp VARCHAR, played VARCHAR, try_bp VARCHAR) ### OUTPUT SELECT losing_bp FROM table_name_72 WHERE played = "22" AND try_bp = "9"
{ "input": "CREATE TABLE table_name_72 (losing_bp VARCHAR, played VARCHAR, try_bp VARCHAR)", "instruction": "Name the Losing BP with 22 played and 9 Try BP.", "output": "SELECT losing_bp FROM table_name_72 WHERE played = \"22\" AND try_bp = \"9\"" }
### INSTRUCTION Find all the female members of club "Bootup Baltimore". Show the first name and last name. ### INPUT CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (fname VARCHAR, lname VARCHAR, stuid VARCHAR, sex VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR) ### OUTPUT SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t3.sex = "F"
{ "input": "CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (fname VARCHAR, lname VARCHAR, stuid VARCHAR, sex VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR)", "instruction": "Find all the female members of club \"Bootup Baltimore\". Show the first name and last name.", "output": "SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.sex = \"F\"" }
### INSTRUCTION What is the date of the game at the Pro Player Stadium that had a score of 4-1? ### INPUT CREATE TABLE table_name_43 (date VARCHAR, venue VARCHAR, score VARCHAR) ### OUTPUT SELECT date FROM table_name_43 WHERE venue = "pro player stadium" AND score = "4-1"
{ "input": "CREATE TABLE table_name_43 (date VARCHAR, venue VARCHAR, score VARCHAR)", "instruction": "What is the date of the game at the Pro Player Stadium that had a score of 4-1?", "output": "SELECT date FROM table_name_43 WHERE venue = \"pro player stadium\" AND score = \"4-1\"" }
### INSTRUCTION What country are the new orleans shell shockers from? ### INPUT CREATE TABLE table_28005160_2 (country VARCHAR, sponsored_name VARCHAR) ### OUTPUT SELECT country FROM table_28005160_2 WHERE sponsored_name = "New Orleans Shell Shockers"
{ "input": "CREATE TABLE table_28005160_2 (country VARCHAR, sponsored_name VARCHAR)", "instruction": "What country are the new orleans shell shockers from?", "output": "SELECT country FROM table_28005160_2 WHERE sponsored_name = \"New Orleans Shell Shockers\"" }
### INSTRUCTION When mount gauttier is the peak what is the highest prominence in meters? ### INPUT CREATE TABLE table_18946749_1 (prominence__m_ INTEGER, peak VARCHAR) ### OUTPUT SELECT MAX(prominence__m_) FROM table_18946749_1 WHERE peak = "Mount Gauttier"
{ "input": "CREATE TABLE table_18946749_1 (prominence__m_ INTEGER, peak VARCHAR)", "instruction": "When mount gauttier is the peak what is the highest prominence in meters?", "output": "SELECT MAX(prominence__m_) FROM table_18946749_1 WHERE peak = \"Mount Gauttier\"" }
### INSTRUCTION What is the Grand Cru with a Wine Style of Red Wine and Village of Gevrey-Chambertin? ### INPUT CREATE TABLE table_name_33 (grand_cru VARCHAR, wine_style VARCHAR, village VARCHAR) ### OUTPUT SELECT grand_cru FROM table_name_33 WHERE wine_style = "red wine" AND village = "gevrey-chambertin"
{ "input": "CREATE TABLE table_name_33 (grand_cru VARCHAR, wine_style VARCHAR, village VARCHAR)", "instruction": "What is the Grand Cru with a Wine Style of Red Wine and Village of Gevrey-Chambertin?", "output": "SELECT grand_cru FROM table_name_33 WHERE wine_style = \"red wine\" AND village = \"gevrey-chambertin\"" }
### INSTRUCTION Which opponent had a round of more than 1 and an even of PFP: ring of fire? ### INPUT CREATE TABLE table_name_45 (opponent VARCHAR, round VARCHAR, event VARCHAR) ### OUTPUT SELECT opponent FROM table_name_45 WHERE round > 1 AND event = "pfp: ring of fire"
{ "input": "CREATE TABLE table_name_45 (opponent VARCHAR, round VARCHAR, event VARCHAR)", "instruction": "Which opponent had a round of more than 1 and an even of PFP: ring of fire?", "output": "SELECT opponent FROM table_name_45 WHERE round > 1 AND event = \"pfp: ring of fire\"" }
### INSTRUCTION What was the score when Mark parterned with lorenzo manta? ### INPUT CREATE TABLE table_name_19 (score VARCHAR, partner VARCHAR) ### OUTPUT SELECT score FROM table_name_19 WHERE partner = "lorenzo manta"
{ "input": "CREATE TABLE table_name_19 (score VARCHAR, partner VARCHAR)", "instruction": "What was the score when Mark parterned with lorenzo manta?", "output": "SELECT score FROM table_name_19 WHERE partner = \"lorenzo manta\"" }
### INSTRUCTION Name the foochow for pingnan county ### INPUT CREATE TABLE table_2013618_1 (foochow VARCHAR, english_name VARCHAR) ### OUTPUT SELECT foochow FROM table_2013618_1 WHERE english_name = "Pingnan County"
{ "input": "CREATE TABLE table_2013618_1 (foochow VARCHAR, english_name VARCHAR)", "instruction": "Name the foochow for pingnan county", "output": "SELECT foochow FROM table_2013618_1 WHERE english_name = \"Pingnan County\"" }
### INSTRUCTION What are the cargo tonnes when the international (non-CIS) is 297 421? ### INPUT CREATE TABLE table_name_90 (cargo__tonnes_ VARCHAR, international__non_cis_ VARCHAR) ### OUTPUT SELECT cargo__tonnes_ FROM table_name_90 WHERE international__non_cis_ = "297 421"
{ "input": "CREATE TABLE table_name_90 (cargo__tonnes_ VARCHAR, international__non_cis_ VARCHAR)", "instruction": "What are the cargo tonnes when the international (non-CIS) is 297 421?", "output": "SELECT cargo__tonnes_ FROM table_name_90 WHERE international__non_cis_ = \"297 421\"" }
### INSTRUCTION What was the fastest lap time in the Escort Radar Warning 200? ### INPUT CREATE TABLE table_10706961_2 (fastest_lap VARCHAR, name VARCHAR) ### OUTPUT SELECT fastest_lap FROM table_10706961_2 WHERE name = "Escort Radar Warning 200"
{ "input": "CREATE TABLE table_10706961_2 (fastest_lap VARCHAR, name VARCHAR)", "instruction": "What was the fastest lap time in the Escort Radar Warning 200?", "output": "SELECT fastest_lap FROM table_10706961_2 WHERE name = \"Escort Radar Warning 200\"" }
### INSTRUCTION How many services has each resident requested? List the resident id, details, and the count in descending order of the count. ### INPUT CREATE TABLE Residents_Services (resident_id VARCHAR); CREATE TABLE Residents (resident_id VARCHAR, other_details VARCHAR) ### OUTPUT 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
{ "input": "CREATE TABLE Residents_Services (resident_id VARCHAR); CREATE TABLE Residents (resident_id VARCHAR, other_details VARCHAR)", "instruction": "How many services has each resident requested? List the resident id, details, and the count in descending order of the count.", "output": "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" }
### INSTRUCTION What's the score on December 1 when Philadelphia visited? ### INPUT CREATE TABLE table_name_41 (score VARCHAR, visitor VARCHAR, date VARCHAR) ### OUTPUT SELECT score FROM table_name_41 WHERE visitor = "philadelphia" AND date = "december 1"
{ "input": "CREATE TABLE table_name_41 (score VARCHAR, visitor VARCHAR, date VARCHAR)", "instruction": "What's the score on December 1 when Philadelphia visited?", "output": "SELECT score FROM table_name_41 WHERE visitor = \"philadelphia\" AND date = \"december 1\"" }
### INSTRUCTION Find the name of the program that is broadcast most frequently. ### INPUT CREATE TABLE program (name VARCHAR, program_id VARCHAR); CREATE TABLE broadcast (program_id VARCHAR) ### OUTPUT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_id ORDER BY COUNT(*) DESC LIMIT 1
{ "input": "CREATE TABLE program (name VARCHAR, program_id VARCHAR); CREATE TABLE broadcast (program_id VARCHAR)", "instruction": "Find the name of the program that is broadcast most frequently.", "output": "SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_id ORDER BY COUNT(*) DESC LIMIT 1" }
### INSTRUCTION what's the date where location is illinois ### INPUT CREATE TABLE table_11622255_1 (date VARCHAR, location VARCHAR) ### OUTPUT SELECT date FROM table_11622255_1 WHERE location = "Illinois"
{ "input": "CREATE TABLE table_11622255_1 (date VARCHAR, location VARCHAR)", "instruction": " what's the date where location is illinois", "output": "SELECT date FROM table_11622255_1 WHERE location = \"Illinois\"" }
### INSTRUCTION How many events had participants whose details had the substring 'Dr.' ### INPUT CREATE TABLE participants (Participant_ID VARCHAR, participant_details VARCHAR); CREATE TABLE Participants_in_Events (Participant_ID VARCHAR) ### OUTPUT SELECT COUNT(*) FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE T1.participant_details LIKE '%Dr.%'
{ "input": "CREATE TABLE participants (Participant_ID VARCHAR, participant_details VARCHAR); CREATE TABLE Participants_in_Events (Participant_ID VARCHAR)", "instruction": "How many events had participants whose details had the substring 'Dr.'", "output": "SELECT COUNT(*) FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE T1.participant_details LIKE '%Dr.%'" }
### INSTRUCTION Who's the incumbent of the Louisiana 1 district? ### INPUT CREATE TABLE table_1341604_19 (incumbent VARCHAR, district VARCHAR) ### OUTPUT SELECT incumbent FROM table_1341604_19 WHERE district = "Louisiana 1"
{ "input": "CREATE TABLE table_1341604_19 (incumbent VARCHAR, district VARCHAR)", "instruction": "Who's the incumbent of the Louisiana 1 district?", "output": "SELECT incumbent FROM table_1341604_19 WHERE district = \"Louisiana 1\"" }
### INSTRUCTION What was the date of elevation for the cardinal given the order and title of Cardinal-Priest of S. Pudenziana? ### INPUT CREATE TABLE table_name_91 (elevated VARCHAR, cardinalatial_order_and_title VARCHAR) ### OUTPUT SELECT elevated FROM table_name_91 WHERE cardinalatial_order_and_title = "cardinal-priest of s. pudenziana"
{ "input": "CREATE TABLE table_name_91 (elevated VARCHAR, cardinalatial_order_and_title VARCHAR)", "instruction": "What was the date of elevation for the cardinal given the order and title of Cardinal-Priest of S. Pudenziana?", "output": "SELECT elevated FROM table_name_91 WHERE cardinalatial_order_and_title = \"cardinal-priest of s. pudenziana\"" }
### INSTRUCTION What is the sum of Silver with a Bronze that is larger than 0 with a Gold smaller than 0? ### INPUT CREATE TABLE table_name_26 (silver INTEGER, bronze VARCHAR, gold VARCHAR) ### OUTPUT SELECT SUM(silver) FROM table_name_26 WHERE bronze > 0 AND gold < 0
{ "input": "CREATE TABLE table_name_26 (silver INTEGER, bronze VARCHAR, gold VARCHAR)", "instruction": "What is the sum of Silver with a Bronze that is larger than 0 with a Gold smaller than 0?", "output": "SELECT SUM(silver) FROM table_name_26 WHERE bronze > 0 AND gold < 0" }
### INSTRUCTION What driving wheels are on the m1 original NER class? ### INPUT CREATE TABLE table_name_8 (driving_wheels VARCHAR, original_ner_class VARCHAR) ### OUTPUT SELECT driving_wheels FROM table_name_8 WHERE original_ner_class = "m1"
{ "input": "CREATE TABLE table_name_8 (driving_wheels VARCHAR, original_ner_class VARCHAR)", "instruction": "What driving wheels are on the m1 original NER class?", "output": "SELECT driving_wheels FROM table_name_8 WHERE original_ner_class = \"m1\"" }
### INSTRUCTION display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN. ### INPUT CREATE TABLE employees (employee_id VARCHAR, job_id VARCHAR, salary INTEGER) ### OUTPUT SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN')
{ "input": "CREATE TABLE employees (employee_id VARCHAR, job_id VARCHAR, salary INTEGER)", "instruction": "display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN.", "output": "SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN')" }
### INSTRUCTION What was the time when the method was TKO? ### INPUT CREATE TABLE table_name_61 (time VARCHAR, method VARCHAR) ### OUTPUT SELECT time FROM table_name_61 WHERE method = "tko"
{ "input": "CREATE TABLE table_name_61 (time VARCHAR, method VARCHAR)", "instruction": "What was the time when the method was TKO?", "output": "SELECT time FROM table_name_61 WHERE method = \"tko\"" }
### INSTRUCTION Find the personal names of students not enrolled in any course. ### INPUT CREATE TABLE Student_Course_Enrolment (student_id VARCHAR); CREATE TABLE Students (personal_name VARCHAR); CREATE TABLE Students (personal_name VARCHAR, student_id VARCHAR) ### OUTPUT SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id
{ "input": "CREATE TABLE Student_Course_Enrolment (student_id VARCHAR); CREATE TABLE Students (personal_name VARCHAR); CREATE TABLE Students (personal_name VARCHAR, student_id VARCHAR)", "instruction": "Find the personal names of students not enrolled in any course.", "output": "SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id" }
### INSTRUCTION Which professionals have done at least two types of treatments? List the professional id and cell phone. ### INPUT CREATE TABLE Professionals (professional_id VARCHAR, cell_number VARCHAR); CREATE TABLE Treatments (professional_id VARCHAR) ### OUTPUT SELECT T1.professional_id, T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING COUNT(*) >= 2
{ "input": "CREATE TABLE Professionals (professional_id VARCHAR, cell_number VARCHAR); CREATE TABLE Treatments (professional_id VARCHAR)", "instruction": "Which professionals have done at least two types of treatments? List the professional id and cell phone.", "output": "SELECT T1.professional_id, T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING COUNT(*) >= 2" }
### INSTRUCTION What College/junior/club had a player of United States nationality drafted by the Toronto Maple Leafs? ### INPUT CREATE TABLE table_name_12 (college_junior_club_team VARCHAR, nhl_team VARCHAR, nationality VARCHAR) ### OUTPUT SELECT college_junior_club_team FROM table_name_12 WHERE nhl_team = "toronto maple leafs" AND nationality = "united states"
{ "input": "CREATE TABLE table_name_12 (college_junior_club_team VARCHAR, nhl_team VARCHAR, nationality VARCHAR)", "instruction": "What College/junior/club had a player of United States nationality drafted by the Toronto Maple Leafs?", "output": "SELECT college_junior_club_team FROM table_name_12 WHERE nhl_team = \"toronto maple leafs\" AND nationality = \"united states\"" }
### INSTRUCTION Where is Interlake located? ### INPUT CREATE TABLE table_13759592_2 (location VARCHAR, institution VARCHAR) ### OUTPUT SELECT location FROM table_13759592_2 WHERE institution = "Interlake"
{ "input": "CREATE TABLE table_13759592_2 (location VARCHAR, institution VARCHAR)", "instruction": "Where is Interlake located?", "output": "SELECT location FROM table_13759592_2 WHERE institution = \"Interlake\"" }
### INSTRUCTION How many types of products have Rodrick Heaney bought in total? ### INPUT CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE order_items (product_id VARCHAR, order_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR) ### OUTPUT SELECT COUNT(DISTINCT t3.product_id) 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 WHERE t1.customer_name = "Rodrick Heaney"
{ "input": "CREATE TABLE customers (customer_id VARCHAR, customer_name VARCHAR); CREATE TABLE order_items (product_id VARCHAR, order_id VARCHAR); CREATE TABLE customer_orders (customer_id VARCHAR, order_id VARCHAR)", "instruction": "How many types of products have Rodrick Heaney bought in total?", "output": "SELECT COUNT(DISTINCT t3.product_id) 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 WHERE t1.customer_name = \"Rodrick Heaney\"" }
### INSTRUCTION What is the highest year that has fila world championships as the event, with toledo, united states as the venue, and a weight class (kg) less than 97? ### INPUT CREATE TABLE table_name_37 (year INTEGER, weight_class__kg_ VARCHAR, event VARCHAR, venue VARCHAR) ### OUTPUT SELECT MAX(year) FROM table_name_37 WHERE event = "fila world championships" AND venue = "toledo, united states" AND weight_class__kg_ < 97
{ "input": "CREATE TABLE table_name_37 (year INTEGER, weight_class__kg_ VARCHAR, event VARCHAR, venue VARCHAR)", "instruction": "What is the highest year that has fila world championships as the event, with toledo, united states as the venue, and a weight class (kg) less than 97?", "output": "SELECT MAX(year) FROM table_name_37 WHERE event = \"fila world championships\" AND venue = \"toledo, united states\" AND weight_class__kg_ < 97" }
### INSTRUCTION What was the result of the Euro '64 qualifying game? ### INPUT CREATE TABLE table_name_65 (results¹ VARCHAR, type_of_game VARCHAR) ### OUTPUT SELECT results¹ FROM table_name_65 WHERE type_of_game = "euro '64 qualifying"
{ "input": "CREATE TABLE table_name_65 (results¹ VARCHAR, type_of_game VARCHAR)", "instruction": "What was the result of the Euro '64 qualifying game?", "output": "SELECT results¹ FROM table_name_65 WHERE type_of_game = \"euro '64 qualifying\"" }
### INSTRUCTION What distinct accelerator names are compatible with the browswers that have market share higher than 15? ### INPUT CREATE TABLE web_client_accelerator (name VARCHAR, id VARCHAR); CREATE TABLE accelerator_compatible_browser (accelerator_id VARCHAR, browser_id VARCHAR); CREATE TABLE browser (id VARCHAR, market_share INTEGER) ### OUTPUT SELECT DISTINCT T1.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.market_share > 15
{ "input": "CREATE TABLE web_client_accelerator (name VARCHAR, id VARCHAR); CREATE TABLE accelerator_compatible_browser (accelerator_id VARCHAR, browser_id VARCHAR); CREATE TABLE browser (id VARCHAR, market_share INTEGER)", "instruction": "What distinct accelerator names are compatible with the browswers that have market share higher than 15?", "output": "SELECT DISTINCT T1.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.market_share > 15" }
### INSTRUCTION What year did the Ingots, who left after 2007, join? ### INPUT CREATE TABLE table_name_48 (year_joined VARCHAR, mascot VARCHAR, year_left VARCHAR) ### OUTPUT SELECT COUNT(year_joined) FROM table_name_48 WHERE mascot = "ingots" AND year_left > 2007
{ "input": "CREATE TABLE table_name_48 (year_joined VARCHAR, mascot VARCHAR, year_left VARCHAR)", "instruction": "What year did the Ingots, who left after 2007, join?", "output": "SELECT COUNT(year_joined) FROM table_name_48 WHERE mascot = \"ingots\" AND year_left > 2007" }
### INSTRUCTION How many instruments does the song "Le Pop" use? ### INPUT CREATE TABLE instruments (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) ### OUTPUT SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop"
{ "input": "CREATE TABLE instruments (songid VARCHAR); CREATE TABLE songs (songid VARCHAR)", "instruction": "How many instruments does the song \"Le Pop\" use?", "output": "SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"" }
### INSTRUCTION Which episode had bbc ranking and canle ranking of n/a? ### INPUT CREATE TABLE table_24399615_10 (episode_no VARCHAR, bbc_three_weekly_ranking VARCHAR, cable_rank VARCHAR) ### OUTPUT SELECT COUNT(episode_no) FROM table_24399615_10 WHERE bbc_three_weekly_ranking = "N/A" AND cable_rank = "N/A"
{ "input": "CREATE TABLE table_24399615_10 (episode_no VARCHAR, bbc_three_weekly_ranking VARCHAR, cable_rank VARCHAR)", "instruction": "Which episode had bbc ranking and canle ranking of n/a?", "output": "SELECT COUNT(episode_no) FROM table_24399615_10 WHERE bbc_three_weekly_ranking = \"N/A\" AND cable_rank = \"N/A\"" }
### INSTRUCTION How many lost when the number managed is over 2 and the period is from 12 november 2012 – 27 november 2012? ### INPUT CREATE TABLE table_name_66 (lost VARCHAR, period VARCHAR, managed VARCHAR) ### OUTPUT SELECT COUNT(lost) FROM table_name_66 WHERE period = "12 november 2012 – 27 november 2012" AND managed > 2
{ "input": "CREATE TABLE table_name_66 (lost VARCHAR, period VARCHAR, managed VARCHAR)", "instruction": "How many lost when the number managed is over 2 and the period is from 12 november 2012 – 27 november 2012?", "output": "SELECT COUNT(lost) FROM table_name_66 WHERE period = \"12 november 2012 – 27 november 2012\" AND managed > 2" }
### INSTRUCTION What is the maximum number of losses that the Minnesota Kicks had after 1979 with an average attendance of 16,605? ### INPUT CREATE TABLE table_name_40 (lost INTEGER, season VARCHAR, avg_attend VARCHAR) ### OUTPUT SELECT MAX(lost) FROM table_name_40 WHERE season > 1979 AND avg_attend = 16 OFFSET 605
{ "input": "CREATE TABLE table_name_40 (lost INTEGER, season VARCHAR, avg_attend VARCHAR)", "instruction": "What is the maximum number of losses that the Minnesota Kicks had after 1979 with an average attendance of 16,605?", "output": "SELECT MAX(lost) FROM table_name_40 WHERE season > 1979 AND avg_attend = 16 OFFSET 605" }
### INSTRUCTION Who was the jockey in group 1 at the 1400m distance at randwick? ### INPUT CREATE TABLE table_20626467_1 (jockey VARCHAR, distance VARCHAR, class VARCHAR, venue VARCHAR) ### OUTPUT SELECT jockey FROM table_20626467_1 WHERE class = "Group 1" AND venue = "Randwick" AND distance = "1400m"
{ "input": "CREATE TABLE table_20626467_1 (jockey VARCHAR, distance VARCHAR, class VARCHAR, venue VARCHAR)", "instruction": "Who was the jockey in group 1 at the 1400m distance at randwick?", "output": "SELECT jockey FROM table_20626467_1 WHERE class = \"Group 1\" AND venue = \"Randwick\" AND distance = \"1400m\"" }
### INSTRUCTION Which Points have a Year larger than 1966, and Wins larger than 1? ### INPUT CREATE TABLE table_name_78 (points INTEGER, year VARCHAR, wins VARCHAR) ### OUTPUT SELECT AVG(points) FROM table_name_78 WHERE year > 1966 AND wins > 1
{ "input": "CREATE TABLE table_name_78 (points INTEGER, year VARCHAR, wins VARCHAR)", "instruction": "Which Points have a Year larger than 1966, and Wins larger than 1?", "output": "SELECT AVG(points) FROM table_name_78 WHERE year > 1966 AND wins > 1" }
### INSTRUCTION How much international freight has a change of +0,2% with more than 0 international mail? ### INPUT CREATE TABLE table_name_75 (international_freight VARCHAR, change VARCHAR, international_mail VARCHAR) ### OUTPUT SELECT COUNT(international_freight) FROM table_name_75 WHERE change = "+0,2%" AND international_mail > 0
{ "input": "CREATE TABLE table_name_75 (international_freight VARCHAR, change VARCHAR, international_mail VARCHAR)", "instruction": "How much international freight has a change of +0,2% with more than 0 international mail?", "output": "SELECT COUNT(international_freight) FROM table_name_75 WHERE change = \"+0,2%\" AND international_mail > 0" }
### INSTRUCTION when number of selection is 2 and first team is 1 who are all the player ### INPUT CREATE TABLE table_26130295_3 (player VARCHAR, first_team VARCHAR, number_of_selections VARCHAR) ### OUTPUT SELECT player FROM table_26130295_3 WHERE first_team = 1 AND number_of_selections = 2
{ "input": "CREATE TABLE table_26130295_3 (player VARCHAR, first_team VARCHAR, number_of_selections VARCHAR)", "instruction": "when number of selection is 2 and first team is 1 who are all the player", "output": "SELECT player FROM table_26130295_3 WHERE first_team = 1 AND number_of_selections = 2" }
### INSTRUCTION Name the total number of SP+FS for places of 60 and points more than 151.66 ### INPUT CREATE TABLE table_name_28 (fs VARCHAR, sp VARCHAR, places VARCHAR, points VARCHAR) ### OUTPUT SELECT COUNT(sp) + fs FROM table_name_28 WHERE places = 60 AND points > 151.66
{ "input": "CREATE TABLE table_name_28 (fs VARCHAR, sp VARCHAR, places VARCHAR, points VARCHAR)", "instruction": "Name the total number of SP+FS for places of 60 and points more than 151.66", "output": "SELECT COUNT(sp) + fs FROM table_name_28 WHERE places = 60 AND points > 151.66" }
### INSTRUCTION What shows for thurs 25 aug when fri 26 aug is 19' 30.70 116.023mph? ### INPUT CREATE TABLE table_30058355_2 (thurs_25_aug VARCHAR, fri_26_aug VARCHAR) ### OUTPUT SELECT thurs_25_aug FROM table_30058355_2 WHERE fri_26_aug = "19' 30.70 116.023mph"
{ "input": "CREATE TABLE table_30058355_2 (thurs_25_aug VARCHAR, fri_26_aug VARCHAR)", "instruction": "What shows for thurs 25 aug when fri 26 aug is 19' 30.70 116.023mph?", "output": "SELECT thurs_25_aug FROM table_30058355_2 WHERE fri_26_aug = \"19' 30.70 116.023mph\"" }
### INSTRUCTION Which Attendance has a Result of 1-0, and a Venue of A, and an Opponent of newcastle united? ### INPUT CREATE TABLE table_name_77 (attendance INTEGER, opponent VARCHAR, result VARCHAR, venue VARCHAR) ### OUTPUT SELECT MIN(attendance) FROM table_name_77 WHERE result = "1-0" AND venue = "a" AND opponent = "newcastle united"
{ "input": "CREATE TABLE table_name_77 (attendance INTEGER, opponent VARCHAR, result VARCHAR, venue VARCHAR)", "instruction": "Which Attendance has a Result of 1-0, and a Venue of A, and an Opponent of newcastle united?", "output": "SELECT MIN(attendance) FROM table_name_77 WHERE result = \"1-0\" AND venue = \"a\" AND opponent = \"newcastle united\"" }
### INSTRUCTION WHAT WAS THE SCORE IN THE FINAL PLAYED AGAINST JOSE CHECA-CALVO IN THE SANT CUGAT TOURNAMENT ? ### INPUT CREATE TABLE table_name_80 (score VARCHAR, tournament VARCHAR, opponent_in_the_final VARCHAR) ### OUTPUT SELECT score FROM table_name_80 WHERE tournament = "sant cugat" AND opponent_in_the_final = "jose checa-calvo"
{ "input": "CREATE TABLE table_name_80 (score VARCHAR, tournament VARCHAR, opponent_in_the_final VARCHAR)", "instruction": "WHAT WAS THE SCORE IN THE FINAL PLAYED AGAINST JOSE CHECA-CALVO IN THE SANT CUGAT TOURNAMENT ?", "output": "SELECT score FROM table_name_80 WHERE tournament = \"sant cugat\" AND opponent_in_the_final = \"jose checa-calvo\"" }
### INSTRUCTION What is the total amount of freight produced of u28c? ### INPUT CREATE TABLE table_name_49 (total_produced VARCHAR, service VARCHAR, builder’s_model VARCHAR) ### OUTPUT SELECT total_produced FROM table_name_49 WHERE service = "freight" AND builder’s_model = "u28c"
{ "input": "CREATE TABLE table_name_49 (total_produced VARCHAR, service VARCHAR, builder’s_model VARCHAR)", "instruction": "What is the total amount of freight produced of u28c?", "output": "SELECT total_produced FROM table_name_49 WHERE service = \"freight\" AND builder’s_model = \"u28c\"" }
### INSTRUCTION Find the state of the college which player Charles is attending. ### INPUT CREATE TABLE tryout (cName VARCHAR, pID VARCHAR); CREATE TABLE player (pID VARCHAR, pName VARCHAR); CREATE TABLE college (state VARCHAR, cName VARCHAR) ### OUTPUT 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'
{ "input": "CREATE TABLE tryout (cName VARCHAR, pID VARCHAR); CREATE TABLE player (pID VARCHAR, pName VARCHAR); CREATE TABLE college (state VARCHAR, cName VARCHAR)", "instruction": "Find the state of the college which player Charles is attending.", "output": "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'" }
### INSTRUCTION What is the voltage of the Pentiumiii866 microprocessor with a socket 370? ### INPUT CREATE TABLE table_name_8 (voltage VARCHAR, socket VARCHAR, model_number VARCHAR) ### OUTPUT SELECT voltage FROM table_name_8 WHERE socket = "socket 370" AND model_number = "pentiumiii866"
{ "input": "CREATE TABLE table_name_8 (voltage VARCHAR, socket VARCHAR, model_number VARCHAR)", "instruction": "What is the voltage of the Pentiumiii866 microprocessor with a socket 370?", "output": "SELECT voltage FROM table_name_8 WHERE socket = \"socket 370\" AND model_number = \"pentiumiii866\"" }
### INSTRUCTION List all the locations with a RBMK-1000 reactor. ### INPUT CREATE TABLE table_213088_1 (location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp__for_kostroma_1_and_2__table_31_technology_and_soviet_energy_availability___november_1981___ntis_order__numberpb82_133455__for_ignalina_4_ VARCHAR, reactor_type VARCHAR) ### OUTPUT SELECT location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp__for_kostroma_1_and_2__table_31_technology_and_soviet_energy_availability___november_1981___ntis_order__numberpb82_133455__for_ignalina_4_ FROM table_213088_1 WHERE reactor_type = "RBMK-1000"
{ "input": "CREATE TABLE table_213088_1 (location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp__for_kostroma_1_and_2__table_31_technology_and_soviet_energy_availability___november_1981___ntis_order__numberpb82_133455__for_ignalina_4_ VARCHAR, reactor_type VARCHAR)", "instruction": "List all the locations with a RBMK-1000 reactor.", "output": "SELECT location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp__for_kostroma_1_and_2__table_31_technology_and_soviet_energy_availability___november_1981___ntis_order__numberpb82_133455__for_ignalina_4_ FROM table_213088_1 WHERE reactor_type = \"RBMK-1000\"" }
### INSTRUCTION What is the birthplace of the player who is 190 CM tall, plays the D position, and wears number 11? ### INPUT CREATE TABLE table_name_79 (birthplace VARCHAR, jersey_number VARCHAR, position VARCHAR, height__cm_ VARCHAR) ### OUTPUT SELECT birthplace FROM table_name_79 WHERE position = "d" AND height__cm_ = 190 AND jersey_number = 11
{ "input": "CREATE TABLE table_name_79 (birthplace VARCHAR, jersey_number VARCHAR, position VARCHAR, height__cm_ VARCHAR)", "instruction": "What is the birthplace of the player who is 190 CM tall, plays the D position, and wears number 11?", "output": "SELECT birthplace FROM table_name_79 WHERE position = \"d\" AND height__cm_ = 190 AND jersey_number = 11" }
### INSTRUCTION Which Country has a Player of jodie mudd? ### INPUT CREATE TABLE table_name_62 (country VARCHAR, player VARCHAR) ### OUTPUT SELECT country FROM table_name_62 WHERE player = "jodie mudd"
{ "input": "CREATE TABLE table_name_62 (country VARCHAR, player VARCHAR)", "instruction": "Which Country has a Player of jodie mudd?", "output": "SELECT country FROM table_name_62 WHERE player = \"jodie mudd\"" }
### INSTRUCTION What is the pick# for the medicine hat tigers (wchl)? ### INPUT CREATE TABLE table_1473672_2 (pick__number INTEGER, college_junior_club_team VARCHAR) ### OUTPUT SELECT MIN(pick__number) FROM table_1473672_2 WHERE college_junior_club_team = "Medicine Hat Tigers (WCHL)"
{ "input": "CREATE TABLE table_1473672_2 (pick__number INTEGER, college_junior_club_team VARCHAR)", "instruction": "What is the pick# for the medicine hat tigers (wchl)?", "output": "SELECT MIN(pick__number) FROM table_1473672_2 WHERE college_junior_club_team = \"Medicine Hat Tigers (WCHL)\"" }
### INSTRUCTION How many silvers have a gold greater than 2, a bronze less than 35, china as the nation, with a total greater than 26? ### INPUT CREATE TABLE table_name_43 (silver VARCHAR, total VARCHAR, nation VARCHAR, gold VARCHAR, bronze VARCHAR) ### OUTPUT SELECT COUNT(silver) FROM table_name_43 WHERE gold > 2 AND bronze < 35 AND nation = "china" AND total > 26
{ "input": "CREATE TABLE table_name_43 (silver VARCHAR, total VARCHAR, nation VARCHAR, gold VARCHAR, bronze VARCHAR)", "instruction": "How many silvers have a gold greater than 2, a bronze less than 35, china as the nation, with a total greater than 26?", "output": "SELECT COUNT(silver) FROM table_name_43 WHERE gold > 2 AND bronze < 35 AND nation = \"china\" AND total > 26" }
### INSTRUCTION What format is the Catalogue 9362486152 from the region of Australia in? ### INPUT CREATE TABLE table_name_79 (format VARCHAR, catalogue VARCHAR, region VARCHAR) ### OUTPUT SELECT format FROM table_name_79 WHERE catalogue = "9362486152" AND region = "australia"
{ "input": "CREATE TABLE table_name_79 (format VARCHAR, catalogue VARCHAR, region VARCHAR)", "instruction": "What format is the Catalogue 9362486152 from the region of Australia in?", "output": "SELECT format FROM table_name_79 WHERE catalogue = \"9362486152\" AND region = \"australia\"" }
### INSTRUCTION What is total number of show times per dat for each cinema? ### INPUT CREATE TABLE schedule (show_times_per_day INTEGER, cinema_id VARCHAR); CREATE TABLE cinema (name VARCHAR, cinema_id VARCHAR) ### OUTPUT SELECT T2.name, SUM(T1.show_times_per_day) FROM schedule AS T1 JOIN cinema AS T2 ON T1.cinema_id = T2.cinema_id GROUP BY T1.cinema_id
{ "input": "CREATE TABLE schedule (show_times_per_day INTEGER, cinema_id VARCHAR); CREATE TABLE cinema (name VARCHAR, cinema_id VARCHAR)", "instruction": "What is total number of show times per dat for each cinema?", "output": "SELECT T2.name, SUM(T1.show_times_per_day) FROM schedule AS T1 JOIN cinema AS T2 ON T1.cinema_id = T2.cinema_id GROUP BY T1.cinema_id" }
### INSTRUCTION What was the complement associated with 0 off 3 men killed and 0 off 2 men wounded? ### INPUT CREATE TABLE table_2596811_12 (complement VARCHAR, killed VARCHAR, wounded VARCHAR) ### OUTPUT SELECT complement FROM table_2596811_12 WHERE killed = "0 off 3 men" AND wounded = "0 off 2 men"
{ "input": "CREATE TABLE table_2596811_12 (complement VARCHAR, killed VARCHAR, wounded VARCHAR)", "instruction": "What was the complement associated with 0 off 3 men killed and 0 off 2 men wounded?", "output": "SELECT complement FROM table_2596811_12 WHERE killed = \"0 off 3 men\" AND wounded = \"0 off 2 men\"" }
### INSTRUCTION Name the class for 4th position with year before 2006 ### INPUT CREATE TABLE table_name_67 (class VARCHAR, pos VARCHAR, year VARCHAR) ### OUTPUT SELECT class FROM table_name_67 WHERE pos = "4th" AND year < 2006
{ "input": "CREATE TABLE table_name_67 (class VARCHAR, pos VARCHAR, year VARCHAR)", "instruction": "Name the class for 4th position with year before 2006", "output": "SELECT class FROM table_name_67 WHERE pos = \"4th\" AND year < 2006" }
### INSTRUCTION When roxanne and daniel are the couple what is the highest rank? ### INPUT CREATE TABLE table_19744915_18 (rank INTEGER, couple VARCHAR) ### OUTPUT SELECT MAX(rank) FROM table_19744915_18 WHERE couple = "Roxanne and Daniel"
{ "input": "CREATE TABLE table_19744915_18 (rank INTEGER, couple VARCHAR)", "instruction": "When roxanne and daniel are the couple what is the highest rank?", "output": "SELECT MAX(rank) FROM table_19744915_18 WHERE couple = \"Roxanne and Daniel\"" }
### INSTRUCTION What is Championship, when Outcome is "runner-up", and when Opponents In Final is "Gigi Fernández Natalia Zvereva"? ### INPUT CREATE TABLE table_name_55 (championship VARCHAR, outcome VARCHAR, opponents_in_final VARCHAR) ### OUTPUT SELECT championship FROM table_name_55 WHERE outcome = "runner-up" AND opponents_in_final = "gigi fernández natalia zvereva"
{ "input": "CREATE TABLE table_name_55 (championship VARCHAR, outcome VARCHAR, opponents_in_final VARCHAR)", "instruction": "What is Championship, when Outcome is \"runner-up\", and when Opponents In Final is \"Gigi Fernández Natalia Zvereva\"?", "output": "SELECT championship FROM table_name_55 WHERE outcome = \"runner-up\" AND opponents_in_final = \"gigi fernández natalia zvereva\"" }
### INSTRUCTION Return the names of all counties sorted by population in ascending order. ### INPUT CREATE TABLE county (County_name VARCHAR, Population VARCHAR) ### OUTPUT SELECT County_name FROM county ORDER BY Population
{ "input": "CREATE TABLE county (County_name VARCHAR, Population VARCHAR)", "instruction": "Return the names of all counties sorted by population in ascending order.", "output": "SELECT County_name FROM county ORDER BY Population" }
### INSTRUCTION What is the Place of the Player with a To par of +1 and Score of 74-70-69-72=285? ### INPUT CREATE TABLE table_name_97 (place VARCHAR, to_par VARCHAR, score VARCHAR) ### OUTPUT SELECT place FROM table_name_97 WHERE to_par = "+1" AND score = 74 - 70 - 69 - 72 = 285
{ "input": "CREATE TABLE table_name_97 (place VARCHAR, to_par VARCHAR, score VARCHAR)", "instruction": "What is the Place of the Player with a To par of +1 and Score of 74-70-69-72=285?", "output": "SELECT place FROM table_name_97 WHERE to_par = \"+1\" AND score = 74 - 70 - 69 - 72 = 285" }
### INSTRUCTION What year was incumbent phil crane first elected? ### INPUT CREATE TABLE table_1341640_14 (first_elected VARCHAR, incumbent VARCHAR) ### OUTPUT SELECT first_elected FROM table_1341640_14 WHERE incumbent = "Phil Crane"
{ "input": "CREATE TABLE table_1341640_14 (first_elected VARCHAR, incumbent VARCHAR)", "instruction": "What year was incumbent phil crane first elected?", "output": "SELECT first_elected FROM table_1341640_14 WHERE incumbent = \"Phil Crane\"" }
### INSTRUCTION Tell me the player for pick number less than 29 and mls team of chicago fire ### INPUT CREATE TABLE table_name_97 (player VARCHAR, pick__number VARCHAR, mls_team VARCHAR) ### OUTPUT SELECT player FROM table_name_97 WHERE pick__number < 29 AND mls_team = "chicago fire"
{ "input": "CREATE TABLE table_name_97 (player VARCHAR, pick__number VARCHAR, mls_team VARCHAR)", "instruction": "Tell me the player for pick number less than 29 and mls team of chicago fire", "output": "SELECT player FROM table_name_97 WHERE pick__number < 29 AND mls_team = \"chicago fire\"" }
### INSTRUCTION How much is the purse ( $ ) when the margin of victory is 1 stroke? ### INPUT CREATE TABLE table_13388681_1 (purse___$__ VARCHAR, margin_of_victory VARCHAR) ### OUTPUT SELECT purse___$__ FROM table_13388681_1 WHERE margin_of_victory = "1 stroke"
{ "input": "CREATE TABLE table_13388681_1 (purse___$__ VARCHAR, margin_of_victory VARCHAR)", "instruction": "How much is the purse ( $ ) when the margin of victory is 1 stroke?", "output": "SELECT purse___$__ FROM table_13388681_1 WHERE margin_of_victory = \"1 stroke\"" }
### INSTRUCTION Which Barrel twist has a Stock of canadian 3rd generation and a Hand guards of short ribbed? ### INPUT CREATE TABLE table_name_33 (barrel_twist VARCHAR, stock VARCHAR, hand_guards VARCHAR) ### OUTPUT SELECT barrel_twist FROM table_name_33 WHERE stock = "canadian 3rd generation" AND hand_guards = "short ribbed"
{ "input": "CREATE TABLE table_name_33 (barrel_twist VARCHAR, stock VARCHAR, hand_guards VARCHAR)", "instruction": "Which Barrel twist has a Stock of canadian 3rd generation and a Hand guards of short ribbed?", "output": "SELECT barrel_twist FROM table_name_33 WHERE stock = \"canadian 3rd generation\" AND hand_guards = \"short ribbed\"" }
### INSTRUCTION WHAT IS THE PM THAT HAS NO BLOGS, NO XML Forms Management and workflow, NO SEARCH, AND NO SOCIAL SOFTWARE? ### INPUT CREATE TABLE table_name_9 (project_management VARCHAR, social_software VARCHAR, enterprise_search VARCHAR, blogs VARCHAR, xml_forms_management_and_workflow VARCHAR) ### OUTPUT SELECT project_management FROM table_name_9 WHERE blogs = "no" AND xml_forms_management_and_workflow = "no" AND enterprise_search = "no" AND social_software = "no"
{ "input": "CREATE TABLE table_name_9 (project_management VARCHAR, social_software VARCHAR, enterprise_search VARCHAR, blogs VARCHAR, xml_forms_management_and_workflow VARCHAR)", "instruction": "WHAT IS THE PM THAT HAS NO BLOGS, NO XML Forms Management and workflow, NO SEARCH, AND NO SOCIAL SOFTWARE?", "output": "SELECT project_management FROM table_name_9 WHERE blogs = \"no\" AND xml_forms_management_and_workflow = \"no\" AND enterprise_search = \"no\" AND social_software = \"no\"" }
### INSTRUCTION Which city has the IATA SSG? ### INPUT CREATE TABLE table_name_40 (city VARCHAR, iata VARCHAR) ### OUTPUT SELECT city FROM table_name_40 WHERE iata = "ssg"
{ "input": "CREATE TABLE table_name_40 (city VARCHAR, iata VARCHAR)", "instruction": "Which city has the IATA SSG?", "output": "SELECT city FROM table_name_40 WHERE iata = \"ssg\"" }
### INSTRUCTION Please list the name and id of all artists that have at least 3 albums in alphabetical order. ### INPUT CREATE TABLE ARTIST (Name VARCHAR, ArtistID VARCHAR); CREATE TABLE ALBUM (ArtistId VARCHAR) ### OUTPUT SELECT T2.Name, T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistID GROUP BY T1.ArtistId HAVING COUNT(*) >= 3 ORDER BY T2.Name
{ "input": "CREATE TABLE ARTIST (Name VARCHAR, ArtistID VARCHAR); CREATE TABLE ALBUM (ArtistId VARCHAR)", "instruction": "Please list the name and id of all artists that have at least 3 albums in alphabetical order.", "output": "SELECT T2.Name, T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistID GROUP BY T1.ArtistId HAVING COUNT(*) >= 3 ORDER BY T2.Name" }
### INSTRUCTION what is the consistency & participation when pareto efficiency is yes and condorcet is no? ### INPUT CREATE TABLE table_name_83 (consistency_ VARCHAR, _participation VARCHAR, pareto_efficiency VARCHAR, condorcet VARCHAR) ### OUTPUT SELECT consistency_ & _participation FROM table_name_83 WHERE pareto_efficiency = "yes" AND condorcet = "no"
{ "input": "CREATE TABLE table_name_83 (consistency_ VARCHAR, _participation VARCHAR, pareto_efficiency VARCHAR, condorcet VARCHAR)", "instruction": "what is the consistency & participation when pareto efficiency is yes and condorcet is no?", "output": "SELECT consistency_ & _participation FROM table_name_83 WHERE pareto_efficiency = \"yes\" AND condorcet = \"no\"" }
### INSTRUCTION Find out the first name and last name of staff lived in city Damianfort. ### INPUT CREATE TABLE Staff (first_name VARCHAR, last_name VARCHAR, staff_address_id VARCHAR); CREATE TABLE Addresses (address_id VARCHAR, city VARCHAR) ### OUTPUT SELECT T2.first_name, T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = "Damianfort"
{ "input": "CREATE TABLE Staff (first_name VARCHAR, last_name VARCHAR, staff_address_id VARCHAR); CREATE TABLE Addresses (address_id VARCHAR, city VARCHAR)", "instruction": "Find out the first name and last name of staff lived in city Damianfort.", "output": "SELECT T2.first_name, T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = \"Damianfort\"" }
### INSTRUCTION Name the result for total attendance-regular season ### INPUT CREATE TABLE table_21436373_11 (result_games VARCHAR, type_of_record VARCHAR) ### OUTPUT SELECT result_games FROM table_21436373_11 WHERE type_of_record = "Total attendance-Regular season"
{ "input": "CREATE TABLE table_21436373_11 (result_games VARCHAR, type_of_record VARCHAR)", "instruction": "Name the result for total attendance-regular season", "output": "SELECT result_games FROM table_21436373_11 WHERE type_of_record = \"Total attendance-Regular season\"" }
### INSTRUCTION Name the tries against for played 22 and points against of 183 ### INPUT CREATE TABLE table_13564702_3 (tries_against VARCHAR, played VARCHAR, points_against VARCHAR) ### OUTPUT SELECT tries_against FROM table_13564702_3 WHERE played = "22" AND points_against = "183"
{ "input": "CREATE TABLE table_13564702_3 (tries_against VARCHAR, played VARCHAR, points_against VARCHAR)", "instruction": "Name the tries against for played 22 and points against of 183", "output": "SELECT tries_against FROM table_13564702_3 WHERE played = \"22\" AND points_against = \"183\"" }
### INSTRUCTION How many bronze numbers had a total of more than 4 when the rank is less than four, germany is involved, and there's less than 5 silver? ### INPUT CREATE TABLE table_name_67 (bronze VARCHAR, silver VARCHAR, nation VARCHAR, total VARCHAR, rank VARCHAR) ### OUTPUT SELECT COUNT(bronze) FROM table_name_67 WHERE total > 4 AND rank < 4 AND nation = "germany" AND silver < 5
{ "input": "CREATE TABLE table_name_67 (bronze VARCHAR, silver VARCHAR, nation VARCHAR, total VARCHAR, rank VARCHAR)", "instruction": "How many bronze numbers had a total of more than 4 when the rank is less than four, germany is involved, and there's less than 5 silver?", "output": "SELECT COUNT(bronze) FROM table_name_67 WHERE total > 4 AND rank < 4 AND nation = \"germany\" AND silver < 5" }
### INSTRUCTION What Location is in the second division and has 4th, third division (promoted) as its Position in 2012-13? ### INPUT CREATE TABLE table_name_67 (location VARCHAR, league_division VARCHAR, position_in_2012_13 VARCHAR) ### OUTPUT SELECT location FROM table_name_67 WHERE league_division = "second division" AND position_in_2012_13 = "4th, third division (promoted)"
{ "input": "CREATE TABLE table_name_67 (location VARCHAR, league_division VARCHAR, position_in_2012_13 VARCHAR)", "instruction": "What Location is in the second division and has 4th, third division (promoted) as its Position in 2012-13?", "output": "SELECT location FROM table_name_67 WHERE league_division = \"second division\" AND position_in_2012_13 = \"4th, third division (promoted)\"" }
### INSTRUCTION What is the Score of the Rangers' Runner-ups and Hibernian Winners in Hampden Park? ### INPUT CREATE TABLE table_name_17 (score VARCHAR, winners VARCHAR, venue VARCHAR, runners_up VARCHAR) ### OUTPUT SELECT score FROM table_name_17 WHERE venue = "hampden park" AND runners_up = "rangers" AND winners = "hibernian"
{ "input": "CREATE TABLE table_name_17 (score VARCHAR, winners VARCHAR, venue VARCHAR, runners_up VARCHAR)", "instruction": "What is the Score of the Rangers' Runner-ups and Hibernian Winners in Hampden Park?", "output": "SELECT score FROM table_name_17 WHERE venue = \"hampden park\" AND runners_up = \"rangers\" AND winners = \"hibernian\"" }
### INSTRUCTION Who is the third member of the Liberal Party, a third party conservative, the second member Humphrey Mildmay? ### INPUT CREATE TABLE table_name_2 (third_member VARCHAR, second_member VARCHAR, second_party VARCHAR, third_party VARCHAR) ### OUTPUT SELECT third_member FROM table_name_2 WHERE second_party = "liberal" AND third_party = "conservative" AND second_member = "humphrey mildmay"
{ "input": "CREATE TABLE table_name_2 (third_member VARCHAR, second_member VARCHAR, second_party VARCHAR, third_party VARCHAR)", "instruction": "Who is the third member of the Liberal Party, a third party conservative, the second member Humphrey Mildmay?", "output": "SELECT third_member FROM table_name_2 WHERE second_party = \"liberal\" AND third_party = \"conservative\" AND second_member = \"humphrey mildmay\"" }
### INSTRUCTION What Semimajor axis (AU) has a Companion (in order from star) of g? ### INPUT CREATE TABLE table_name_86 (semimajor_axis___au__ VARCHAR, companion__in_order_from_star_ VARCHAR) ### OUTPUT SELECT semimajor_axis___au__ FROM table_name_86 WHERE companion__in_order_from_star_ = "g"
{ "input": "CREATE TABLE table_name_86 (semimajor_axis___au__ VARCHAR, companion__in_order_from_star_ VARCHAR)", "instruction": "What Semimajor axis (AU) has a Companion (in order from star) of g?", "output": "SELECT semimajor_axis___au__ FROM table_name_86 WHERE companion__in_order_from_star_ = \"g\"" }
### INSTRUCTION Name the total number of dar for disney channel and number is 613 ### INPUT CREATE TABLE table_15887683_9 (dar VARCHAR, television_service VARCHAR, n° VARCHAR) ### OUTPUT SELECT COUNT(dar) FROM table_15887683_9 WHERE television_service = "Disney Channel" AND n° = 613
{ "input": "CREATE TABLE table_15887683_9 (dar VARCHAR, television_service VARCHAR, n° VARCHAR)", "instruction": "Name the total number of dar for disney channel and number is 613", "output": "SELECT COUNT(dar) FROM table_15887683_9 WHERE television_service = \"Disney Channel\" AND n° = 613" }
### INSTRUCTION What is the country's name with a numeric code less than 246 and a Latin 3-letter code of slv? ### INPUT CREATE TABLE table_name_63 (country_name VARCHAR, numeric_code VARCHAR, latin_3_letter_code VARCHAR) ### OUTPUT SELECT country_name FROM table_name_63 WHERE numeric_code < 246 AND latin_3_letter_code = "slv"
{ "input": "CREATE TABLE table_name_63 (country_name VARCHAR, numeric_code VARCHAR, latin_3_letter_code VARCHAR)", "instruction": "What is the country's name with a numeric code less than 246 and a Latin 3-letter code of slv?", "output": "SELECT country_name FROM table_name_63 WHERE numeric_code < 246 AND latin_3_letter_code = \"slv\"" }
### INSTRUCTION When william b. campbell (u) is the successor what is the district? ### INPUT CREATE TABLE table_2147588_4 (district VARCHAR, successor VARCHAR) ### OUTPUT SELECT district FROM table_2147588_4 WHERE successor = "William B. Campbell (U)"
{ "input": "CREATE TABLE table_2147588_4 (district VARCHAR, successor VARCHAR)", "instruction": "When william b. campbell (u) is the successor what is the district?", "output": "SELECT district FROM table_2147588_4 WHERE successor = \"William B. Campbell (U)\"" }
### INSTRUCTION Find the names of customers who have bought by at least three distinct products. ### INPUT 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) ### OUTPUT 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
{ "input": "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)", "instruction": "Find the names of customers who have bought by at least three distinct products.", "output": "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" }
### INSTRUCTION What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets? ### INPUT CREATE TABLE visit (visitor_id VARCHAR, Total_spent INTEGER); CREATE TABLE visitor (name VARCHAR, Level_of_membership VARCHAR, id VARCHAR) ### OUTPUT SELECT t2.visitor_id, t1.name, t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t2.visitor_id ORDER BY SUM(t2.Total_spent) DESC LIMIT 1
{ "input": "CREATE TABLE visit (visitor_id VARCHAR, Total_spent INTEGER); CREATE TABLE visitor (name VARCHAR, Level_of_membership VARCHAR, id VARCHAR)", "instruction": "What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets?", "output": "SELECT t2.visitor_id, t1.name, t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t2.visitor_id ORDER BY SUM(t2.Total_spent) DESC LIMIT 1" }