text
stringlengths 147
1.06k
| source
dict |
---|---|
### INSTRUCTION
What "party" was re-elected in district South Carolina 7?
### INPUT
CREATE TABLE table_2668243_22 (party VARCHAR, result VARCHAR, district VARCHAR)
### OUTPUT
SELECT party FROM table_2668243_22 WHERE result = "Re-elected" AND district = "South Carolina 7" | {
"input": "CREATE TABLE table_2668243_22 (party VARCHAR, result VARCHAR, district VARCHAR)",
"instruction": "What \"party\" was re-elected in district South Carolina 7?",
"output": "SELECT party FROM table_2668243_22 WHERE result = \"Re-elected\" AND district = \"South Carolina 7\""
} |
### INSTRUCTION
What is the location for the software of BIND and an IPv6 address of 2001:503:c27::2:30?
### INPUT
CREATE TABLE table_name_90 (location__numbersites__global_local_ VARCHAR, software VARCHAR, ipv6_address VARCHAR)
### OUTPUT
SELECT location__numbersites__global_local_ FROM table_name_90 WHERE software = "bind" AND ipv6_address = "2001:503:c27::2:30" | {
"input": "CREATE TABLE table_name_90 (location__numbersites__global_local_ VARCHAR, software VARCHAR, ipv6_address VARCHAR)",
"instruction": "What is the location for the software of BIND and an IPv6 address of 2001:503:c27::2:30?",
"output": "SELECT location__numbersites__global_local_ FROM table_name_90 WHERE software = \"bind\" AND ipv6_address = \"2001:503:c27::2:30\""
} |
### INSTRUCTION
I want the plaid cymru for Polling organisation/client of yougov/itv wales for 4 may 2011
### INPUT
CREATE TABLE table_name_77 (plaid_cymru VARCHAR, polling_organisation_client VARCHAR, date_s__conducted VARCHAR)
### OUTPUT
SELECT plaid_cymru FROM table_name_77 WHERE polling_organisation_client = "yougov/itv wales" AND date_s__conducted = "4 may 2011" | {
"input": "CREATE TABLE table_name_77 (plaid_cymru VARCHAR, polling_organisation_client VARCHAR, date_s__conducted VARCHAR)",
"instruction": "I want the plaid cymru for Polling organisation/client of yougov/itv wales for 4 may 2011",
"output": "SELECT plaid_cymru FROM table_name_77 WHERE polling_organisation_client = \"yougov/itv wales\" AND date_s__conducted = \"4 may 2011\""
} |
### INSTRUCTION
How many episodes were originally aired Saturday, May 30, 2009?
### INPUT
CREATE TABLE table_17525955_2 (episode__number VARCHAR, us_air_date VARCHAR)
### OUTPUT
SELECT COUNT(episode__number) FROM table_17525955_2 WHERE us_air_date = "Saturday, May 30, 2009" | {
"input": "CREATE TABLE table_17525955_2 (episode__number VARCHAR, us_air_date VARCHAR)",
"instruction": "How many episodes were originally aired Saturday, May 30, 2009?",
"output": "SELECT COUNT(episode__number) FROM table_17525955_2 WHERE us_air_date = \"Saturday, May 30, 2009\""
} |
### INSTRUCTION
Who was the successor for the state of Maine (2) ?
### INPUT
CREATE TABLE table_225099_3 (successor VARCHAR, state__class_ VARCHAR)
### OUTPUT
SELECT successor FROM table_225099_3 WHERE state__class_ = "Maine (2)" | {
"input": "CREATE TABLE table_225099_3 (successor VARCHAR, state__class_ VARCHAR)",
"instruction": "Who was the successor for the state of Maine (2) ?",
"output": "SELECT successor FROM table_225099_3 WHERE state__class_ = \"Maine (2)\""
} |
### INSTRUCTION
What is the enrollment for Ashland University?
### INPUT
CREATE TABLE table_261946_3 (enrollment VARCHAR, location__all_in_ohio_ VARCHAR)
### OUTPUT
SELECT enrollment FROM table_261946_3 WHERE location__all_in_ohio_ = "Ashland" | {
"input": "CREATE TABLE table_261946_3 (enrollment VARCHAR, location__all_in_ohio_ VARCHAR)",
"instruction": "What is the enrollment for Ashland University?",
"output": "SELECT enrollment FROM table_261946_3 WHERE location__all_in_ohio_ = \"Ashland\""
} |
### INSTRUCTION
For the matches with home captain Graham Gooch played on the dates 3,4,5,6,7 June 1993, what was the result?
### INPUT
CREATE TABLE table_name_24 (result VARCHAR, home_captain VARCHAR, date VARCHAR)
### OUTPUT
SELECT result FROM table_name_24 WHERE home_captain = "graham gooch" AND date = "3,4,5,6,7 june 1993" | {
"input": "CREATE TABLE table_name_24 (result VARCHAR, home_captain VARCHAR, date VARCHAR)",
"instruction": "For the matches with home captain Graham Gooch played on the dates 3,4,5,6,7 June 1993, what was the result?",
"output": "SELECT result FROM table_name_24 WHERE home_captain = \"graham gooch\" AND date = \"3,4,5,6,7 june 1993\""
} |
### INSTRUCTION
What was the average of the Off Reb with steals less than 8 and FTM-FTA of 16-17?
### INPUT
CREATE TABLE table_name_29 (off_reb INTEGER, ftm_fta VARCHAR, steals VARCHAR)
### OUTPUT
SELECT AVG(off_reb) FROM table_name_29 WHERE ftm_fta = "16-17" AND steals < 8 | {
"input": "CREATE TABLE table_name_29 (off_reb INTEGER, ftm_fta VARCHAR, steals VARCHAR)",
"instruction": "What was the average of the Off Reb with steals less than 8 and FTM-FTA of 16-17?",
"output": "SELECT AVG(off_reb) FROM table_name_29 WHERE ftm_fta = \"16-17\" AND steals < 8"
} |
### INSTRUCTION
What is the reserved for value for constituency number 132?
### INPUT
CREATE TABLE table_name_76 (reserved_for___sc___st__none_ VARCHAR, constituency_number VARCHAR)
### OUTPUT
SELECT reserved_for___sc___st__none_ FROM table_name_76 WHERE constituency_number = "132" | {
"input": "CREATE TABLE table_name_76 (reserved_for___sc___st__none_ VARCHAR, constituency_number VARCHAR)",
"instruction": "What is the reserved for value for constituency number 132?",
"output": "SELECT reserved_for___sc___st__none_ FROM table_name_76 WHERE constituency_number = \"132\""
} |
### INSTRUCTION
Which Mountain Peak has a Region of baja california, and a Location of 28.1301°n 115.2206°w?
### INPUT
CREATE TABLE table_name_87 (mountain_peak VARCHAR, region VARCHAR, location VARCHAR)
### OUTPUT
SELECT mountain_peak FROM table_name_87 WHERE region = "baja california" AND location = "28.1301°n 115.2206°w" | {
"input": "CREATE TABLE table_name_87 (mountain_peak VARCHAR, region VARCHAR, location VARCHAR)",
"instruction": "Which Mountain Peak has a Region of baja california, and a Location of 28.1301°n 115.2206°w?",
"output": "SELECT mountain_peak FROM table_name_87 WHERE region = \"baja california\" AND location = \"28.1301°n 115.2206°w\""
} |
### INSTRUCTION
Show the station name and number of trains in each station.
### INPUT
CREATE TABLE station (name VARCHAR, station_id VARCHAR); CREATE TABLE train_station (station_id VARCHAR)
### OUTPUT
SELECT T2.name, COUNT(*) FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id | {
"input": "CREATE TABLE station (name VARCHAR, station_id VARCHAR); CREATE TABLE train_station (station_id VARCHAR)",
"instruction": "Show the station name and number of trains in each station.",
"output": "SELECT T2.name, COUNT(*) FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id"
} |
### INSTRUCTION
What name was proposed on 12/30/1982 in rockingham county with a CERCLIS ID of nhd062004569?
### INPUT
CREATE TABLE table_name_87 (name VARCHAR, cerclis_id VARCHAR, proposed VARCHAR, county VARCHAR)
### OUTPUT
SELECT name FROM table_name_87 WHERE proposed = "12/30/1982" AND county = "rockingham" AND cerclis_id = "nhd062004569" | {
"input": "CREATE TABLE table_name_87 (name VARCHAR, cerclis_id VARCHAR, proposed VARCHAR, county VARCHAR)",
"instruction": "What name was proposed on 12/30/1982 in rockingham county with a CERCLIS ID of nhd062004569?",
"output": "SELECT name FROM table_name_87 WHERE proposed = \"12/30/1982\" AND county = \"rockingham\" AND cerclis_id = \"nhd062004569\""
} |
### INSTRUCTION
What is the highest NGC number that has a Declination ( J2000 ) of °04′58″ and a Apparent magnitude larger than 7.3?
### INPUT
CREATE TABLE table_name_5 (ngc_number INTEGER, declination___j2000__ VARCHAR, apparent_magnitude VARCHAR)
### OUTPUT
SELECT MAX(ngc_number) FROM table_name_5 WHERE declination___j2000__ = "°04′58″" AND apparent_magnitude > 7.3 | {
"input": "CREATE TABLE table_name_5 (ngc_number INTEGER, declination___j2000__ VARCHAR, apparent_magnitude VARCHAR)",
"instruction": "What is the highest NGC number that has a Declination ( J2000 ) of °04′58″ and a Apparent magnitude larger than 7.3?",
"output": "SELECT MAX(ngc_number) FROM table_name_5 WHERE declination___j2000__ = \"°04′58″\" AND apparent_magnitude > 7.3"
} |
### INSTRUCTION
What is the series # when the director is john showalter?
### INPUT
CREATE TABLE table_29747178_2 (series__number VARCHAR, directed_by VARCHAR)
### OUTPUT
SELECT series__number FROM table_29747178_2 WHERE directed_by = "John Showalter" | {
"input": "CREATE TABLE table_29747178_2 (series__number VARCHAR, directed_by VARCHAR)",
"instruction": "What is the series # when the director is john showalter?",
"output": "SELECT series__number FROM table_29747178_2 WHERE directed_by = \"John Showalter\""
} |
### INSTRUCTION
How many weight stats are there for players from San Francisco, CA?
### INPUT
CREATE TABLE table_22496374_1 (weight VARCHAR, home_town VARCHAR)
### OUTPUT
SELECT COUNT(weight) FROM table_22496374_1 WHERE home_town = "San Francisco, CA" | {
"input": "CREATE TABLE table_22496374_1 (weight VARCHAR, home_town VARCHAR)",
"instruction": "How many weight stats are there for players from San Francisco, CA?",
"output": "SELECT COUNT(weight) FROM table_22496374_1 WHERE home_town = \"San Francisco, CA\""
} |
### INSTRUCTION
What is Call Sign, when City of License is Brownfield, Texas?
### INPUT
CREATE TABLE table_name_51 (call_sign VARCHAR, city_of_license VARCHAR)
### OUTPUT
SELECT call_sign FROM table_name_51 WHERE city_of_license = "brownfield, texas" | {
"input": "CREATE TABLE table_name_51 (call_sign VARCHAR, city_of_license VARCHAR)",
"instruction": "What is Call Sign, when City of License is Brownfield, Texas?",
"output": "SELECT call_sign FROM table_name_51 WHERE city_of_license = \"brownfield, texas\""
} |
### INSTRUCTION
Find the name of physicians who are affiliated with both Surgery and Psychiatry departments.
### INPUT
CREATE TABLE affiliated_with (physician VARCHAR, department VARCHAR); CREATE TABLE department (DepartmentID VARCHAR, name VARCHAR); CREATE TABLE physician (name VARCHAR, EmployeeID VARCHAR)
### OUTPUT
SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Psychiatry' | {
"input": "CREATE TABLE affiliated_with (physician VARCHAR, department VARCHAR); CREATE TABLE department (DepartmentID VARCHAR, name VARCHAR); CREATE TABLE physician (name VARCHAR, EmployeeID VARCHAR)",
"instruction": "Find the name of physicians who are affiliated with both Surgery and Psychiatry departments.",
"output": "SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Psychiatry'"
} |
### INSTRUCTION
What is the debut year for the player with fewer than 54 games, fewer than 8 goals and 1989 at club?
### INPUT
CREATE TABLE table_name_6 (debut_year INTEGER, goals VARCHAR, games VARCHAR, years_at_club VARCHAR)
### OUTPUT
SELECT AVG(debut_year) FROM table_name_6 WHERE games < 54 AND years_at_club = "1989" AND goals < 8 | {
"input": "CREATE TABLE table_name_6 (debut_year INTEGER, goals VARCHAR, games VARCHAR, years_at_club VARCHAR)",
"instruction": "What is the debut year for the player with fewer than 54 games, fewer than 8 goals and 1989 at club?",
"output": "SELECT AVG(debut_year) FROM table_name_6 WHERE games < 54 AND years_at_club = \"1989\" AND goals < 8"
} |
### INSTRUCTION
What is the name of the shortstop when the Catcher was johnny roseboro, and a Third Baseman of jim lefebvre, and a Second Baseman of nate oliver?
### INPUT
CREATE TABLE table_name_40 (shortstop VARCHAR, second_baseman VARCHAR, catcher VARCHAR, third_baseman VARCHAR)
### OUTPUT
SELECT shortstop FROM table_name_40 WHERE catcher = "johnny roseboro" AND third_baseman = "jim lefebvre" AND second_baseman = "nate oliver" | {
"input": "CREATE TABLE table_name_40 (shortstop VARCHAR, second_baseman VARCHAR, catcher VARCHAR, third_baseman VARCHAR)",
"instruction": "What is the name of the shortstop when the Catcher was johnny roseboro, and a Third Baseman of jim lefebvre, and a Second Baseman of nate oliver?",
"output": "SELECT shortstop FROM table_name_40 WHERE catcher = \"johnny roseboro\" AND third_baseman = \"jim lefebvre\" AND second_baseman = \"nate oliver\""
} |
### INSTRUCTION
What is the average area larger than Code 19025 but a smaller region than 12?
### INPUT
CREATE TABLE table_name_91 (area__km_2__ INTEGER, code VARCHAR, region VARCHAR)
### OUTPUT
SELECT AVG(area__km_2__) FROM table_name_91 WHERE code > 19025 AND region < 12 | {
"input": "CREATE TABLE table_name_91 (area__km_2__ INTEGER, code VARCHAR, region VARCHAR)",
"instruction": "What is the average area larger than Code 19025 but a smaller region than 12?",
"output": "SELECT AVG(area__km_2__) FROM table_name_91 WHERE code > 19025 AND region < 12"
} |
### INSTRUCTION
What are the codes of the countries that do not speak English and whose government forms are not Republic?
### INPUT
CREATE TABLE countrylanguage (Code VARCHAR, CountryCode VARCHAR, GovernmentForm VARCHAR, LANGUAGE VARCHAR); CREATE TABLE country (Code VARCHAR, CountryCode VARCHAR, GovernmentForm VARCHAR, LANGUAGE VARCHAR)
### OUTPUT
SELECT Code FROM country WHERE GovernmentForm <> "Republic" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English" | {
"input": "CREATE TABLE countrylanguage (Code VARCHAR, CountryCode VARCHAR, GovernmentForm VARCHAR, LANGUAGE VARCHAR); CREATE TABLE country (Code VARCHAR, CountryCode VARCHAR, GovernmentForm VARCHAR, LANGUAGE VARCHAR)",
"instruction": "What are the codes of the countries that do not speak English and whose government forms are not Republic?",
"output": "SELECT Code FROM country WHERE GovernmentForm <> \"Republic\" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = \"English\""
} |
### INSTRUCTION
Who is the second when Mikkel Krause is the third?
### INPUT
CREATE TABLE table_name_18 (second VARCHAR, third VARCHAR)
### OUTPUT
SELECT second FROM table_name_18 WHERE third = "mikkel krause" | {
"input": "CREATE TABLE table_name_18 (second VARCHAR, third VARCHAR)",
"instruction": "Who is the second when Mikkel Krause is the third?",
"output": "SELECT second FROM table_name_18 WHERE third = \"mikkel krause\""
} |
### INSTRUCTION
List the name of all different customers who have some loan sorted by their total loan amount.
### INPUT
CREATE TABLE loan (cust_id VARCHAR, amount INTEGER); CREATE TABLE customer (cust_name VARCHAR, cust_id VARCHAR)
### OUTPUT
SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY SUM(T2.amount) | {
"input": "CREATE TABLE loan (cust_id VARCHAR, amount INTEGER); CREATE TABLE customer (cust_name VARCHAR, cust_id VARCHAR)",
"instruction": "List the name of all different customers who have some loan sorted by their total loan amount.",
"output": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY SUM(T2.amount)"
} |
### INSTRUCTION
Before round 9, when Takashi Kogure held pole position, who was the team?
### INPUT
CREATE TABLE table_name_85 (team VARCHAR, round VARCHAR, pole_position VARCHAR)
### OUTPUT
SELECT team FROM table_name_85 WHERE round < 9 AND pole_position = "takashi kogure" | {
"input": "CREATE TABLE table_name_85 (team VARCHAR, round VARCHAR, pole_position VARCHAR)",
"instruction": "Before round 9, when Takashi Kogure held pole position, who was the team?",
"output": "SELECT team FROM table_name_85 WHERE round < 9 AND pole_position = \"takashi kogure\""
} |
### INSTRUCTION
How many regions had an incarceration rate for females of 63?
### INPUT
CREATE TABLE table_25042332_31 (incarceration_rate_total VARCHAR, incarceration_rate_female VARCHAR)
### OUTPUT
SELECT COUNT(incarceration_rate_total) FROM table_25042332_31 WHERE incarceration_rate_female = 63 | {
"input": "CREATE TABLE table_25042332_31 (incarceration_rate_total VARCHAR, incarceration_rate_female VARCHAR)",
"instruction": "How many regions had an incarceration rate for females of 63?",
"output": "SELECT COUNT(incarceration_rate_total) FROM table_25042332_31 WHERE incarceration_rate_female = 63"
} |
### INSTRUCTION
Which Points have a Drawn smaller than 2, and a Lost of 12, and a Name of ev bad wörishofen?
### INPUT
CREATE TABLE table_name_24 (points INTEGER, name VARCHAR, drawn VARCHAR, lost VARCHAR)
### OUTPUT
SELECT MAX(points) FROM table_name_24 WHERE drawn < 2 AND lost = 12 AND name = "ev bad wörishofen" | {
"input": "CREATE TABLE table_name_24 (points INTEGER, name VARCHAR, drawn VARCHAR, lost VARCHAR)",
"instruction": "Which Points have a Drawn smaller than 2, and a Lost of 12, and a Name of ev bad wörishofen?",
"output": "SELECT MAX(points) FROM table_name_24 WHERE drawn < 2 AND lost = 12 AND name = \"ev bad wörishofen\""
} |
### INSTRUCTION
What is the timeslot rank when the rating is smaller than 2.6 and the share is more than 4?
### INPUT
CREATE TABLE table_name_97 (rank__timeslot_ INTEGER, rating VARCHAR, share VARCHAR)
### OUTPUT
SELECT AVG(rank__timeslot_) FROM table_name_97 WHERE rating < 2.6 AND share > 4 | {
"input": "CREATE TABLE table_name_97 (rank__timeslot_ INTEGER, rating VARCHAR, share VARCHAR)",
"instruction": "What is the timeslot rank when the rating is smaller than 2.6 and the share is more than 4?",
"output": "SELECT AVG(rank__timeslot_) FROM table_name_97 WHERE rating < 2.6 AND share > 4"
} |
### INSTRUCTION
Which ERP W has a Frequency MHz of 89.3 fm?
### INPUT
CREATE TABLE table_name_98 (erp_w INTEGER, frequency_mhz VARCHAR)
### OUTPUT
SELECT MAX(erp_w) FROM table_name_98 WHERE frequency_mhz = "89.3 fm" | {
"input": "CREATE TABLE table_name_98 (erp_w INTEGER, frequency_mhz VARCHAR)",
"instruction": "Which ERP W has a Frequency MHz of 89.3 fm?",
"output": "SELECT MAX(erp_w) FROM table_name_98 WHERE frequency_mhz = \"89.3 fm\""
} |
### INSTRUCTION
What's the authority when the roll is less than 234 for the massey east area?
### INPUT
CREATE TABLE table_name_79 (authority VARCHAR, roll VARCHAR, area VARCHAR)
### OUTPUT
SELECT authority FROM table_name_79 WHERE roll < 234 AND area = "massey east" | {
"input": "CREATE TABLE table_name_79 (authority VARCHAR, roll VARCHAR, area VARCHAR)",
"instruction": "What's the authority when the roll is less than 234 for the massey east area?",
"output": "SELECT authority FROM table_name_79 WHERE roll < 234 AND area = \"massey east\""
} |
### INSTRUCTION
What is the lowest number of Laps that have a Time of +24.440, and a Grid higher than 18?
### INPUT
CREATE TABLE table_name_39 (laps INTEGER, time VARCHAR, grid VARCHAR)
### OUTPUT
SELECT MIN(laps) FROM table_name_39 WHERE time = "+24.440" AND grid > 18 | {
"input": "CREATE TABLE table_name_39 (laps INTEGER, time VARCHAR, grid VARCHAR)",
"instruction": "What is the lowest number of Laps that have a Time of +24.440, and a Grid higher than 18?",
"output": "SELECT MIN(laps) FROM table_name_39 WHERE time = \"+24.440\" AND grid > 18"
} |
### INSTRUCTION
What is the total number of golds having a total of 1, bronzes of 0, and from West Germany?
### INPUT
CREATE TABLE table_name_61 (gold VARCHAR, nation VARCHAR, total VARCHAR, bronze VARCHAR)
### OUTPUT
SELECT COUNT(gold) FROM table_name_61 WHERE total = 1 AND bronze < 1 AND nation = "west germany" | {
"input": "CREATE TABLE table_name_61 (gold VARCHAR, nation VARCHAR, total VARCHAR, bronze VARCHAR)",
"instruction": "What is the total number of golds having a total of 1, bronzes of 0, and from West Germany?",
"output": "SELECT COUNT(gold) FROM table_name_61 WHERE total = 1 AND bronze < 1 AND nation = \"west germany\""
} |
### INSTRUCTION
Find the name of the makers that produced some cars in the year of 1970?
### INPUT
CREATE TABLE MODEL_LIST (Maker VARCHAR, model VARCHAR); CREATE TABLE CAR_MAKERS (Maker VARCHAR, Id VARCHAR); CREATE TABLE CARS_DATA (id VARCHAR, year VARCHAR); CREATE TABLE CAR_NAMES (model VARCHAR, MakeId VARCHAR)
### OUTPUT
SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970' | {
"input": "CREATE TABLE MODEL_LIST (Maker VARCHAR, model VARCHAR); CREATE TABLE CAR_MAKERS (Maker VARCHAR, Id VARCHAR); CREATE TABLE CARS_DATA (id VARCHAR, year VARCHAR); CREATE TABLE CAR_NAMES (model VARCHAR, MakeId VARCHAR)",
"instruction": "Find the name of the makers that produced some cars in the year of 1970?",
"output": "SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970'"
} |
### INSTRUCTION
What is the displacement for the petrol engines model?
### INPUT
CREATE TABLE table_name_64 (displacement VARCHAR, model VARCHAR)
### OUTPUT
SELECT displacement FROM table_name_64 WHERE model = "petrol engines" | {
"input": "CREATE TABLE table_name_64 (displacement VARCHAR, model VARCHAR)",
"instruction": "What is the displacement for the petrol engines model?",
"output": "SELECT displacement FROM table_name_64 WHERE model = \"petrol engines\""
} |
### INSTRUCTION
What is the current account balance for a GDP at current prices of 142.640?
### INPUT
CREATE TABLE table_30133_1 (current_account_balance__percent_of_gdp_ VARCHAR, gdp_at_current_prices__usd_billions_ VARCHAR)
### OUTPUT
SELECT current_account_balance__percent_of_gdp_ FROM table_30133_1 WHERE gdp_at_current_prices__usd_billions_ = "142.640" | {
"input": "CREATE TABLE table_30133_1 (current_account_balance__percent_of_gdp_ VARCHAR, gdp_at_current_prices__usd_billions_ VARCHAR)",
"instruction": "What is the current account balance for a GDP at current prices of 142.640?",
"output": "SELECT current_account_balance__percent_of_gdp_ FROM table_30133_1 WHERE gdp_at_current_prices__usd_billions_ = \"142.640\""
} |
### INSTRUCTION
What school/club team is Amir Johnson on?
### INPUT
CREATE TABLE table_10015132_9 (school_club_team VARCHAR, player VARCHAR)
### OUTPUT
SELECT school_club_team FROM table_10015132_9 WHERE player = "Amir Johnson" | {
"input": "CREATE TABLE table_10015132_9 (school_club_team VARCHAR, player VARCHAR)",
"instruction": "What school/club team is Amir Johnson on?",
"output": "SELECT school_club_team FROM table_10015132_9 WHERE player = \"Amir Johnson\""
} |
### INSTRUCTION
Where is the Holy Cross of Davao College campus located?
### INPUT
CREATE TABLE table_name_42 (province_region VARCHAR, home_campus VARCHAR)
### OUTPUT
SELECT province_region FROM table_name_42 WHERE home_campus = "holy cross of davao college" | {
"input": "CREATE TABLE table_name_42 (province_region VARCHAR, home_campus VARCHAR)",
"instruction": "Where is the Holy Cross of Davao College campus located?",
"output": "SELECT province_region FROM table_name_42 WHERE home_campus = \"holy cross of davao college\""
} |
### INSTRUCTION
What was the type that had an award for song of the year and the position of 3rd place?
### INPUT
CREATE TABLE table_name_1 (type VARCHAR, award VARCHAR, position VARCHAR)
### OUTPUT
SELECT type FROM table_name_1 WHERE award = "song of the year" AND position = "3rd place" | {
"input": "CREATE TABLE table_name_1 (type VARCHAR, award VARCHAR, position VARCHAR)",
"instruction": "What was the type that had an award for song of the year and the position of 3rd place?",
"output": "SELECT type FROM table_name_1 WHERE award = \"song of the year\" AND position = \"3rd place\""
} |
### INSTRUCTION
Which staff have contacted which engineers? List the staff name and the engineer first name and last name.
### INPUT
CREATE TABLE Engineer_Visits (contact_staff_id VARCHAR, engineer_id VARCHAR); CREATE TABLE Staff (staff_name VARCHAR, staff_id VARCHAR); CREATE TABLE Maintenance_Engineers (first_name VARCHAR, last_name VARCHAR, engineer_id VARCHAR)
### OUTPUT
SELECT T1.staff_name, T3.first_name, T3.last_name FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id JOIN Maintenance_Engineers AS T3 ON T2.engineer_id = T3.engineer_id | {
"input": "CREATE TABLE Engineer_Visits (contact_staff_id VARCHAR, engineer_id VARCHAR); CREATE TABLE Staff (staff_name VARCHAR, staff_id VARCHAR); CREATE TABLE Maintenance_Engineers (first_name VARCHAR, last_name VARCHAR, engineer_id VARCHAR)",
"instruction": "Which staff have contacted which engineers? List the staff name and the engineer first name and last name.",
"output": "SELECT T1.staff_name, T3.first_name, T3.last_name FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id JOIN Maintenance_Engineers AS T3 ON T2.engineer_id = T3.engineer_id"
} |
### INSTRUCTION
WHAT IS THE PLACE WITH A SCORE OF 73-65-73-71=282?
### INPUT
CREATE TABLE table_name_84 (place VARCHAR, score VARCHAR)
### OUTPUT
SELECT place FROM table_name_84 WHERE score = 73 - 65 - 73 - 71 = 282 | {
"input": "CREATE TABLE table_name_84 (place VARCHAR, score VARCHAR)",
"instruction": "WHAT IS THE PLACE WITH A SCORE OF 73-65-73-71=282?",
"output": "SELECT place FROM table_name_84 WHERE score = 73 - 65 - 73 - 71 = 282"
} |
### INSTRUCTION
Which mean interview number had an average of more than 9.233, a swimsuit stat of more than 9.473, and an evening gown score of more than 9.671?
### INPUT
CREATE TABLE table_name_79 (interview INTEGER, evening_gown VARCHAR, average VARCHAR, swimsuit VARCHAR)
### OUTPUT
SELECT AVG(interview) FROM table_name_79 WHERE average > 9.233 AND swimsuit = 9.473 AND evening_gown > 9.671 | {
"input": "CREATE TABLE table_name_79 (interview INTEGER, evening_gown VARCHAR, average VARCHAR, swimsuit VARCHAR)",
"instruction": "Which mean interview number had an average of more than 9.233, a swimsuit stat of more than 9.473, and an evening gown score of more than 9.671?",
"output": "SELECT AVG(interview) FROM table_name_79 WHERE average > 9.233 AND swimsuit = 9.473 AND evening_gown > 9.671"
} |
### INSTRUCTION
What country was the player with the score line 69-71-72-69=281 from?
### INPUT
CREATE TABLE table_name_6 (country VARCHAR, score VARCHAR)
### OUTPUT
SELECT country FROM table_name_6 WHERE score = 69 - 71 - 72 - 69 = 281 | {
"input": "CREATE TABLE table_name_6 (country VARCHAR, score VARCHAR)",
"instruction": "What country was the player with the score line 69-71-72-69=281 from?",
"output": "SELECT country FROM table_name_6 WHERE score = 69 - 71 - 72 - 69 = 281"
} |
### INSTRUCTION
When they were playing the detroit lions at tampa stadium, what was the score?
### INPUT
CREATE TABLE table_name_49 (result VARCHAR, game_site VARCHAR, opponent VARCHAR)
### OUTPUT
SELECT result FROM table_name_49 WHERE game_site = "tampa stadium" AND opponent = "detroit lions" | {
"input": "CREATE TABLE table_name_49 (result VARCHAR, game_site VARCHAR, opponent VARCHAR)",
"instruction": "When they were playing the detroit lions at tampa stadium, what was the score?",
"output": "SELECT result FROM table_name_49 WHERE game_site = \"tampa stadium\" AND opponent = \"detroit lions\""
} |
### INSTRUCTION
What are the names of poker players in descending order of earnings?
### INPUT
CREATE TABLE poker_player (People_ID VARCHAR, Earnings VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)
### OUTPUT
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC | {
"input": "CREATE TABLE poker_player (People_ID VARCHAR, Earnings VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)",
"instruction": "What are the names of poker players in descending order of earnings?",
"output": "SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC"
} |
### INSTRUCTION
what is the score when the country is united states, the to par is +2 and the player is phil hancock?
### INPUT
CREATE TABLE table_name_49 (score VARCHAR, player VARCHAR, country VARCHAR, to_par VARCHAR)
### OUTPUT
SELECT score FROM table_name_49 WHERE country = "united states" AND to_par = "+2" AND player = "phil hancock" | {
"input": "CREATE TABLE table_name_49 (score VARCHAR, player VARCHAR, country VARCHAR, to_par VARCHAR)",
"instruction": "what is the score when the country is united states, the to par is +2 and the player is phil hancock?",
"output": "SELECT score FROM table_name_49 WHERE country = \"united states\" AND to_par = \"+2\" AND player = \"phil hancock\""
} |
### INSTRUCTION
What was the position of the Atl. Colegiales team?
### INPUT
CREATE TABLE table_18597302_1 (position INTEGER, team VARCHAR)
### OUTPUT
SELECT MAX(position) FROM table_18597302_1 WHERE team = "Atl. Colegiales" | {
"input": "CREATE TABLE table_18597302_1 (position INTEGER, team VARCHAR)",
"instruction": "What was the position of the Atl. Colegiales team?",
"output": "SELECT MAX(position) FROM table_18597302_1 WHERE team = \"Atl. Colegiales\""
} |
### INSTRUCTION
Which position is team mons who was replaced by Christophe Dessy (caretaker)?
### INPUT
CREATE TABLE table_name_91 (position_in_table VARCHAR, team VARCHAR, replaced_by VARCHAR)
### OUTPUT
SELECT position_in_table FROM table_name_91 WHERE team = "mons" AND replaced_by = "christophe dessy (caretaker)" | {
"input": "CREATE TABLE table_name_91 (position_in_table VARCHAR, team VARCHAR, replaced_by VARCHAR)",
"instruction": "Which position is team mons who was replaced by Christophe Dessy (caretaker)?",
"output": "SELECT position_in_table FROM table_name_91 WHERE team = \"mons\" AND replaced_by = \"christophe dessy (caretaker)\""
} |
### INSTRUCTION
What are the manager's first name, last name and id who won the most manager award?
### INPUT
CREATE TABLE player (name_first VARCHAR, name_last VARCHAR, player_id VARCHAR); CREATE TABLE manager_award (player_id VARCHAR)
### OUTPUT
SELECT T1.name_first, T1.name_last, T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY COUNT(*) DESC LIMIT 1 | {
"input": "CREATE TABLE player (name_first VARCHAR, name_last VARCHAR, player_id VARCHAR); CREATE TABLE manager_award (player_id VARCHAR)",
"instruction": "What are the manager's first name, last name and id who won the most manager award?",
"output": "SELECT T1.name_first, T1.name_last, T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY COUNT(*) DESC LIMIT 1"
} |
### INSTRUCTION
Which Ipsos 5/16/09 has an Ifop- La Croix 5/15/09 of 26%?
### INPUT
CREATE TABLE table_name_89 (csa_5_20_09 VARCHAR, ifop__la_croix_5_15_09 VARCHAR)
### OUTPUT
SELECT csa_5_20_09 FROM table_name_89 WHERE ifop__la_croix_5_15_09 = "26%" | {
"input": "CREATE TABLE table_name_89 (csa_5_20_09 VARCHAR, ifop__la_croix_5_15_09 VARCHAR)",
"instruction": "Which Ipsos 5/16/09 has an Ifop- La Croix 5/15/09 of 26%?",
"output": "SELECT csa_5_20_09 FROM table_name_89 WHERE ifop__la_croix_5_15_09 = \"26%\""
} |
### INSTRUCTION
What is the sum of Sylvain Guintoli's laps?
### INPUT
CREATE TABLE table_name_8 (laps INTEGER, rider VARCHAR)
### OUTPUT
SELECT SUM(laps) FROM table_name_8 WHERE rider = "sylvain guintoli" | {
"input": "CREATE TABLE table_name_8 (laps INTEGER, rider VARCHAR)",
"instruction": "What is the sum of Sylvain Guintoli's laps?",
"output": "SELECT SUM(laps) FROM table_name_8 WHERE rider = \"sylvain guintoli\""
} |
### INSTRUCTION
What are the first names and date of birth of professors teaching course ACCT-211?
### INPUT
CREATE TABLE CLASS (PROF_NUM VARCHAR); CREATE TABLE employee (EMP_FNAME VARCHAR, EMP_DOB VARCHAR, EMP_NUM VARCHAR)
### OUTPUT
SELECT DISTINCT T1.EMP_FNAME, T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = "ACCT-211" | {
"input": "CREATE TABLE CLASS (PROF_NUM VARCHAR); CREATE TABLE employee (EMP_FNAME VARCHAR, EMP_DOB VARCHAR, EMP_NUM VARCHAR)",
"instruction": "What are the first names and date of birth of professors teaching course ACCT-211?",
"output": "SELECT DISTINCT T1.EMP_FNAME, T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = \"ACCT-211\""
} |
### INSTRUCTION
What was the intermediate sprint classification for the race whose winner was Daniel Martin?
### INPUT
CREATE TABLE table_28092844_16 (intermediate_sprints_classification_klasyfikacja_najaktywniejszych VARCHAR, winner VARCHAR)
### OUTPUT
SELECT intermediate_sprints_classification_klasyfikacja_najaktywniejszych FROM table_28092844_16 WHERE winner = "Daniel Martin" | {
"input": "CREATE TABLE table_28092844_16 (intermediate_sprints_classification_klasyfikacja_najaktywniejszych VARCHAR, winner VARCHAR)",
"instruction": "What was the intermediate sprint classification for the race whose winner was Daniel Martin?",
"output": "SELECT intermediate_sprints_classification_klasyfikacja_najaktywniejszych FROM table_28092844_16 WHERE winner = \"Daniel Martin\""
} |
### INSTRUCTION
Which Round has a Nationality of united states, and a College/Junior/Club Team (League) of breck school (ushs)?
### INPUT
CREATE TABLE table_name_19 (round INTEGER, nationality VARCHAR, college_junior_club_team__league_ VARCHAR)
### OUTPUT
SELECT MIN(round) FROM table_name_19 WHERE nationality = "united states" AND college_junior_club_team__league_ = "breck school (ushs)" | {
"input": "CREATE TABLE table_name_19 (round INTEGER, nationality VARCHAR, college_junior_club_team__league_ VARCHAR)",
"instruction": "Which Round has a Nationality of united states, and a College/Junior/Club Team (League) of breck school (ushs)?",
"output": "SELECT MIN(round) FROM table_name_19 WHERE nationality = \"united states\" AND college_junior_club_team__league_ = \"breck school (ushs)\""
} |
### INSTRUCTION
What is the partial thromboplastin time when the condition factor x deficiency as seen in amyloid purpura?
### INPUT
CREATE TABLE table_221653_1 (partial_thromboplastin_time VARCHAR, condition VARCHAR)
### OUTPUT
SELECT partial_thromboplastin_time FROM table_221653_1 WHERE condition = "Factor X deficiency as seen in amyloid purpura" | {
"input": "CREATE TABLE table_221653_1 (partial_thromboplastin_time VARCHAR, condition VARCHAR)",
"instruction": "What is the partial thromboplastin time when the condition factor x deficiency as seen in amyloid purpura?",
"output": "SELECT partial_thromboplastin_time FROM table_221653_1 WHERE condition = \"Factor X deficiency as seen in amyloid purpura\""
} |
### INSTRUCTION
center-to-center distance of 6,900 to 46,300 km involves which orbital period?
### INPUT
CREATE TABLE table_name_69 (orbital_period VARCHAR, center_to_center_distance VARCHAR)
### OUTPUT
SELECT orbital_period FROM table_name_69 WHERE center_to_center_distance = "6,900 to 46,300 km" | {
"input": "CREATE TABLE table_name_69 (orbital_period VARCHAR, center_to_center_distance VARCHAR)",
"instruction": "center-to-center distance of 6,900 to 46,300 km involves which orbital period?",
"output": "SELECT orbital_period FROM table_name_69 WHERE center_to_center_distance = \"6,900 to 46,300 km\""
} |
### INSTRUCTION
What is the winning coach total number if the top team in regular season (points) is the Kansas City Spurs (110 points)?
### INPUT
CREATE TABLE table_237757_3 (winning_coach VARCHAR, top_team_in_regular_season__points_ VARCHAR)
### OUTPUT
SELECT COUNT(winning_coach) FROM table_237757_3 WHERE top_team_in_regular_season__points_ = "Kansas City Spurs (110 points)" | {
"input": "CREATE TABLE table_237757_3 (winning_coach VARCHAR, top_team_in_regular_season__points_ VARCHAR)",
"instruction": "What is the winning coach total number if the top team in regular season (points) is the Kansas City Spurs (110 points)?",
"output": "SELECT COUNT(winning_coach) FROM table_237757_3 WHERE top_team_in_regular_season__points_ = \"Kansas City Spurs (110 points)\""
} |
### INSTRUCTION
What is the average number of goals with more than 9 points, less than 14 goals against, and a goal difference less than 17?
### INPUT
CREATE TABLE table_name_81 (goals_for INTEGER, goal_difference VARCHAR, points VARCHAR, goals_against VARCHAR)
### OUTPUT
SELECT AVG(goals_for) FROM table_name_81 WHERE points > 9 AND goals_against < 14 AND goal_difference < 17 | {
"input": "CREATE TABLE table_name_81 (goals_for INTEGER, goal_difference VARCHAR, points VARCHAR, goals_against VARCHAR)",
"instruction": "What is the average number of goals with more than 9 points, less than 14 goals against, and a goal difference less than 17?",
"output": "SELECT AVG(goals_for) FROM table_name_81 WHERE points > 9 AND goals_against < 14 AND goal_difference < 17"
} |
### INSTRUCTION
How many debut years have Years at club of 1950–1951, and Games larger than 14?
### INPUT
CREATE TABLE table_name_39 (debut_year INTEGER, years_at_club VARCHAR, games VARCHAR)
### OUTPUT
SELECT SUM(debut_year) FROM table_name_39 WHERE years_at_club = "1950–1951" AND games > 14 | {
"input": "CREATE TABLE table_name_39 (debut_year INTEGER, years_at_club VARCHAR, games VARCHAR)",
"instruction": "How many debut years have Years at club of 1950–1951, and Games larger than 14?",
"output": "SELECT SUM(debut_year) FROM table_name_39 WHERE years_at_club = \"1950–1951\" AND games > 14"
} |
### INSTRUCTION
Find the name of bank branch that provided the greatest total amount of loans to customers with credit score is less than 100.
### INPUT
CREATE TABLE loan (branch_id VARCHAR, cust_id VARCHAR, amount INTEGER); CREATE TABLE bank (bname VARCHAR, branch_id VARCHAR); CREATE TABLE customer (cust_id VARCHAR, credit_score INTEGER)
### OUTPUT
SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY SUM(T1.amount) DESC LIMIT 1 | {
"input": "CREATE TABLE loan (branch_id VARCHAR, cust_id VARCHAR, amount INTEGER); CREATE TABLE bank (bname VARCHAR, branch_id VARCHAR); CREATE TABLE customer (cust_id VARCHAR, credit_score INTEGER)",
"instruction": "Find the name of bank branch that provided the greatest total amount of loans to customers with credit score is less than 100.",
"output": "SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY SUM(T1.amount) DESC LIMIT 1"
} |
### INSTRUCTION
What was the cargo value in 2005 with a ship size of all product carriers?
### INPUT
CREATE TABLE table_name_31 (ship_size VARCHAR)
### OUTPUT
SELECT 2005 FROM table_name_31 WHERE ship_size = "all product carriers" | {
"input": "CREATE TABLE table_name_31 (ship_size VARCHAR)",
"instruction": "What was the cargo value in 2005 with a ship size of all product carriers?",
"output": "SELECT 2005 FROM table_name_31 WHERE ship_size = \"all product carriers\""
} |
### INSTRUCTION
Find the name and city of the airport which is the destination of the most number of routes.
### INPUT
CREATE TABLE airports (name VARCHAR, city VARCHAR, apid VARCHAR); CREATE TABLE routes (dst_apid VARCHAR)
### OUTPUT
SELECT T1.name, T1.city, T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid GROUP BY T2.dst_apid ORDER BY COUNT(*) DESC LIMIT 1 | {
"input": "CREATE TABLE airports (name VARCHAR, city VARCHAR, apid VARCHAR); CREATE TABLE routes (dst_apid VARCHAR)",
"instruction": "Find the name and city of the airport which is the destination of the most number of routes.",
"output": "SELECT T1.name, T1.city, T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid GROUP BY T2.dst_apid ORDER BY COUNT(*) DESC LIMIT 1"
} |
### INSTRUCTION
Which Player had a Date of 31 jan. 2008, and a Transfer fee of £3.87m?
### INPUT
CREATE TABLE table_name_44 (player VARCHAR, date VARCHAR, transfer_fee VARCHAR)
### OUTPUT
SELECT player FROM table_name_44 WHERE date = "31 jan. 2008" AND transfer_fee = "£3.87m" | {
"input": "CREATE TABLE table_name_44 (player VARCHAR, date VARCHAR, transfer_fee VARCHAR)",
"instruction": "Which Player had a Date of 31 jan. 2008, and a Transfer fee of £3.87m?",
"output": "SELECT player FROM table_name_44 WHERE date = \"31 jan. 2008\" AND transfer_fee = \"£3.87m\""
} |
### INSTRUCTION
What Social Democratic has a Democratic and Social Centre of 10.0% 22 seats?
### INPUT
CREATE TABLE table_name_33 (social_democratic VARCHAR, democratic_and_social_centre VARCHAR)
### OUTPUT
SELECT social_democratic FROM table_name_33 WHERE democratic_and_social_centre = "10.0% 22 seats" | {
"input": "CREATE TABLE table_name_33 (social_democratic VARCHAR, democratic_and_social_centre VARCHAR)",
"instruction": "What Social Democratic has a Democratic and Social Centre of 10.0% 22 seats?",
"output": "SELECT social_democratic FROM table_name_33 WHERE democratic_and_social_centre = \"10.0% 22 seats\""
} |
### INSTRUCTION
on august 16, 1963, what is the velocity?
### INPUT
CREATE TABLE table_name_56 (velocity__km_h_ INTEGER, date VARCHAR)
### OUTPUT
SELECT SUM(velocity__km_h_) FROM table_name_56 WHERE date = "august 16, 1963" | {
"input": "CREATE TABLE table_name_56 (velocity__km_h_ INTEGER, date VARCHAR)",
"instruction": "on august 16, 1963, what is the velocity?",
"output": "SELECT SUM(velocity__km_h_) FROM table_name_56 WHERE date = \"august 16, 1963\""
} |
### INSTRUCTION
Which movies have 'Deleted Scenes' as a substring in the special feature?
### INPUT
CREATE TABLE film (title VARCHAR, special_features VARCHAR)
### OUTPUT
SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%' | {
"input": "CREATE TABLE film (title VARCHAR, special_features VARCHAR)",
"instruction": "Which movies have 'Deleted Scenes' as a substring in the special feature?",
"output": "SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'"
} |
### INSTRUCTION
Find the names of all the clubs that have at least a member from the city with city code "BAL".
### INPUT
CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR); CREATE TABLE student (stuid VARCHAR, city_code VARCHAR)
### OUTPUT
SELECT DISTINCT t1.clubname 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 t3.city_code = "BAL" | {
"input": "CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR); CREATE TABLE student (stuid VARCHAR, city_code VARCHAR)",
"instruction": "Find the names of all the clubs that have at least a member from the city with city code \"BAL\".",
"output": "SELECT DISTINCT t1.clubname 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 t3.city_code = \"BAL\""
} |
### INSTRUCTION
What is the venue of the match with a 14:30 time and sun source as the away team?
### INPUT
CREATE TABLE table_name_67 (venue VARCHAR, time VARCHAR, away_team VARCHAR)
### OUTPUT
SELECT venue FROM table_name_67 WHERE time = "14:30" AND away_team = "sun source" | {
"input": "CREATE TABLE table_name_67 (venue VARCHAR, time VARCHAR, away_team VARCHAR)",
"instruction": "What is the venue of the match with a 14:30 time and sun source as the away team?",
"output": "SELECT venue FROM table_name_67 WHERE time = \"14:30\" AND away_team = \"sun source\""
} |
### INSTRUCTION
Which ERP W has a Frequency MHz larger than 89.1, and a City of license of de queen, arkansas?
### INPUT
CREATE TABLE table_name_54 (erp_w VARCHAR, frequency_mhz VARCHAR, city_of_license VARCHAR)
### OUTPUT
SELECT erp_w FROM table_name_54 WHERE frequency_mhz > 89.1 AND city_of_license = "de queen, arkansas" | {
"input": "CREATE TABLE table_name_54 (erp_w VARCHAR, frequency_mhz VARCHAR, city_of_license VARCHAR)",
"instruction": "Which ERP W has a Frequency MHz larger than 89.1, and a City of license of de queen, arkansas?",
"output": "SELECT erp_w FROM table_name_54 WHERE frequency_mhz > 89.1 AND city_of_license = \"de queen, arkansas\""
} |
### INSTRUCTION
Which Max 1-min wind mph (km/h) that has Dates active on september22– september28?
### INPUT
CREATE TABLE table_name_26 (max_1_min_wind_mph__km_h_ VARCHAR, dates_active VARCHAR)
### OUTPUT
SELECT max_1_min_wind_mph__km_h_ FROM table_name_26 WHERE dates_active = "september22– september28" | {
"input": "CREATE TABLE table_name_26 (max_1_min_wind_mph__km_h_ VARCHAR, dates_active VARCHAR)",
"instruction": "Which Max 1-min wind mph (km/h) that has Dates active on september22– september28?",
"output": "SELECT max_1_min_wind_mph__km_h_ FROM table_name_26 WHERE dates_active = \"september22– september28\""
} |
### INSTRUCTION
What is the To Par score for the player with an overall score of 71-68-69=208?
### INPUT
CREATE TABLE table_name_38 (to_par VARCHAR, score VARCHAR)
### OUTPUT
SELECT to_par FROM table_name_38 WHERE score = 71 - 68 - 69 = 208 | {
"input": "CREATE TABLE table_name_38 (to_par VARCHAR, score VARCHAR)",
"instruction": "What is the To Par score for the player with an overall score of 71-68-69=208?",
"output": "SELECT to_par FROM table_name_38 WHERE score = 71 - 68 - 69 = 208"
} |
### INSTRUCTION
Which Puerto Villarroel Municipality (%) is the lowest one that has an Ethnic group of not indigenous, and a Totora Municipality (%) smaller than 4.4?
### INPUT
CREATE TABLE table_name_94 (puerto_villarroel_municipality___percentage_ INTEGER, ethnic_group VARCHAR, totora_municipality___percentage_ VARCHAR)
### OUTPUT
SELECT MIN(puerto_villarroel_municipality___percentage_) FROM table_name_94 WHERE ethnic_group = "not indigenous" AND totora_municipality___percentage_ < 4.4 | {
"input": "CREATE TABLE table_name_94 (puerto_villarroel_municipality___percentage_ INTEGER, ethnic_group VARCHAR, totora_municipality___percentage_ VARCHAR)",
"instruction": "Which Puerto Villarroel Municipality (%) is the lowest one that has an Ethnic group of not indigenous, and a Totora Municipality (%) smaller than 4.4?",
"output": "SELECT MIN(puerto_villarroel_municipality___percentage_) FROM table_name_94 WHERE ethnic_group = \"not indigenous\" AND totora_municipality___percentage_ < 4.4"
} |
### INSTRUCTION
What is the socket related to the processor released on June 22, 2005, having a frequency of 1600MHz and voltage under 1.35V?
### INPUT
CREATE TABLE table_name_7 (socket VARCHAR, voltage VARCHAR, frequency VARCHAR, release_date VARCHAR)
### OUTPUT
SELECT socket FROM table_name_7 WHERE frequency = "1600mhz" AND release_date = "june 22, 2005" AND voltage < 1.35 | {
"input": "CREATE TABLE table_name_7 (socket VARCHAR, voltage VARCHAR, frequency VARCHAR, release_date VARCHAR)",
"instruction": "What is the socket related to the processor released on June 22, 2005, having a frequency of 1600MHz and voltage under 1.35V?",
"output": "SELECT socket FROM table_name_7 WHERE frequency = \"1600mhz\" AND release_date = \"june 22, 2005\" AND voltage < 1.35"
} |
### INSTRUCTION
What are the contestant numbers and names of the contestants who had at least two votes?
### INPUT
CREATE TABLE votes (contestant_number VARCHAR); CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR)
### OUTPUT
SELECT T1.contestant_number, T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number HAVING COUNT(*) >= 2 | {
"input": "CREATE TABLE votes (contestant_number VARCHAR); CREATE TABLE contestants (contestant_number VARCHAR, contestant_name VARCHAR)",
"instruction": "What are the contestant numbers and names of the contestants who had at least two votes?",
"output": "SELECT T1.contestant_number, T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number HAVING COUNT(*) >= 2"
} |
### INSTRUCTION
What is the grid total that had a retired for engine, teo fabi driving, and under 39 laps?
### INPUT
CREATE TABLE table_name_83 (grid INTEGER, laps VARCHAR, time_retired VARCHAR, driver VARCHAR)
### OUTPUT
SELECT SUM(grid) FROM table_name_83 WHERE time_retired = "engine" AND driver = "teo fabi" AND laps < 39 | {
"input": "CREATE TABLE table_name_83 (grid INTEGER, laps VARCHAR, time_retired VARCHAR, driver VARCHAR)",
"instruction": "What is the grid total that had a retired for engine, teo fabi driving, and under 39 laps?",
"output": "SELECT SUM(grid) FROM table_name_83 WHERE time_retired = \"engine\" AND driver = \"teo fabi\" AND laps < 39"
} |
### INSTRUCTION
Tell me the manner of departure for 3 january date of appointment
### INPUT
CREATE TABLE table_name_1 (manner_of_departure VARCHAR, date_of_appointment VARCHAR)
### OUTPUT
SELECT manner_of_departure FROM table_name_1 WHERE date_of_appointment = "3 january" | {
"input": "CREATE TABLE table_name_1 (manner_of_departure VARCHAR, date_of_appointment VARCHAR)",
"instruction": "Tell me the manner of departure for 3 january date of appointment",
"output": "SELECT manner_of_departure FROM table_name_1 WHERE date_of_appointment = \"3 january\""
} |
### INSTRUCTION
Who is the runner-up for season 2011–12?
### INPUT
CREATE TABLE table_25058269_1 (runner_up VARCHAR, season VARCHAR)
### OUTPUT
SELECT runner_up FROM table_25058269_1 WHERE season = "2011–12" | {
"input": "CREATE TABLE table_25058269_1 (runner_up VARCHAR, season VARCHAR)",
"instruction": "Who is the runner-up for season 2011–12?",
"output": "SELECT runner_up FROM table_25058269_1 WHERE season = \"2011–12\""
} |
### INSTRUCTION
What was the population in 2011 of the settlement with the cyrillic name of ватин?
### INPUT
CREATE TABLE table_2562572_46 (population__2011_ INTEGER, cyrillic_name_other_names VARCHAR)
### OUTPUT
SELECT MAX(population__2011_) FROM table_2562572_46 WHERE cyrillic_name_other_names = "Ватин" | {
"input": "CREATE TABLE table_2562572_46 (population__2011_ INTEGER, cyrillic_name_other_names VARCHAR)",
"instruction": "What was the population in 2011 of the settlement with the cyrillic name of ватин?",
"output": "SELECT MAX(population__2011_) FROM table_2562572_46 WHERE cyrillic_name_other_names = \"Ватин\""
} |
### INSTRUCTION
Show all product names and the total quantity ordered for each product name.
### INPUT
CREATE TABLE Products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE Order_items (product_quantity INTEGER, product_id VARCHAR)
### OUTPUT
SELECT T2.product_name, SUM(T1.product_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name | {
"input": "CREATE TABLE Products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE Order_items (product_quantity INTEGER, product_id VARCHAR)",
"instruction": "Show all product names and the total quantity ordered for each product name.",
"output": "SELECT T2.product_name, SUM(T1.product_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name"
} |
### INSTRUCTION
Find the average ranking for each player and their first name.
### INPUT
CREATE TABLE players (first_name VARCHAR, player_id VARCHAR); CREATE TABLE rankings (player_id VARCHAR)
### OUTPUT
SELECT AVG(ranking), T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name | {
"input": "CREATE TABLE players (first_name VARCHAR, player_id VARCHAR); CREATE TABLE rankings (player_id VARCHAR)",
"instruction": "Find the average ranking for each player and their first name.",
"output": "SELECT AVG(ranking), T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id GROUP BY T1.first_name"
} |
### INSTRUCTION
What is Phil Taylor's 3-dart average?
### INPUT
CREATE TABLE table_20463779_22 (player VARCHAR)
### OUTPUT
SELECT 3 AS _dart_average FROM table_20463779_22 WHERE player = "Phil Taylor" | {
"input": "CREATE TABLE table_20463779_22 (player VARCHAR)",
"instruction": "What is Phil Taylor's 3-dart average?",
"output": "SELECT 3 AS _dart_average FROM table_20463779_22 WHERE player = \"Phil Taylor\""
} |
### INSTRUCTION
Find the number of characteristics that the product "flax" has.
### INPUT
CREATE TABLE CHARACTERISTICS (characteristic_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR)
### OUTPUT
SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "flax" | {
"input": "CREATE TABLE CHARACTERISTICS (characteristic_id VARCHAR); CREATE TABLE products (product_id VARCHAR, product_name VARCHAR); CREATE TABLE product_characteristics (product_id VARCHAR, characteristic_id VARCHAR)",
"instruction": "Find the number of characteristics that the product \"flax\" has.",
"output": "SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"flax\""
} |
### INSTRUCTION
What are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes?
### INPUT
CREATE TABLE Projects (project_id VARCHAR, project_details VARCHAR); CREATE TABLE Project_outcomes (project_id VARCHAR); CREATE TABLE Tasks (task_details VARCHAR, task_id VARCHAR, project_id VARCHAR)
### OUTPUT
SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id HAVING COUNT(*) > 2 | {
"input": "CREATE TABLE Projects (project_id VARCHAR, project_details VARCHAR); CREATE TABLE Project_outcomes (project_id VARCHAR); CREATE TABLE Tasks (task_details VARCHAR, task_id VARCHAR, project_id VARCHAR)",
"instruction": "What are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes?",
"output": "SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id HAVING COUNT(*) > 2"
} |
### INSTRUCTION
Which Total has a Set 2 of 19–25?
### INPUT
CREATE TABLE table_name_60 (total VARCHAR, set_2 VARCHAR)
### OUTPUT
SELECT total FROM table_name_60 WHERE set_2 = "19–25" | {
"input": "CREATE TABLE table_name_60 (total VARCHAR, set_2 VARCHAR)",
"instruction": "Which Total has a Set 2 of 19–25?",
"output": "SELECT total FROM table_name_60 WHERE set_2 = \"19–25\""
} |
### INSTRUCTION
What is the sum of League Cup, when the Other is less than 1, when the Name is Gareth Farrelly Category:Articles with hCards, and when the League is greater than 1?
### INPUT
CREATE TABLE table_name_68 (league INTEGER, other VARCHAR, name VARCHAR)
### OUTPUT
SELECT SUM(league) AS Cup FROM table_name_68 WHERE other < 1 AND name = "gareth farrelly category:articles with hcards" AND league > 1 | {
"input": "CREATE TABLE table_name_68 (league INTEGER, other VARCHAR, name VARCHAR)",
"instruction": "What is the sum of League Cup, when the Other is less than 1, when the Name is Gareth Farrelly Category:Articles with hCards, and when the League is greater than 1?",
"output": "SELECT SUM(league) AS Cup FROM table_name_68 WHERE other < 1 AND name = \"gareth farrelly category:articles with hcards\" AND league > 1"
} |
### INSTRUCTION
Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000?
### INPUT
CREATE TABLE stadium (country VARCHAR, capacity INTEGER)
### OUTPUT
SELECT country FROM stadium WHERE capacity > 60000 INTERSECT SELECT country FROM stadium WHERE capacity < 50000 | {
"input": "CREATE TABLE stadium (country VARCHAR, capacity INTEGER)",
"instruction": "Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000?",
"output": "SELECT country FROM stadium WHERE capacity > 60000 INTERSECT SELECT country FROM stadium WHERE capacity < 50000"
} |
### INSTRUCTION
Who proceeded to the quarter final when the london irish were eliminated from competition?
### INPUT
CREATE TABLE table_28068063_3 (proceed_to_quarter_final VARCHAR, eliminated_from_competition VARCHAR)
### OUTPUT
SELECT proceed_to_quarter_final FROM table_28068063_3 WHERE eliminated_from_competition = "London Irish" | {
"input": "CREATE TABLE table_28068063_3 (proceed_to_quarter_final VARCHAR, eliminated_from_competition VARCHAR)",
"instruction": "Who proceeded to the quarter final when the london irish were eliminated from competition?",
"output": "SELECT proceed_to_quarter_final FROM table_28068063_3 WHERE eliminated_from_competition = \"London Irish\""
} |
### INSTRUCTION
What are the degrees conferred in "San Francisco State University" in 2001.
### INPUT
CREATE TABLE degrees (Id VARCHAR); CREATE TABLE campuses (Id VARCHAR)
### OUTPUT
SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = "San Francisco State University" AND t2.year = 2001 | {
"input": "CREATE TABLE degrees (Id VARCHAR); CREATE TABLE campuses (Id VARCHAR)",
"instruction": "What are the degrees conferred in \"San Francisco State University\" in 2001.",
"output": "SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = \"San Francisco State University\" AND t2.year = 2001"
} |
### INSTRUCTION
Is the biggest win recorded as home or away?
### INPUT
CREATE TABLE table_1233808_2 (home_or_away VARCHAR, record VARCHAR)
### OUTPUT
SELECT home_or_away FROM table_1233808_2 WHERE record = "Biggest win" | {
"input": "CREATE TABLE table_1233808_2 (home_or_away VARCHAR, record VARCHAR)",
"instruction": "Is the biggest win recorded as home or away?",
"output": "SELECT home_or_away FROM table_1233808_2 WHERE record = \"Biggest win\""
} |
### INSTRUCTION
Name the years in orlando that the player from concord hs was in
### INPUT
CREATE TABLE table_15621965_10 (years_in_orlando VARCHAR, school_club_team VARCHAR)
### OUTPUT
SELECT years_in_orlando FROM table_15621965_10 WHERE school_club_team = "Concord HS" | {
"input": "CREATE TABLE table_15621965_10 (years_in_orlando VARCHAR, school_club_team VARCHAR)",
"instruction": "Name the years in orlando that the player from concord hs was in",
"output": "SELECT years_in_orlando FROM table_15621965_10 WHERE school_club_team = \"Concord HS\""
} |
### INSTRUCTION
Find courses that ran in Fall 2009 but not in Spring 2010.
### INPUT
CREATE TABLE SECTION (course_id VARCHAR, semester VARCHAR, YEAR VARCHAR)
### OUTPUT
SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010 | {
"input": "CREATE TABLE SECTION (course_id VARCHAR, semester VARCHAR, YEAR VARCHAR)",
"instruction": "Find courses that ran in Fall 2009 but not in Spring 2010.",
"output": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010"
} |
### INSTRUCTION
In what Round was OL Player Richard Zulys picked?
### INPUT
CREATE TABLE table_name_92 (round INTEGER, position VARCHAR, player VARCHAR)
### OUTPUT
SELECT SUM(round) FROM table_name_92 WHERE position = "ol" AND player = "richard zulys" | {
"input": "CREATE TABLE table_name_92 (round INTEGER, position VARCHAR, player VARCHAR)",
"instruction": "In what Round was OL Player Richard Zulys picked?",
"output": "SELECT SUM(round) FROM table_name_92 WHERE position = \"ol\" AND player = \"richard zulys\""
} |
### INSTRUCTION
What team has a vehicle with an Offenhauser engine and a McLaren chassis?
### INPUT
CREATE TABLE table_1405704_1 (team VARCHAR, chassis VARCHAR, engine VARCHAR)
### OUTPUT
SELECT team FROM table_1405704_1 WHERE chassis = "McLaren" AND engine = "Offenhauser" | {
"input": "CREATE TABLE table_1405704_1 (team VARCHAR, chassis VARCHAR, engine VARCHAR)",
"instruction": "What team has a vehicle with an Offenhauser engine and a McLaren chassis?",
"output": "SELECT team FROM table_1405704_1 WHERE chassis = \"McLaren\" AND engine = \"Offenhauser\""
} |
### INSTRUCTION
Which date's week was more than 4 with the venue being City Stadium and where the attendance was more than 14,297?
### INPUT
CREATE TABLE table_name_1 (date VARCHAR, attendance VARCHAR, week VARCHAR, venue VARCHAR)
### OUTPUT
SELECT date FROM table_name_1 WHERE week > 4 AND venue = "city stadium" AND attendance > 14 OFFSET 297 | {
"input": "CREATE TABLE table_name_1 (date VARCHAR, attendance VARCHAR, week VARCHAR, venue VARCHAR)",
"instruction": "Which date's week was more than 4 with the venue being City Stadium and where the attendance was more than 14,297?",
"output": "SELECT date FROM table_name_1 WHERE week > 4 AND venue = \"city stadium\" AND attendance > 14 OFFSET 297"
} |
### INSTRUCTION
Name the nomination in 2011 that won
### INPUT
CREATE TABLE table_name_59 (nomination VARCHAR, year VARCHAR, result VARCHAR)
### OUTPUT
SELECT nomination FROM table_name_59 WHERE year = 2011 AND result = "won" | {
"input": "CREATE TABLE table_name_59 (nomination VARCHAR, year VARCHAR, result VARCHAR)",
"instruction": "Name the nomination in 2011 that won",
"output": "SELECT nomination FROM table_name_59 WHERE year = 2011 AND result = \"won\""
} |
### INSTRUCTION
What is the total for the first exercise and has 18 as the second exercise?
### INPUT
CREATE TABLE table_name_2 (first_exercise INTEGER, second_exercise VARCHAR)
### OUTPUT
SELECT SUM(first_exercise) FROM table_name_2 WHERE second_exercise = 18 | {
"input": "CREATE TABLE table_name_2 (first_exercise INTEGER, second_exercise VARCHAR)",
"instruction": "What is the total for the first exercise and has 18 as the second exercise?",
"output": "SELECT SUM(first_exercise) FROM table_name_2 WHERE second_exercise = 18"
} |
### INSTRUCTION
Which Labour Panel has an Industrial and Commercial Panel of 9, and a University of Dublin smaller than 3?
### INPUT
CREATE TABLE table_name_46 (labour_panel INTEGER, industrial_and_commercial_panel VARCHAR, university_of_dublin VARCHAR)
### OUTPUT
SELECT AVG(labour_panel) FROM table_name_46 WHERE industrial_and_commercial_panel = 9 AND university_of_dublin < 3 | {
"input": "CREATE TABLE table_name_46 (labour_panel INTEGER, industrial_and_commercial_panel VARCHAR, university_of_dublin VARCHAR)",
"instruction": "Which Labour Panel has an Industrial and Commercial Panel of 9, and a University of Dublin smaller than 3?",
"output": "SELECT AVG(labour_panel) FROM table_name_46 WHERE industrial_and_commercial_panel = 9 AND university_of_dublin < 3"
} |
### INSTRUCTION
Find the first names of the faculty members who participate in Canoeing and Kayaking.
### INPUT
CREATE TABLE activity (activity_name VARCHAR); CREATE TABLE Faculty_participates_in (facID VARCHAR, actid VARCHAR); CREATE TABLE Faculty (lname VARCHAR, facID VARCHAR)
### OUTPUT
SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking' | {
"input": "CREATE TABLE activity (activity_name VARCHAR); CREATE TABLE Faculty_participates_in (facID VARCHAR, actid VARCHAR); CREATE TABLE Faculty (lname VARCHAR, facID VARCHAR)",
"instruction": "Find the first names of the faculty members who participate in Canoeing and Kayaking.",
"output": "SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking'"
} |
### INSTRUCTION
What is the sum of the total number of medals when silver is less than 0?
### INPUT
CREATE TABLE table_name_54 (total VARCHAR, silver INTEGER)
### OUTPUT
SELECT COUNT(total) FROM table_name_54 WHERE silver < 0 | {
"input": "CREATE TABLE table_name_54 (total VARCHAR, silver INTEGER)",
"instruction": "What is the sum of the total number of medals when silver is less than 0?",
"output": "SELECT COUNT(total) FROM table_name_54 WHERE silver < 0"
} |
### INSTRUCTION
Show the ids of students whose advisors are professors.
### INPUT
CREATE TABLE Student (StuID VARCHAR, advisor VARCHAR); CREATE TABLE Faculty (FacID VARCHAR, rank VARCHAR)
### OUTPUT
SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = "Professor" | {
"input": "CREATE TABLE Student (StuID VARCHAR, advisor VARCHAR); CREATE TABLE Faculty (FacID VARCHAR, rank VARCHAR)",
"instruction": "Show the ids of students whose advisors are professors.",
"output": "SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = \"Professor\""
} |
### INSTRUCTION
Who were the children of Benjamin Harrison?
### INPUT
CREATE TABLE table_24143253_5 (children_together VARCHAR, name VARCHAR)
### OUTPUT
SELECT children_together FROM table_24143253_5 WHERE name = "Benjamin Harrison" | {
"input": "CREATE TABLE table_24143253_5 (children_together VARCHAR, name VARCHAR)",
"instruction": "Who were the children of Benjamin Harrison?",
"output": "SELECT children_together FROM table_24143253_5 WHERE name = \"Benjamin Harrison\""
} |
### INSTRUCTION
What is the street address of Oliver Building?
### INPUT
CREATE TABLE table_name_20 (street_address VARCHAR, name VARCHAR)
### OUTPUT
SELECT street_address FROM table_name_20 WHERE name = "oliver building" | {
"input": "CREATE TABLE table_name_20 (street_address VARCHAR, name VARCHAR)",
"instruction": "What is the street address of Oliver Building?",
"output": "SELECT street_address FROM table_name_20 WHERE name = \"oliver building\""
} |
Subsets and Splits