text
stringlengths
147
1.06k
source
dict
### INSTRUCTION What is the name of the customer who has made the minimum amount of payment in one claim? ### INPUT CREATE TABLE claim_headers (amount_piad INTEGER); CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR); CREATE TABLE policies (policy_id VARCHAR, customer_id VARCHAR); CREATE TABLE claim_headers (policy_id VARCHAR, amount_piad INTEGER) ### OUTPUT SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT MIN(amount_piad) FROM claim_headers)
{ "input": "CREATE TABLE claim_headers (amount_piad INTEGER); CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR); CREATE TABLE policies (policy_id VARCHAR, customer_id VARCHAR); CREATE TABLE claim_headers (policy_id VARCHAR, amount_piad INTEGER)", "instruction": "What is the name of the customer who has made the minimum amount of payment in one claim?", "output": "SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT MIN(amount_piad) FROM claim_headers)" }
### INSTRUCTION Name the League which has a Regular Season of 3rd, atlantic? ### INPUT CREATE TABLE table_name_86 (league VARCHAR, regular_season VARCHAR) ### OUTPUT SELECT league FROM table_name_86 WHERE regular_season = "3rd, atlantic"
{ "input": "CREATE TABLE table_name_86 (league VARCHAR, regular_season VARCHAR)", "instruction": "Name the League which has a Regular Season of 3rd, atlantic?", "output": "SELECT league FROM table_name_86 WHERE regular_season = \"3rd, atlantic\"" }
### INSTRUCTION What is the average gpa of the students enrolled in the course with code ACCT-211? ### INPUT CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_gpa INTEGER, stu_num VARCHAR) ### OUTPUT SELECT AVG(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T1.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211'
{ "input": "CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_gpa INTEGER, stu_num VARCHAR)", "instruction": "What is the average gpa of the students enrolled in the course with code ACCT-211?", "output": "SELECT AVG(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T1.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211'" }
### INSTRUCTION Show publishers with a book published in 1989 and a book in 1990. ### INPUT CREATE TABLE book_club (publisher VARCHAR, YEAR VARCHAR) ### OUTPUT SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990
{ "input": "CREATE TABLE book_club (publisher VARCHAR, YEAR VARCHAR)", "instruction": "Show publishers with a book published in 1989 and a book in 1990.", "output": "SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990" }
### INSTRUCTION How many items are listed under caps when burnley is the club team? ### INPUT CREATE TABLE table_28286776_12 (cap_s_ VARCHAR, club_s_ VARCHAR) ### OUTPUT SELECT COUNT(cap_s_) FROM table_28286776_12 WHERE club_s_ = "Burnley"
{ "input": "CREATE TABLE table_28286776_12 (cap_s_ VARCHAR, club_s_ VARCHAR)", "instruction": "How many items are listed under caps when burnley is the club team?", "output": "SELECT COUNT(cap_s_) FROM table_28286776_12 WHERE club_s_ = \"Burnley\"" }
### INSTRUCTION What is the name of the race won by driver Carlos Reutemann? ### INPUT CREATE TABLE table_name_72 (race_name VARCHAR, winning_driver VARCHAR) ### OUTPUT SELECT race_name FROM table_name_72 WHERE winning_driver = "carlos reutemann"
{ "input": "CREATE TABLE table_name_72 (race_name VARCHAR, winning_driver VARCHAR)", "instruction": "What is the name of the race won by driver Carlos Reutemann?", "output": "SELECT race_name FROM table_name_72 WHERE winning_driver = \"carlos reutemann\"" }
### INSTRUCTION Name the player with score of 73-69-74-71=287 ### INPUT CREATE TABLE table_name_12 (player VARCHAR, score VARCHAR) ### OUTPUT SELECT player FROM table_name_12 WHERE score = 73 - 69 - 74 - 71 = 287
{ "input": "CREATE TABLE table_name_12 (player VARCHAR, score VARCHAR)", "instruction": "Name the player with score of 73-69-74-71=287", "output": "SELECT player FROM table_name_12 WHERE score = 73 - 69 - 74 - 71 = 287" }
### INSTRUCTION What section were they in when there were tier 2 in 1996? ### INPUT CREATE TABLE table_name_30 (section VARCHAR, level VARCHAR, season VARCHAR) ### OUTPUT SELECT section FROM table_name_30 WHERE level = "tier 2" AND season = 1996
{ "input": "CREATE TABLE table_name_30 (section VARCHAR, level VARCHAR, season VARCHAR)", "instruction": "What section were they in when there were tier 2 in 1996?", "output": "SELECT section FROM table_name_30 WHERE level = \"tier 2\" AND season = 1996" }
### INSTRUCTION What's the lowest number of draws when the wins are less than 15, and against is 1228? ### INPUT CREATE TABLE table_name_98 (draws INTEGER, wins VARCHAR, against VARCHAR) ### OUTPUT SELECT MIN(draws) FROM table_name_98 WHERE wins < 15 AND against = 1228
{ "input": "CREATE TABLE table_name_98 (draws INTEGER, wins VARCHAR, against VARCHAR)", "instruction": "What's the lowest number of draws when the wins are less than 15, and against is 1228?", "output": "SELECT MIN(draws) FROM table_name_98 WHERE wins < 15 AND against = 1228" }
### INSTRUCTION What is the total attendance for Detroit on hasek? ### INPUT CREATE TABLE table_name_50 (attendance VARCHAR, home VARCHAR, decision VARCHAR) ### OUTPUT SELECT COUNT(attendance) FROM table_name_50 WHERE home = "detroit" AND decision = "hasek"
{ "input": "CREATE TABLE table_name_50 (attendance VARCHAR, home VARCHAR, decision VARCHAR)", "instruction": "What is the total attendance for Detroit on hasek?", "output": "SELECT COUNT(attendance) FROM table_name_50 WHERE home = \"detroit\" AND decision = \"hasek\"" }
### INSTRUCTION Which First has Bats of r, and Throws of l, and a DOB of 12 october 1977? ### INPUT CREATE TABLE table_name_86 (first VARCHAR, dob VARCHAR, bats VARCHAR, throws VARCHAR) ### OUTPUT SELECT first FROM table_name_86 WHERE bats = "r" AND throws = "l" AND dob = "12 october 1977"
{ "input": "CREATE TABLE table_name_86 (first VARCHAR, dob VARCHAR, bats VARCHAR, throws VARCHAR)", "instruction": "Which First has Bats of r, and Throws of l, and a DOB of 12 october 1977?", "output": "SELECT first FROM table_name_86 WHERE bats = \"r\" AND throws = \"l\" AND dob = \"12 october 1977\"" }
### INSTRUCTION List the name, IHSAA Football Class, and Mascot of the schools that have more than 6000 of budgeted amount or were founded before 2003, in the order of percent of total invested budget and total budgeted budget. ### INPUT CREATE TABLE school (School_name VARCHAR, Mascot VARCHAR, IHSAA_Football_Class VARCHAR, school_id VARCHAR); CREATE TABLE budget (school_id VARCHAR, total_budget_percent_invested VARCHAR, total_budget_percent_budgeted VARCHAR) ### OUTPUT SELECT T1.School_name, T1.Mascot, T1.IHSAA_Football_Class FROM school AS T1 JOIN budget AS T2 ON T1.school_id = T2.school_id WHERE Budgeted > 6000 OR YEAR < 2003 ORDER BY T2.total_budget_percent_invested, T2.total_budget_percent_budgeted
{ "input": "CREATE TABLE school (School_name VARCHAR, Mascot VARCHAR, IHSAA_Football_Class VARCHAR, school_id VARCHAR); CREATE TABLE budget (school_id VARCHAR, total_budget_percent_invested VARCHAR, total_budget_percent_budgeted VARCHAR)", "instruction": "List the name, IHSAA Football Class, and Mascot of the schools that have more than 6000 of budgeted amount or were founded before 2003, in the order of percent of total invested budget and total budgeted budget.", "output": "SELECT T1.School_name, T1.Mascot, T1.IHSAA_Football_Class FROM school AS T1 JOIN budget AS T2 ON T1.school_id = T2.school_id WHERE Budgeted > 6000 OR YEAR < 2003 ORDER BY T2.total_budget_percent_invested, T2.total_budget_percent_budgeted" }
### INSTRUCTION What is the score for the game where Birmingham City was the home team on 10 March 1984? ### INPUT CREATE TABLE table_name_86 (score VARCHAR, date VARCHAR, home_team VARCHAR) ### OUTPUT SELECT score FROM table_name_86 WHERE date = "10 march 1984" AND home_team = "birmingham city"
{ "input": "CREATE TABLE table_name_86 (score VARCHAR, date VARCHAR, home_team VARCHAR)", "instruction": "What is the score for the game where Birmingham City was the home team on 10 March 1984?", "output": "SELECT score FROM table_name_86 WHERE date = \"10 march 1984\" AND home_team = \"birmingham city\"" }
### INSTRUCTION What is Pegasus' right ascension with a 7318a NGC? ### INPUT CREATE TABLE table_name_67 (right_ascension___j2000__ VARCHAR, constellation VARCHAR, ngc_number VARCHAR) ### OUTPUT SELECT right_ascension___j2000__ FROM table_name_67 WHERE constellation = "pegasus" AND ngc_number = "7318a"
{ "input": "CREATE TABLE table_name_67 (right_ascension___j2000__ VARCHAR, constellation VARCHAR, ngc_number VARCHAR)", "instruction": "What is Pegasus' right ascension with a 7318a NGC?", "output": "SELECT right_ascension___j2000__ FROM table_name_67 WHERE constellation = \"pegasus\" AND ngc_number = \"7318a\"" }
### INSTRUCTION What was the original title for the film used in nomination of street days? ### INPUT CREATE TABLE table_name_91 (original_title VARCHAR, film_title_used_in_nomination VARCHAR) ### OUTPUT SELECT original_title FROM table_name_91 WHERE film_title_used_in_nomination = "street days"
{ "input": "CREATE TABLE table_name_91 (original_title VARCHAR, film_title_used_in_nomination VARCHAR)", "instruction": "What was the original title for the film used in nomination of street days?", "output": "SELECT original_title FROM table_name_91 WHERE film_title_used_in_nomination = \"street days\"" }
### INSTRUCTION Name the award for candida scott knight ### INPUT CREATE TABLE table_name_78 (award VARCHAR, director_s_ VARCHAR) ### OUTPUT SELECT award FROM table_name_78 WHERE director_s_ = "candida scott knight"
{ "input": "CREATE TABLE table_name_78 (award VARCHAR, director_s_ VARCHAR)", "instruction": "Name the award for candida scott knight", "output": "SELECT award FROM table_name_78 WHERE director_s_ = \"candida scott knight\"" }
### INSTRUCTION What is the current status for GM Advanced Design with more than 41 seats? ### INPUT CREATE TABLE table_name_64 (current_status VARCHAR, make VARCHAR, number_of_seats VARCHAR) ### OUTPUT SELECT current_status FROM table_name_64 WHERE make = "gm advanced design" AND number_of_seats > 41
{ "input": "CREATE TABLE table_name_64 (current_status VARCHAR, make VARCHAR, number_of_seats VARCHAR)", "instruction": "What is the current status for GM Advanced Design with more than 41 seats?", "output": "SELECT current_status FROM table_name_64 WHERE make = \"gm advanced design\" AND number_of_seats > 41" }
### INSTRUCTION What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ? ### INPUT CREATE TABLE results (fastestlapspeed INTEGER, raceid VARCHAR); CREATE TABLE races (raceid VARCHAR, year VARCHAR, name VARCHAR) ### OUTPUT SELECT MAX(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = "Monaco Grand Prix"
{ "input": "CREATE TABLE results (fastestlapspeed INTEGER, raceid VARCHAR); CREATE TABLE races (raceid VARCHAR, year VARCHAR, name VARCHAR)", "instruction": "What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?", "output": "SELECT MAX(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = \"Monaco Grand Prix\"" }
### INSTRUCTION Name the venue for friendly competition october 16, 2012 ### INPUT CREATE TABLE table_name_89 (venue VARCHAR, competition VARCHAR, date VARCHAR) ### OUTPUT SELECT venue FROM table_name_89 WHERE competition = "friendly" AND date = "october 16, 2012"
{ "input": "CREATE TABLE table_name_89 (venue VARCHAR, competition VARCHAR, date VARCHAR)", "instruction": "Name the venue for friendly competition october 16, 2012", "output": "SELECT venue FROM table_name_89 WHERE competition = \"friendly\" AND date = \"october 16, 2012\"" }
### INSTRUCTION What year did the Nashville Metros have the Regular Season 2nd, central? ### INPUT CREATE TABLE table_name_74 (year VARCHAR, regular_season VARCHAR) ### OUTPUT SELECT year FROM table_name_74 WHERE regular_season = "2nd, central"
{ "input": "CREATE TABLE table_name_74 (year VARCHAR, regular_season VARCHAR)", "instruction": "What year did the Nashville Metros have the Regular Season 2nd, central?", "output": "SELECT year FROM table_name_74 WHERE regular_season = \"2nd, central\"" }
### INSTRUCTION How much January has a Game smaller than 37, and an Opponent of detroit red wings? ### INPUT CREATE TABLE table_name_67 (january VARCHAR, game VARCHAR, opponent VARCHAR) ### OUTPUT SELECT COUNT(january) FROM table_name_67 WHERE game < 37 AND opponent = "detroit red wings"
{ "input": "CREATE TABLE table_name_67 (january VARCHAR, game VARCHAR, opponent VARCHAR)", "instruction": "How much January has a Game smaller than 37, and an Opponent of detroit red wings?", "output": "SELECT COUNT(january) FROM table_name_67 WHERE game < 37 AND opponent = \"detroit red wings\"" }
### INSTRUCTION What is the name of UMass Boston's softball stadium? ### INPUT CREATE TABLE table_1974545_3 (softball_stadium VARCHAR, school VARCHAR) ### OUTPUT SELECT softball_stadium FROM table_1974545_3 WHERE school = "UMass Boston"
{ "input": "CREATE TABLE table_1974545_3 (softball_stadium VARCHAR, school VARCHAR)", "instruction": "What is the name of UMass Boston's softball stadium?", "output": "SELECT softball_stadium FROM table_1974545_3 WHERE school = \"UMass Boston\"" }
### INSTRUCTION How many reports were the for the cleveland burke lakefront airport circut? ### INPUT CREATE TABLE table_10707176_2 (report VARCHAR, circuit VARCHAR) ### OUTPUT SELECT COUNT(report) FROM table_10707176_2 WHERE circuit = "Cleveland Burke Lakefront Airport"
{ "input": "CREATE TABLE table_10707176_2 (report VARCHAR, circuit VARCHAR)", "instruction": "How many reports were the for the cleveland burke lakefront airport circut?", "output": "SELECT COUNT(report) FROM table_10707176_2 WHERE circuit = \"Cleveland Burke Lakefront Airport\"" }
### INSTRUCTION Name the first broadcast for tina malone and joe wilkinson ### INPUT CREATE TABLE table_23292220_17 (first_broadcast VARCHAR, seans_team VARCHAR) ### OUTPUT SELECT first_broadcast FROM table_23292220_17 WHERE seans_team = "Tina Malone and Joe Wilkinson"
{ "input": "CREATE TABLE table_23292220_17 (first_broadcast VARCHAR, seans_team VARCHAR)", "instruction": "Name the first broadcast for tina malone and joe wilkinson", "output": "SELECT first_broadcast FROM table_23292220_17 WHERE seans_team = \"Tina Malone and Joe Wilkinson\"" }
### INSTRUCTION What is the Date of the match with a Score in the final of 6–3, 6–3, 2–6, 6–4? ### INPUT CREATE TABLE table_name_9 (date VARCHAR, score_in_the_final VARCHAR) ### OUTPUT SELECT date FROM table_name_9 WHERE score_in_the_final = "6–3, 6–3, 2–6, 6–4"
{ "input": "CREATE TABLE table_name_9 (date VARCHAR, score_in_the_final VARCHAR)", "instruction": "What is the Date of the match with a Score in the final of 6–3, 6–3, 2–6, 6–4?", "output": "SELECT date FROM table_name_9 WHERE score_in_the_final = \"6–3, 6–3, 2–6, 6–4\"" }
### INSTRUCTION What is the total number of gold medals won by nations that won 2 silver medals but fewer than 7 in total? ### INPUT CREATE TABLE table_name_24 (gold INTEGER, silver VARCHAR, total VARCHAR) ### OUTPUT SELECT SUM(gold) FROM table_name_24 WHERE silver = 2 AND total < 7
{ "input": "CREATE TABLE table_name_24 (gold INTEGER, silver VARCHAR, total VARCHAR)", "instruction": "What is the total number of gold medals won by nations that won 2 silver medals but fewer than 7 in total?", "output": "SELECT SUM(gold) FROM table_name_24 WHERE silver = 2 AND total < 7" }
### INSTRUCTION Who was the 1999-2002 Years for Grizzlies small forward Player who was from the United States? ### INPUT CREATE TABLE table_name_71 (player VARCHAR, years_for_grizzlies VARCHAR, nationality VARCHAR, position VARCHAR) ### OUTPUT SELECT player FROM table_name_71 WHERE nationality = "united states" AND position = "small forward" AND years_for_grizzlies = "1999-2002"
{ "input": "CREATE TABLE table_name_71 (player VARCHAR, years_for_grizzlies VARCHAR, nationality VARCHAR, position VARCHAR)", "instruction": "Who was the 1999-2002 Years for Grizzlies small forward Player who was from the United States?", "output": "SELECT player FROM table_name_71 WHERE nationality = \"united states\" AND position = \"small forward\" AND years_for_grizzlies = \"1999-2002\"" }
### INSTRUCTION What was the to par that goes with the score 68-74-69=211? ### INPUT CREATE TABLE table_name_70 (to_par VARCHAR, score VARCHAR) ### OUTPUT SELECT to_par FROM table_name_70 WHERE score = 68 - 74 - 69 = 211
{ "input": "CREATE TABLE table_name_70 (to_par VARCHAR, score VARCHAR)", "instruction": "What was the to par that goes with the score 68-74-69=211?", "output": "SELECT to_par FROM table_name_70 WHERE score = 68 - 74 - 69 = 211" }
### INSTRUCTION What is the occupation of the candidate that has a riding of labrador? ### INPUT CREATE TABLE table_name_11 (occupation VARCHAR, riding VARCHAR) ### OUTPUT SELECT occupation FROM table_name_11 WHERE riding = "labrador"
{ "input": "CREATE TABLE table_name_11 (occupation VARCHAR, riding VARCHAR)", "instruction": "What is the occupation of the candidate that has a riding of labrador?", "output": "SELECT occupation FROM table_name_11 WHERE riding = \"labrador\"" }
### INSTRUCTION What was the record when the TKO (elbows) method was used? ### INPUT CREATE TABLE table_name_12 (record VARCHAR, method VARCHAR) ### OUTPUT SELECT record FROM table_name_12 WHERE method = "tko (elbows)"
{ "input": "CREATE TABLE table_name_12 (record VARCHAR, method VARCHAR)", "instruction": "What was the record when the TKO (elbows) method was used?", "output": "SELECT record FROM table_name_12 WHERE method = \"tko (elbows)\"" }
### INSTRUCTION Who was the director of the film with an original title of "16 Days in Afghanistan"? ### INPUT CREATE TABLE table_17155250_1 (director VARCHAR, original_title VARCHAR) ### OUTPUT SELECT director FROM table_17155250_1 WHERE original_title = "16 Days in Afghanistan"
{ "input": "CREATE TABLE table_17155250_1 (director VARCHAR, original_title VARCHAR)", "instruction": "Who was the director of the film with an original title of \"16 Days in Afghanistan\"? ", "output": "SELECT director FROM table_17155250_1 WHERE original_title = \"16 Days in Afghanistan\"" }
### INSTRUCTION What is the release date of the mm series, which has the title tom thumb in trouble? ### INPUT CREATE TABLE table_name_40 (release_date VARCHAR, series VARCHAR, title VARCHAR) ### OUTPUT SELECT release_date FROM table_name_40 WHERE series = "mm" AND title = "tom thumb in trouble"
{ "input": "CREATE TABLE table_name_40 (release_date VARCHAR, series VARCHAR, title VARCHAR)", "instruction": "What is the release date of the mm series, which has the title tom thumb in trouble?", "output": "SELECT release_date FROM table_name_40 WHERE series = \"mm\" AND title = \"tom thumb in trouble\"" }
### INSTRUCTION What was the transfer fee for the player ending in 2011 and moving from Thrasyvoulos? ### INPUT CREATE TABLE table_name_97 (transfer_fee VARCHAR, ends VARCHAR, moving_from VARCHAR) ### OUTPUT SELECT transfer_fee FROM table_name_97 WHERE ends = 2011 AND moving_from = "thrasyvoulos"
{ "input": "CREATE TABLE table_name_97 (transfer_fee VARCHAR, ends VARCHAR, moving_from VARCHAR)", "instruction": "What was the transfer fee for the player ending in 2011 and moving from Thrasyvoulos?", "output": "SELECT transfer_fee FROM table_name_97 WHERE ends = 2011 AND moving_from = \"thrasyvoulos\"" }
### INSTRUCTION What's the average interview with Preliminaries larger than 8.27, an Evening Gown of 8.85, and an Average smaller than 8.842? ### INPUT CREATE TABLE table_name_65 (interview INTEGER, average VARCHAR, preliminaries VARCHAR, evening_gown VARCHAR) ### OUTPUT SELECT AVG(interview) FROM table_name_65 WHERE preliminaries > 8.27 AND evening_gown = 8.85 AND average < 8.842
{ "input": "CREATE TABLE table_name_65 (interview INTEGER, average VARCHAR, preliminaries VARCHAR, evening_gown VARCHAR)", "instruction": "What's the average interview with Preliminaries larger than 8.27, an Evening Gown of 8.85, and an Average smaller than 8.842?", "output": "SELECT AVG(interview) FROM table_name_65 WHERE preliminaries > 8.27 AND evening_gown = 8.85 AND average < 8.842" }
### INSTRUCTION What was the archive for the episode with a run time of 25:24? ### INPUT CREATE TABLE table_2102714_1 (archive VARCHAR, run_time VARCHAR) ### OUTPUT SELECT archive FROM table_2102714_1 WHERE run_time = "25:24"
{ "input": "CREATE TABLE table_2102714_1 (archive VARCHAR, run_time VARCHAR)", "instruction": "What was the archive for the episode with a run time of 25:24?", "output": "SELECT archive FROM table_2102714_1 WHERE run_time = \"25:24\"" }
### INSTRUCTION Who is the candidate that was first elected in 1914? ### INPUT CREATE TABLE table_1341973_11 (candidates VARCHAR, first_elected VARCHAR) ### OUTPUT SELECT candidates FROM table_1341973_11 WHERE first_elected = 1914
{ "input": "CREATE TABLE table_1341973_11 (candidates VARCHAR, first_elected VARCHAR)", "instruction": "Who is the candidate that was first elected in 1914?", "output": "SELECT candidates FROM table_1341973_11 WHERE first_elected = 1914" }
### INSTRUCTION What is the score 1 for the major league soccer all-star game? ### INPUT CREATE TABLE table_name_20 (score1 VARCHAR, competition_or_tour VARCHAR) ### OUTPUT SELECT score1 FROM table_name_20 WHERE competition_or_tour = "major league soccer all-star game"
{ "input": "CREATE TABLE table_name_20 (score1 VARCHAR, competition_or_tour VARCHAR)", "instruction": "What is the score 1 for the major league soccer all-star game?", "output": "SELECT score1 FROM table_name_20 WHERE competition_or_tour = \"major league soccer all-star game\"" }
### INSTRUCTION What are the names of representatives and the dates of elections they participated in. ### INPUT CREATE TABLE election (Date VARCHAR, Representative_ID VARCHAR); CREATE TABLE representative (Name VARCHAR, Representative_ID VARCHAR) ### OUTPUT SELECT T2.Name, T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID
{ "input": "CREATE TABLE election (Date VARCHAR, Representative_ID VARCHAR); CREATE TABLE representative (Name VARCHAR, Representative_ID VARCHAR)", "instruction": "What are the names of representatives and the dates of elections they participated in.", "output": "SELECT T2.Name, T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID" }
### INSTRUCTION What is the lowest Bike No, when Driver / Passenger is Joris Hendrickx / Kaspars Liepins, and when Position is less than 4? ### INPUT CREATE TABLE table_name_13 (bike_no INTEGER, driver___passenger VARCHAR, position VARCHAR) ### OUTPUT SELECT MIN(bike_no) FROM table_name_13 WHERE driver___passenger = "joris hendrickx / kaspars liepins" AND position < 4
{ "input": "CREATE TABLE table_name_13 (bike_no INTEGER, driver___passenger VARCHAR, position VARCHAR)", "instruction": "What is the lowest Bike No, when Driver / Passenger is Joris Hendrickx / Kaspars Liepins, and when Position is less than 4?", "output": "SELECT MIN(bike_no) FROM table_name_13 WHERE driver___passenger = \"joris hendrickx / kaspars liepins\" AND position < 4" }
### INSTRUCTION What was the average Jersey # of Steve Griffith, when his Weight (kg) was less than 84? ### INPUT CREATE TABLE table_name_71 (jersey__number INTEGER, name VARCHAR, weight__kg_ VARCHAR) ### OUTPUT SELECT AVG(jersey__number) FROM table_name_71 WHERE name = "steve griffith" AND weight__kg_ < 84
{ "input": "CREATE TABLE table_name_71 (jersey__number INTEGER, name VARCHAR, weight__kg_ VARCHAR)", "instruction": "What was the average Jersey # of Steve Griffith, when his Weight (kg) was less than 84?", "output": "SELECT AVG(jersey__number) FROM table_name_71 WHERE name = \"steve griffith\" AND weight__kg_ < 84" }
### INSTRUCTION How many seasons has UPS sponsored a car with a number larger than 17? ### INPUT CREATE TABLE table_name_9 (season VARCHAR, car__number VARCHAR, sponsor VARCHAR) ### OUTPUT SELECT COUNT(season) FROM table_name_9 WHERE car__number > 17 AND sponsor = "ups"
{ "input": "CREATE TABLE table_name_9 (season VARCHAR, car__number VARCHAR, sponsor VARCHAR)", "instruction": "How many seasons has UPS sponsored a car with a number larger than 17?", "output": "SELECT COUNT(season) FROM table_name_9 WHERE car__number > 17 AND sponsor = \"ups\"" }
### INSTRUCTION What is the average first round for Utah Jazz team, with a weight smaller than 229? ### INPUT CREATE TABLE table_name_29 (first_round INTEGER, weight VARCHAR, team VARCHAR) ### OUTPUT SELECT AVG(first_round) FROM table_name_29 WHERE weight < 229 AND team = "utah jazz"
{ "input": "CREATE TABLE table_name_29 (first_round INTEGER, weight VARCHAR, team VARCHAR)", "instruction": "What is the average first round for Utah Jazz team, with a weight smaller than 229?", "output": "SELECT AVG(first_round) FROM table_name_29 WHERE weight < 229 AND team = \"utah jazz\"" }
### INSTRUCTION What is Tournament, when 2012 is "Grand Slam Tournaments"? ### INPUT CREATE TABLE table_name_35 (tournament VARCHAR) ### OUTPUT SELECT tournament FROM table_name_35 WHERE 2012 = "grand slam tournaments"
{ "input": "CREATE TABLE table_name_35 (tournament VARCHAR)", "instruction": "What is Tournament, when 2012 is \"Grand Slam Tournaments\"?", "output": "SELECT tournament FROM table_name_35 WHERE 2012 = \"grand slam tournaments\"" }
### INSTRUCTION what's the margin where runner(s)-up is phil mickelson ### INPUT CREATE TABLE table_11570261_1 (margin VARCHAR, runner_s__up VARCHAR) ### OUTPUT SELECT margin FROM table_11570261_1 WHERE runner_s__up = "Phil Mickelson"
{ "input": "CREATE TABLE table_11570261_1 (margin VARCHAR, runner_s__up VARCHAR)", "instruction": " what's the margin where runner(s)-up is phil mickelson", "output": "SELECT margin FROM table_11570261_1 WHERE runner_s__up = \"Phil Mickelson\"" }
### INSTRUCTION NAME THE OVERALL FOR THE OMAHA (USHL) CLUB TEAM ### INPUT CREATE TABLE table_11803648_17 (overall INTEGER, club_team VARCHAR) ### OUTPUT SELECT MIN(overall) FROM table_11803648_17 WHERE club_team = "Omaha (USHL)"
{ "input": "CREATE TABLE table_11803648_17 (overall INTEGER, club_team VARCHAR)", "instruction": "NAME THE OVERALL FOR THE OMAHA (USHL) CLUB TEAM", "output": "SELECT MIN(overall) FROM table_11803648_17 WHERE club_team = \"Omaha (USHL)\"" }
### INSTRUCTION Which city has the most addresses? List the city name, number of addresses, and city id. ### INPUT CREATE TABLE address (city_id VARCHAR); CREATE TABLE city (city VARCHAR, city_id VARCHAR) ### OUTPUT SELECT T2.city, COUNT(*), T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY COUNT(*) DESC LIMIT 1
{ "input": "CREATE TABLE address (city_id VARCHAR); CREATE TABLE city (city VARCHAR, city_id VARCHAR)", "instruction": "Which city has the most addresses? List the city name, number of addresses, and city id.", "output": "SELECT T2.city, COUNT(*), T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY COUNT(*) DESC LIMIT 1" }
### INSTRUCTION What is the venue when the result is 2-0, and the score is 1 goal, and the competition is 1980 afc asian cup? ### INPUT CREATE TABLE table_name_60 (venue VARCHAR, competition VARCHAR, result VARCHAR, score VARCHAR) ### OUTPUT SELECT venue FROM table_name_60 WHERE result = "2-0" AND score = "1 goal" AND competition = "1980 afc asian cup"
{ "input": "CREATE TABLE table_name_60 (venue VARCHAR, competition VARCHAR, result VARCHAR, score VARCHAR)", "instruction": "What is the venue when the result is 2-0, and the score is 1 goal, and the competition is 1980 afc asian cup?", "output": "SELECT venue FROM table_name_60 WHERE result = \"2-0\" AND score = \"1 goal\" AND competition = \"1980 afc asian cup\"" }
### INSTRUCTION What are the students' first names who have both cats and dogs as pets? ### INPUT CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE student (Fname VARCHAR, stuid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR) ### OUTPUT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog'
{ "input": "CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE student (Fname VARCHAR, stuid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR)", "instruction": "What are the students' first names who have both cats and dogs as pets?", "output": "SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog'" }
### INSTRUCTION Which vocal type has the band mate with first name "Solveig" played the most? ### INPUT CREATE TABLE vocals (bandmate VARCHAR); CREATE TABLE band (id VARCHAR) ### OUTPUT SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = "Solveig" GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1
{ "input": "CREATE TABLE vocals (bandmate VARCHAR); CREATE TABLE band (id VARCHAR)", "instruction": "Which vocal type has the band mate with first name \"Solveig\" played the most?", "output": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = \"Solveig\" GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1" }
### INSTRUCTION What is the location of the Carousel toll plaza? ### INPUT CREATE TABLE table_1211545_2 (location VARCHAR, name VARCHAR) ### OUTPUT SELECT location FROM table_1211545_2 WHERE name = "Carousel Toll Plaza"
{ "input": "CREATE TABLE table_1211545_2 (location VARCHAR, name VARCHAR)", "instruction": "What is the location of the Carousel toll plaza?", "output": "SELECT location FROM table_1211545_2 WHERE name = \"Carousel Toll Plaza\"" }
### INSTRUCTION Who is the no. 4 team that has the no. 5 player Susana Telmo? ### INPUT CREATE TABLE table_name_46 (no4 VARCHAR, no5 VARCHAR) ### OUTPUT SELECT no4 FROM table_name_46 WHERE no5 = "susana telmo"
{ "input": "CREATE TABLE table_name_46 (no4 VARCHAR, no5 VARCHAR)", "instruction": "Who is the no. 4 team that has the no. 5 player Susana Telmo?", "output": "SELECT no4 FROM table_name_46 WHERE no5 = \"susana telmo\"" }
### INSTRUCTION who is the player when the country is united states and the score is 71-73=144? ### INPUT CREATE TABLE table_name_93 (player VARCHAR, country VARCHAR, score VARCHAR) ### OUTPUT SELECT player FROM table_name_93 WHERE country = "united states" AND score = 71 - 73 = 144
{ "input": "CREATE TABLE table_name_93 (player VARCHAR, country VARCHAR, score VARCHAR)", "instruction": "who is the player when the country is united states and the score is 71-73=144?", "output": "SELECT player FROM table_name_93 WHERE country = \"united states\" AND score = 71 - 73 = 144" }
### INSTRUCTION Who won the XXIV Gran Premio di Pescara in the sports car class? ### INPUT CREATE TABLE table_name_81 (driver_s VARCHAR, class VARCHAR, race_title VARCHAR) ### OUTPUT SELECT driver_s FROM table_name_81 WHERE class = "sports car" AND race_title = "xxiv gran premio di pescara"
{ "input": "CREATE TABLE table_name_81 (driver_s VARCHAR, class VARCHAR, race_title VARCHAR)", "instruction": "Who won the XXIV Gran Premio di Pescara in the sports car class?", "output": "SELECT driver_s FROM table_name_81 WHERE class = \"sports car\" AND race_title = \"xxiv gran premio di pescara\"" }
### INSTRUCTION Can you tell me the Year(s) Won that has the Country of united states, and the Total larger than 152? ### INPUT CREATE TABLE table_name_62 (year_s__won VARCHAR, country VARCHAR, total VARCHAR) ### OUTPUT SELECT year_s__won FROM table_name_62 WHERE country = "united states" AND total > 152
{ "input": "CREATE TABLE table_name_62 (year_s__won VARCHAR, country VARCHAR, total VARCHAR)", "instruction": "Can you tell me the Year(s) Won that has the Country of united states, and the Total larger than 152?", "output": "SELECT year_s__won FROM table_name_62 WHERE country = \"united states\" AND total > 152" }
### INSTRUCTION List from which date and to which date these staff work: project staff of the project which hires the most staffs ### INPUT CREATE TABLE Project_Staff (date_from VARCHAR, date_to VARCHAR, project_id VARCHAR, role_code VARCHAR) ### OUTPUT SELECT date_from, date_to FROM Project_Staff WHERE project_id IN (SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY COUNT(*) DESC LIMIT 1) UNION SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'leader'
{ "input": "CREATE TABLE Project_Staff (date_from VARCHAR, date_to VARCHAR, project_id VARCHAR, role_code VARCHAR)", "instruction": "List from which date and to which date these staff work: project staff of the project which hires the most staffs", "output": "SELECT date_from, date_to FROM Project_Staff WHERE project_id IN (SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY COUNT(*) DESC LIMIT 1) UNION SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'leader'" }
### INSTRUCTION Name the party for yvette clarke (d) 90.6% hugh carr (r) 9.4% ### INPUT CREATE TABLE table_19753079_35 (party VARCHAR, candidates VARCHAR) ### OUTPUT SELECT party FROM table_19753079_35 WHERE candidates = "Yvette Clarke (D) 90.6% Hugh Carr (R) 9.4%"
{ "input": "CREATE TABLE table_19753079_35 (party VARCHAR, candidates VARCHAR)", "instruction": "Name the party for yvette clarke (d) 90.6% hugh carr (r) 9.4%", "output": "SELECT party FROM table_19753079_35 WHERE candidates = \"Yvette Clarke (D) 90.6% Hugh Carr (R) 9.4%\"" }
### INSTRUCTION How many people directed episode 7 In the season? ### INPUT CREATE TABLE table_23937219_3 (directed_by VARCHAR, season__number VARCHAR) ### OUTPUT SELECT COUNT(directed_by) FROM table_23937219_3 WHERE season__number = 7
{ "input": "CREATE TABLE table_23937219_3 (directed_by VARCHAR, season__number VARCHAR)", "instruction": "How many people directed episode 7 In the season?", "output": "SELECT COUNT(directed_by) FROM table_23937219_3 WHERE season__number = 7" }
### INSTRUCTION Find all the zip codes in which the max dew point have never reached 70. ### INPUT CREATE TABLE weather (zip_code VARCHAR, max_dew_point_f VARCHAR) ### OUTPUT SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70
{ "input": "CREATE TABLE weather (zip_code VARCHAR, max_dew_point_f VARCHAR)", "instruction": "Find all the zip codes in which the max dew point have never reached 70.", "output": "SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70" }
### INSTRUCTION How many episodes had celebrity guest stars Frank Skinner and Lee Mack? ### INPUT CREATE TABLE table_24725951_1 (episode VARCHAR, celebrities VARCHAR) ### OUTPUT SELECT COUNT(episode) FROM table_24725951_1 WHERE celebrities = "Frank Skinner and Lee Mack"
{ "input": "CREATE TABLE table_24725951_1 (episode VARCHAR, celebrities VARCHAR)", "instruction": "How many episodes had celebrity guest stars Frank Skinner and Lee Mack?", "output": "SELECT COUNT(episode) FROM table_24725951_1 WHERE celebrities = \"Frank Skinner and Lee Mack\"" }
### INSTRUCTION Show the names of people that are on affirmative side of debates with number of audience bigger than 200. ### INPUT CREATE TABLE people (Name VARCHAR, People_ID VARCHAR); CREATE TABLE debate (Debate_ID VARCHAR, Num_of_Audience INTEGER); CREATE TABLE debate_people (Debate_ID VARCHAR, Affirmative VARCHAR) ### OUTPUT SELECT T3.Name FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID WHERE T2.Num_of_Audience > 200
{ "input": "CREATE TABLE people (Name VARCHAR, People_ID VARCHAR); CREATE TABLE debate (Debate_ID VARCHAR, Num_of_Audience INTEGER); CREATE TABLE debate_people (Debate_ID VARCHAR, Affirmative VARCHAR)", "instruction": "Show the names of people that are on affirmative side of debates with number of audience bigger than 200.", "output": "SELECT T3.Name FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID WHERE T2.Num_of_Audience > 200" }
### INSTRUCTION what rank has viewers at 6.45? ### INPUT CREATE TABLE table_15681686_4 (rank__week_ VARCHAR, viewers__millions_ VARCHAR) ### OUTPUT SELECT rank__week_ FROM table_15681686_4 WHERE viewers__millions_ = "6.45"
{ "input": "CREATE TABLE table_15681686_4 (rank__week_ VARCHAR, viewers__millions_ VARCHAR)", "instruction": "what rank has viewers at 6.45?", "output": "SELECT rank__week_ FROM table_15681686_4 WHERE viewers__millions_ = \"6.45\"" }
### INSTRUCTION What was the time when the laps were smaller than 66 and the grid was 15? ### INPUT CREATE TABLE table_name_62 (time_retired VARCHAR, laps VARCHAR, grid VARCHAR) ### OUTPUT SELECT time_retired FROM table_name_62 WHERE laps < 66 AND grid = 15
{ "input": "CREATE TABLE table_name_62 (time_retired VARCHAR, laps VARCHAR, grid VARCHAR)", "instruction": "What was the time when the laps were smaller than 66 and the grid was 15?", "output": "SELECT time_retired FROM table_name_62 WHERE laps < 66 AND grid = 15" }
### INSTRUCTION Find the average ram mib size of the chip models that are never used by any phone. ### INPUT CREATE TABLE chip_model (RAM_MiB INTEGER, model_name VARCHAR, chip_model VARCHAR); CREATE TABLE phone (RAM_MiB INTEGER, model_name VARCHAR, chip_model VARCHAR) ### OUTPUT SELECT AVG(RAM_MiB) FROM chip_model WHERE NOT model_name IN (SELECT chip_model FROM phone)
{ "input": "CREATE TABLE chip_model (RAM_MiB INTEGER, model_name VARCHAR, chip_model VARCHAR); CREATE TABLE phone (RAM_MiB INTEGER, model_name VARCHAR, chip_model VARCHAR)", "instruction": "Find the average ram mib size of the chip models that are never used by any phone.", "output": "SELECT AVG(RAM_MiB) FROM chip_model WHERE NOT model_name IN (SELECT chip_model FROM phone)" }
### INSTRUCTION What is the Place of the Player with a To par of –10 and a Score of 67-67-66=200? ### INPUT CREATE TABLE table_name_89 (place VARCHAR, to_par VARCHAR, score VARCHAR) ### OUTPUT SELECT place FROM table_name_89 WHERE to_par = "–10" AND score = 67 - 67 - 66 = 200
{ "input": "CREATE TABLE table_name_89 (place VARCHAR, to_par VARCHAR, score VARCHAR)", "instruction": "What is the Place of the Player with a To par of –10 and a Score of 67-67-66=200?", "output": "SELECT place FROM table_name_89 WHERE to_par = \"–10\" AND score = 67 - 67 - 66 = 200" }
### INSTRUCTION Where did the player place who is from the United States, who made more than $216, and whose score was 74-70-71-69=284? ### INPUT CREATE TABLE table_name_71 (place VARCHAR, country VARCHAR, money___$__ VARCHAR, score VARCHAR) ### OUTPUT SELECT place FROM table_name_71 WHERE country = "united states" AND money___$__ > 216 AND score = 74 - 70 - 71 - 69 = 284
{ "input": "CREATE TABLE table_name_71 (place VARCHAR, country VARCHAR, money___$__ VARCHAR, score VARCHAR)", "instruction": "Where did the player place who is from the United States, who made more than $216, and whose score was 74-70-71-69=284?", "output": "SELECT place FROM table_name_71 WHERE country = \"united states\" AND money___$__ > 216 AND score = 74 - 70 - 71 - 69 = 284" }
### INSTRUCTION howe many positions did wallace, mike mike wallace play for ### INPUT CREATE TABLE table_20898602_1 (position VARCHAR, player VARCHAR) ### OUTPUT SELECT COUNT(position) FROM table_20898602_1 WHERE player = "Wallace, Mike Mike Wallace"
{ "input": "CREATE TABLE table_20898602_1 (position VARCHAR, player VARCHAR)", "instruction": "howe many positions did wallace, mike mike wallace play for ", "output": "SELECT COUNT(position) FROM table_20898602_1 WHERE player = \"Wallace, Mike Mike Wallace\"" }
### INSTRUCTION Find distinct cities of address of students? ### INPUT CREATE TABLE students (student_id VARCHAR); CREATE TABLE addresses (city VARCHAR, address_id VARCHAR); CREATE TABLE people_addresses (address_id VARCHAR, person_id VARCHAR) ### OUTPUT SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id
{ "input": "CREATE TABLE students (student_id VARCHAR); CREATE TABLE addresses (city VARCHAR, address_id VARCHAR); CREATE TABLE people_addresses (address_id VARCHAR, person_id VARCHAR)", "instruction": "Find distinct cities of address of students?", "output": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id" }
### INSTRUCTION Name the sprint classification being alejandro valverde ### INPUT CREATE TABLE table_22713796_14 (sprint_classification VARCHAR, winner VARCHAR) ### OUTPUT SELECT sprint_classification FROM table_22713796_14 WHERE winner = "Alejandro Valverde"
{ "input": "CREATE TABLE table_22713796_14 (sprint_classification VARCHAR, winner VARCHAR)", "instruction": "Name the sprint classification being alejandro valverde", "output": "SELECT sprint_classification FROM table_22713796_14 WHERE winner = \"Alejandro Valverde\"" }
### INSTRUCTION Which young classification has general classification of Christian Vande Velde for Team Columbia and Mark Cavendish? ### INPUT CREATE TABLE table_name_26 (young_classification VARCHAR, sprint_classification VARCHAR, general_classification VARCHAR, team_classification VARCHAR) ### OUTPUT SELECT young_classification FROM table_name_26 WHERE general_classification = "christian vande velde" AND team_classification = "team columbia" AND sprint_classification = "mark cavendish"
{ "input": "CREATE TABLE table_name_26 (young_classification VARCHAR, sprint_classification VARCHAR, general_classification VARCHAR, team_classification VARCHAR)", "instruction": "Which young classification has general classification of Christian Vande Velde for Team Columbia and Mark Cavendish?", "output": "SELECT young_classification FROM table_name_26 WHERE general_classification = \"christian vande velde\" AND team_classification = \"team columbia\" AND sprint_classification = \"mark cavendish\"" }
### INSTRUCTION Who had 41.76% yes votes ### INPUT CREATE TABLE table_256286_20 (description VARCHAR, _percentage_yes VARCHAR) ### OUTPUT SELECT description FROM table_256286_20 WHERE _percentage_yes = "41.76%"
{ "input": "CREATE TABLE table_256286_20 (description VARCHAR, _percentage_yes VARCHAR)", "instruction": "Who had 41.76% yes votes", "output": "SELECT description FROM table_256286_20 WHERE _percentage_yes = \"41.76%\"" }
### INSTRUCTION Who is the successor when florida territory at-large is the district? ### INPUT CREATE TABLE table_225100_4 (successor VARCHAR, district VARCHAR) ### OUTPUT SELECT successor FROM table_225100_4 WHERE district = "Florida Territory At-large"
{ "input": "CREATE TABLE table_225100_4 (successor VARCHAR, district VARCHAR)", "instruction": "Who is the successor when florida territory at-large is the district?", "output": "SELECT successor FROM table_225100_4 WHERE district = \"Florida Territory At-large\"" }
### INSTRUCTION Find the student ID and login name of the student with the most course enrollments ### INPUT CREATE TABLE Student_Course_Enrolment (student_id VARCHAR); CREATE TABLE Students (login_name VARCHAR, student_id VARCHAR) ### OUTPUT SELECT T1.student_id, T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1
{ "input": "CREATE TABLE Student_Course_Enrolment (student_id VARCHAR); CREATE TABLE Students (login_name VARCHAR, student_id VARCHAR)", "instruction": "Find the student ID and login name of the student with the most course enrollments", "output": "SELECT T1.student_id, T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1" }
### INSTRUCTION List the area codes in which voters voted both for the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'. ### INPUT CREATE TABLE votes (contestant_number VARCHAR, state VARCHAR); CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR); CREATE TABLE area_code_state (area_code VARCHAR, state VARCHAR) ### OUTPUT SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Tabatha Gehling' INTERSECT SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Kelly Clauss'
{ "input": "CREATE TABLE votes (contestant_number VARCHAR, state VARCHAR); CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR); CREATE TABLE area_code_state (area_code VARCHAR, state VARCHAR)", "instruction": "List the area codes in which voters voted both for the contestant 'Tabatha Gehling' and the contestant 'Kelly Clauss'.", "output": "SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Tabatha Gehling' INTERSECT SELECT T3.area_code FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number JOIN area_code_state AS T3 ON T2.state = T3.state WHERE T1.contestant_name = 'Kelly Clauss'" }
### INSTRUCTION What is the Position of Pick #321? ### INPUT CREATE TABLE table_name_97 (position VARCHAR, pick__number VARCHAR) ### OUTPUT SELECT position FROM table_name_97 WHERE pick__number = 321
{ "input": "CREATE TABLE table_name_97 (position VARCHAR, pick__number VARCHAR)", "instruction": "What is the Position of Pick #321?", "output": "SELECT position FROM table_name_97 WHERE pick__number = 321" }
### INSTRUCTION How many power stations are connected to grid at Heysham 2 ### INPUT CREATE TABLE table_143352_1 (connected_to_grid VARCHAR, agr_power_station VARCHAR) ### OUTPUT SELECT COUNT(connected_to_grid) FROM table_143352_1 WHERE agr_power_station = "Heysham 2"
{ "input": "CREATE TABLE table_143352_1 (connected_to_grid VARCHAR, agr_power_station VARCHAR)", "instruction": "How many power stations are connected to grid at Heysham 2", "output": "SELECT COUNT(connected_to_grid) FROM table_143352_1 WHERE agr_power_station = \"Heysham 2\"" }
### INSTRUCTION What is the lowest Division, when Goals are less than 10, when Team is Dalian Shide, when Apps are less than 17, and when Season is 2007? ### INPUT CREATE TABLE table_name_79 (division INTEGER, season VARCHAR, apps VARCHAR, goals VARCHAR, team VARCHAR) ### OUTPUT SELECT MIN(division) FROM table_name_79 WHERE goals < 10 AND team = "dalian shide" AND apps < 17 AND season = "2007"
{ "input": "CREATE TABLE table_name_79 (division INTEGER, season VARCHAR, apps VARCHAR, goals VARCHAR, team VARCHAR)", "instruction": "What is the lowest Division, when Goals are less than 10, when Team is Dalian Shide, when Apps are less than 17, and when Season is 2007?", "output": "SELECT MIN(division) FROM table_name_79 WHERE goals < 10 AND team = \"dalian shide\" AND apps < 17 AND season = \"2007\"" }
### INSTRUCTION Give me ids for all the trip that took place in a zip code area with average mean temperature above 60. ### INPUT CREATE TABLE trip (id VARCHAR, zip_code VARCHAR); CREATE TABLE weather (zip_code VARCHAR, mean_temperature_f INTEGER) ### OUTPUT SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.zip_code HAVING AVG(T2.mean_temperature_f) > 60
{ "input": "CREATE TABLE trip (id VARCHAR, zip_code VARCHAR); CREATE TABLE weather (zip_code VARCHAR, mean_temperature_f INTEGER)", "instruction": "Give me ids for all the trip that took place in a zip code area with average mean temperature above 60.", "output": "SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.zip_code HAVING AVG(T2.mean_temperature_f) > 60" }
### INSTRUCTION What is the record when the visiting team was the Quebec Nordiques on April 22? ### INPUT CREATE TABLE table_name_26 (record VARCHAR, visitor VARCHAR, date VARCHAR) ### OUTPUT SELECT record FROM table_name_26 WHERE visitor = "quebec nordiques" AND date = "april 22"
{ "input": "CREATE TABLE table_name_26 (record VARCHAR, visitor VARCHAR, date VARCHAR)", "instruction": "What is the record when the visiting team was the Quebec Nordiques on April 22?", "output": "SELECT record FROM table_name_26 WHERE visitor = \"quebec nordiques\" AND date = \"april 22\"" }
### INSTRUCTION what is the date for the game in prague for the world group, consolation round competition? ### INPUT CREATE TABLE table_name_57 (date VARCHAR, location VARCHAR, competition VARCHAR) ### OUTPUT SELECT date FROM table_name_57 WHERE location = "prague" AND competition = "world group, consolation round"
{ "input": "CREATE TABLE table_name_57 (date VARCHAR, location VARCHAR, competition VARCHAR)", "instruction": "what is the date for the game in prague for the world group, consolation round competition?", "output": "SELECT date FROM table_name_57 WHERE location = \"prague\" AND competition = \"world group, consolation round\"" }
### INSTRUCTION On what surface was the tournament with opponents kathleen horvath marcella mesker in the finals? ### INPUT CREATE TABLE table_name_1 (surface VARCHAR, opponents_in_the_final VARCHAR) ### OUTPUT SELECT surface FROM table_name_1 WHERE opponents_in_the_final = "kathleen horvath marcella mesker"
{ "input": "CREATE TABLE table_name_1 (surface VARCHAR, opponents_in_the_final VARCHAR)", "instruction": "On what surface was the tournament with opponents kathleen horvath marcella mesker in the finals?", "output": "SELECT surface FROM table_name_1 WHERE opponents_in_the_final = \"kathleen horvath marcella mesker\"" }
### INSTRUCTION Who are the candidates when the incumbent is john pegram? ### INPUT CREATE TABLE table_2668336_24 (candidates VARCHAR, incumbent VARCHAR) ### OUTPUT SELECT candidates FROM table_2668336_24 WHERE incumbent = "John Pegram"
{ "input": "CREATE TABLE table_2668336_24 (candidates VARCHAR, incumbent VARCHAR)", "instruction": "Who are the candidates when the incumbent is john pegram?", "output": "SELECT candidates FROM table_2668336_24 WHERE incumbent = \"John Pegram\"" }
### INSTRUCTION What is the least obesity rank for the state of Utah? ### INPUT CREATE TABLE table_18958648_1 (obesity_rank INTEGER, state_and_district_of_columbia VARCHAR) ### OUTPUT SELECT MIN(obesity_rank) FROM table_18958648_1 WHERE state_and_district_of_columbia = "Utah"
{ "input": "CREATE TABLE table_18958648_1 (obesity_rank INTEGER, state_and_district_of_columbia VARCHAR)", "instruction": "What is the least obesity rank for the state of Utah?", "output": "SELECT MIN(obesity_rank) FROM table_18958648_1 WHERE state_and_district_of_columbia = \"Utah\"" }
### INSTRUCTION What is the average Yards with an average of less than 4 and the long is 12 with less than 29 attempts? ### INPUT CREATE TABLE table_name_53 (yards INTEGER, attempts VARCHAR, average VARCHAR, long VARCHAR) ### OUTPUT SELECT AVG(yards) FROM table_name_53 WHERE average < 4 AND long = 12 AND attempts < 29
{ "input": "CREATE TABLE table_name_53 (yards INTEGER, attempts VARCHAR, average VARCHAR, long VARCHAR)", "instruction": "What is the average Yards with an average of less than 4 and the long is 12 with less than 29 attempts?", "output": "SELECT AVG(yards) FROM table_name_53 WHERE average < 4 AND long = 12 AND attempts < 29" }
### INSTRUCTION Which opponent was present on April 14? ### INPUT CREATE TABLE table_name_17 (opponent VARCHAR, date VARCHAR) ### OUTPUT SELECT opponent FROM table_name_17 WHERE date = "april 14"
{ "input": "CREATE TABLE table_name_17 (opponent VARCHAR, date VARCHAR)", "instruction": "Which opponent was present on April 14?", "output": "SELECT opponent FROM table_name_17 WHERE date = \"april 14\"" }
### INSTRUCTION What the time of Paul Hession with more than an 0.187 react? ### INPUT CREATE TABLE table_name_76 (time VARCHAR, react VARCHAR, athlete VARCHAR) ### OUTPUT SELECT time FROM table_name_76 WHERE react > 0.187 AND athlete = "paul hession"
{ "input": "CREATE TABLE table_name_76 (time VARCHAR, react VARCHAR, athlete VARCHAR)", "instruction": "What the time of Paul Hession with more than an 0.187 react?", "output": "SELECT time FROM table_name_76 WHERE react > 0.187 AND athlete = \"paul hession\"" }
### INSTRUCTION What was the winning score when the runner-up was Beth Daniel and the margin of victory was 7 strokes? ### INPUT CREATE TABLE table_name_42 (winning_score VARCHAR, runner_s__up VARCHAR, margin_of_victory VARCHAR) ### OUTPUT SELECT winning_score FROM table_name_42 WHERE runner_s__up = "beth daniel" AND margin_of_victory = "7 strokes"
{ "input": "CREATE TABLE table_name_42 (winning_score VARCHAR, runner_s__up VARCHAR, margin_of_victory VARCHAR)", "instruction": "What was the winning score when the runner-up was Beth Daniel and the margin of victory was 7 strokes?", "output": "SELECT winning_score FROM table_name_42 WHERE runner_s__up = \"beth daniel\" AND margin_of_victory = \"7 strokes\"" }
### INSTRUCTION What is Industrial Use (m 3 /p/yr)(in %), when Total Freshwater Withdrawal (km 3/yr) is less than 82.75, and when Agricultural Use (m 3 /p/yr)(in %) is 1363(92%)? ### INPUT CREATE TABLE table_name_32 (industrial_use__m_3__p_yr__in__percentage_ VARCHAR, total_freshwater_withdrawal__km_3__yr_ VARCHAR, agricultural_use__m_3__p_yr__in__percentage_ VARCHAR) ### OUTPUT SELECT industrial_use__m_3__p_yr__in__percentage_ FROM table_name_32 WHERE total_freshwater_withdrawal__km_3__yr_ < 82.75 AND agricultural_use__m_3__p_yr__in__percentage_ = "1363(92%)"
{ "input": "CREATE TABLE table_name_32 (industrial_use__m_3__p_yr__in__percentage_ VARCHAR, total_freshwater_withdrawal__km_3__yr_ VARCHAR, agricultural_use__m_3__p_yr__in__percentage_ VARCHAR)", "instruction": "What is Industrial Use (m 3 /p/yr)(in %), when Total Freshwater Withdrawal (km 3/yr) is less than 82.75, and when Agricultural Use (m 3 /p/yr)(in %) is 1363(92%)?", "output": "SELECT industrial_use__m_3__p_yr__in__percentage_ FROM table_name_32 WHERE total_freshwater_withdrawal__km_3__yr_ < 82.75 AND agricultural_use__m_3__p_yr__in__percentage_ = \"1363(92%)\"" }
### INSTRUCTION Which club/province has more than 9 caps and Ben Franks as a player? ### INPUT CREATE TABLE table_name_44 (club_province VARCHAR, caps VARCHAR, player VARCHAR) ### OUTPUT SELECT club_province FROM table_name_44 WHERE caps > 9 AND player = "ben franks"
{ "input": "CREATE TABLE table_name_44 (club_province VARCHAR, caps VARCHAR, player VARCHAR)", "instruction": "Which club/province has more than 9 caps and Ben Franks as a player?", "output": "SELECT club_province FROM table_name_44 WHERE caps > 9 AND player = \"ben franks\"" }
### INSTRUCTION What is the total number of Length Feet, when Parish is Clarendon, when Km From Kingston is 71.2, and when Length Meters is less than 21.3? ### INPUT CREATE TABLE table_name_97 (length_feet VARCHAR, length_meters VARCHAR, parish VARCHAR, km_from_kingston VARCHAR) ### OUTPUT SELECT COUNT(length_feet) FROM table_name_97 WHERE parish = "clarendon" AND km_from_kingston = 71.2 AND length_meters < 21.3
{ "input": "CREATE TABLE table_name_97 (length_feet VARCHAR, length_meters VARCHAR, parish VARCHAR, km_from_kingston VARCHAR)", "instruction": "What is the total number of Length Feet, when Parish is Clarendon, when Km From Kingston is 71.2, and when Length Meters is less than 21.3?", "output": "SELECT COUNT(length_feet) FROM table_name_97 WHERE parish = \"clarendon\" AND km_from_kingston = 71.2 AND length_meters < 21.3" }
### INSTRUCTION What is the name of the driver with a rotax max engine, in the rotax heavy class, with arrow as chassis and on the TWR Raceline Seating team? ### INPUT CREATE TABLE table_name_32 (driver VARCHAR, team VARCHAR, chassis VARCHAR, engine VARCHAR, class VARCHAR) ### OUTPUT SELECT driver FROM table_name_32 WHERE engine = "rotax max" AND class = "rotax heavy" AND chassis = "arrow" AND team = "twr raceline seating"
{ "input": "CREATE TABLE table_name_32 (driver VARCHAR, team VARCHAR, chassis VARCHAR, engine VARCHAR, class VARCHAR)", "instruction": "What is the name of the driver with a rotax max engine, in the rotax heavy class, with arrow as chassis and on the TWR Raceline Seating team?", "output": "SELECT driver FROM table_name_32 WHERE engine = \"rotax max\" AND class = \"rotax heavy\" AND chassis = \"arrow\" AND team = \"twr raceline seating\"" }
### INSTRUCTION Who was the winning driver with the winning team Opel Team Holzer 1, and a round under 9 with the fastest lap being Bernd Schneider? ### INPUT CREATE TABLE table_name_96 (winning_driver VARCHAR, fastest_lap VARCHAR, winning_team VARCHAR, round VARCHAR) ### OUTPUT SELECT winning_driver FROM table_name_96 WHERE winning_team = "opel team holzer 1" AND round < 9 AND fastest_lap = "bernd schneider"
{ "input": "CREATE TABLE table_name_96 (winning_driver VARCHAR, fastest_lap VARCHAR, winning_team VARCHAR, round VARCHAR)", "instruction": "Who was the winning driver with the winning team Opel Team Holzer 1, and a round under 9 with the fastest lap being Bernd Schneider?", "output": "SELECT winning_driver FROM table_name_96 WHERE winning_team = \"opel team holzer 1\" AND round < 9 AND fastest_lap = \"bernd schneider\"" }
### INSTRUCTION what is the salary and name of the employee who has the most number of aircraft certificates? ### INPUT CREATE TABLE Certificate (eid VARCHAR); CREATE TABLE Employee (name VARCHAR, salary VARCHAR, eid VARCHAR) ### OUTPUT SELECT T1.name, T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY COUNT(*) DESC LIMIT 1
{ "input": "CREATE TABLE Certificate (eid VARCHAR); CREATE TABLE Employee (name VARCHAR, salary VARCHAR, eid VARCHAR)", "instruction": "what is the salary and name of the employee who has the most number of aircraft certificates?", "output": "SELECT T1.name, T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY COUNT(*) DESC LIMIT 1" }
### INSTRUCTION List the name and gender for all artists who released songs in March. ### INPUT CREATE TABLE song (artist_name VARCHAR, releasedate VARCHAR); CREATE TABLE artist (artist_name VARCHAR, gender VARCHAR) ### OUTPUT SELECT T1.artist_name, T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE "%Mar%"
{ "input": "CREATE TABLE song (artist_name VARCHAR, releasedate VARCHAR); CREATE TABLE artist (artist_name VARCHAR, gender VARCHAR)", "instruction": "List the name and gender for all artists who released songs in March.", "output": "SELECT T1.artist_name, T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE \"%Mar%\"" }
### INSTRUCTION What is the average Top-5 for the open championship, and a Top-10 smaller than 2? ### INPUT CREATE TABLE table_name_98 (top_5 INTEGER, tournament VARCHAR, top_10 VARCHAR) ### OUTPUT SELECT AVG(top_5) FROM table_name_98 WHERE tournament = "the open championship" AND top_10 < 2
{ "input": "CREATE TABLE table_name_98 (top_5 INTEGER, tournament VARCHAR, top_10 VARCHAR)", "instruction": "What is the average Top-5 for the open championship, and a Top-10 smaller than 2?", "output": "SELECT AVG(top_5) FROM table_name_98 WHERE tournament = \"the open championship\" AND top_10 < 2" }
### INSTRUCTION What is the nickname of the team that has the colors blue and gold? ### INPUT CREATE TABLE table_name_42 (nickname VARCHAR, colors VARCHAR) ### OUTPUT SELECT nickname FROM table_name_42 WHERE colors = "blue and gold"
{ "input": "CREATE TABLE table_name_42 (nickname VARCHAR, colors VARCHAR)", "instruction": "What is the nickname of the team that has the colors blue and gold?", "output": "SELECT nickname FROM table_name_42 WHERE colors = \"blue and gold\"" }
### INSTRUCTION What is the status for a journal with the ISSN of 0149-1830? ### INPUT CREATE TABLE table_name_62 (status VARCHAR, issn VARCHAR) ### OUTPUT SELECT status FROM table_name_62 WHERE issn = "0149-1830"
{ "input": "CREATE TABLE table_name_62 (status VARCHAR, issn VARCHAR)", "instruction": "What is the status for a journal with the ISSN of 0149-1830?", "output": "SELECT status FROM table_name_62 WHERE issn = \"0149-1830\"" }
### INSTRUCTION how many people commentated where broadcaster is orf ### INPUT CREATE TABLE table_184803_4 (commentator VARCHAR, broadcaster VARCHAR) ### OUTPUT SELECT COUNT(commentator) FROM table_184803_4 WHERE broadcaster = "ORF"
{ "input": "CREATE TABLE table_184803_4 (commentator VARCHAR, broadcaster VARCHAR)", "instruction": "how many people commentated where broadcaster is orf", "output": "SELECT COUNT(commentator) FROM table_184803_4 WHERE broadcaster = \"ORF\"" }
### INSTRUCTION What was the sum of January values with a record of 27-12-3 for a game less than 42? ### INPUT CREATE TABLE table_name_36 (january INTEGER, record VARCHAR, game VARCHAR) ### OUTPUT SELECT SUM(january) FROM table_name_36 WHERE record = "27-12-3" AND game < 42
{ "input": "CREATE TABLE table_name_36 (january INTEGER, record VARCHAR, game VARCHAR)", "instruction": "What was the sum of January values with a record of 27-12-3 for a game less than 42?", "output": "SELECT SUM(january) FROM table_name_36 WHERE record = \"27-12-3\" AND game < 42" }
### INSTRUCTION What was the number of earnings were cuts made are 19 and money list rank is 3? ### INPUT CREATE TABLE table_12821159_14 (earnings__€_ VARCHAR, cuts_made VARCHAR, money_list_rank VARCHAR) ### OUTPUT SELECT earnings__€_ FROM table_12821159_14 WHERE cuts_made = 19 AND money_list_rank = 3
{ "input": "CREATE TABLE table_12821159_14 (earnings__€_ VARCHAR, cuts_made VARCHAR, money_list_rank VARCHAR)", "instruction": "What was the number of earnings were cuts made are 19 and money list rank is 3?", "output": "SELECT earnings__€_ FROM table_12821159_14 WHERE cuts_made = 19 AND money_list_rank = 3" }
### INSTRUCTION What is the position number of the club with more than 24 points and a w-l-d of 8-5-3? ### INPUT CREATE TABLE table_name_99 (position VARCHAR, points VARCHAR, w_l_d VARCHAR) ### OUTPUT SELECT COUNT(position) FROM table_name_99 WHERE points > 24 AND w_l_d = "8-5-3"
{ "input": "CREATE TABLE table_name_99 (position VARCHAR, points VARCHAR, w_l_d VARCHAR)", "instruction": "What is the position number of the club with more than 24 points and a w-l-d of 8-5-3?", "output": "SELECT COUNT(position) FROM table_name_99 WHERE points > 24 AND w_l_d = \"8-5-3\"" }