text
stringlengths 147
1.06k
| source
dict |
---|---|
### INSTRUCTION
What was the outcome when darija jurak anaïs laurendon was the opponent?
### INPUT
CREATE TABLE table_name_34 (outcome VARCHAR, opponents VARCHAR)
### OUTPUT
SELECT outcome FROM table_name_34 WHERE opponents = "darija jurak anaïs laurendon" | {
"input": "CREATE TABLE table_name_34 (outcome VARCHAR, opponents VARCHAR)",
"instruction": "What was the outcome when darija jurak anaïs laurendon was the opponent?",
"output": "SELECT outcome FROM table_name_34 WHERE opponents = \"darija jurak anaïs laurendon\""
} |
### INSTRUCTION
What number of win% has a postseason of did not qualify and rank larger than 8?
### INPUT
CREATE TABLE table_name_89 (win_percentage VARCHAR, postseason VARCHAR, rank VARCHAR)
### OUTPUT
SELECT COUNT(win_percentage) FROM table_name_89 WHERE postseason = "did not qualify" AND rank > 8 | {
"input": "CREATE TABLE table_name_89 (win_percentage VARCHAR, postseason VARCHAR, rank VARCHAR)",
"instruction": "What number of win% has a postseason of did not qualify and rank larger than 8?",
"output": "SELECT COUNT(win_percentage) FROM table_name_89 WHERE postseason = \"did not qualify\" AND rank > 8"
} |
### INSTRUCTION
On what date did Fleetcenter have a game lower than 9 with a score of 104-94?
### INPUT
CREATE TABLE table_name_59 (date VARCHAR, score VARCHAR, location VARCHAR, game VARCHAR)
### OUTPUT
SELECT date FROM table_name_59 WHERE location = "fleetcenter" AND game < 9 AND score = "104-94" | {
"input": "CREATE TABLE table_name_59 (date VARCHAR, score VARCHAR, location VARCHAR, game VARCHAR)",
"instruction": "On what date did Fleetcenter have a game lower than 9 with a score of 104-94?",
"output": "SELECT date FROM table_name_59 WHERE location = \"fleetcenter\" AND game < 9 AND score = \"104-94\""
} |
### INSTRUCTION
who is the home team when the away team is ipswich town?
### INPUT
CREATE TABLE table_name_34 (home_team VARCHAR, away_team VARCHAR)
### OUTPUT
SELECT home_team FROM table_name_34 WHERE away_team = "ipswich town" | {
"input": "CREATE TABLE table_name_34 (home_team VARCHAR, away_team VARCHAR)",
"instruction": "who is the home team when the away team is ipswich town?",
"output": "SELECT home_team FROM table_name_34 WHERE away_team = \"ipswich town\""
} |
### INSTRUCTION
4tab of commercial broadcaster Radio Tab broadcasts at what frequency?
### INPUT
CREATE TABLE table_name_75 (frequency VARCHAR, callsign VARCHAR, purpose VARCHAR, on_air_id VARCHAR)
### OUTPUT
SELECT frequency FROM table_name_75 WHERE purpose = "commercial" AND on_air_id = "radio tab" AND callsign = "4tab" | {
"input": "CREATE TABLE table_name_75 (frequency VARCHAR, callsign VARCHAR, purpose VARCHAR, on_air_id VARCHAR)",
"instruction": "4tab of commercial broadcaster Radio Tab broadcasts at what frequency?",
"output": "SELECT frequency FROM table_name_75 WHERE purpose = \"commercial\" AND on_air_id = \"radio tab\" AND callsign = \"4tab\""
} |
### INSTRUCTION
Who was the director of the episode written by Russell T Davies and James Moran?
### INPUT
CREATE TABLE table_name_67 (director VARCHAR, writer VARCHAR)
### OUTPUT
SELECT director FROM table_name_67 WHERE writer = "russell t davies and james moran" | {
"input": "CREATE TABLE table_name_67 (director VARCHAR, writer VARCHAR)",
"instruction": "Who was the director of the episode written by Russell T Davies and James Moran?",
"output": "SELECT director FROM table_name_67 WHERE writer = \"russell t davies and james moran\""
} |
### INSTRUCTION
Opponent of @ edmonton oilers, and a Game larger than 1, and a Series of oilers lead 3–2 had what score?
### INPUT
CREATE TABLE table_name_30 (score VARCHAR, series VARCHAR, opponent VARCHAR, game VARCHAR)
### OUTPUT
SELECT score FROM table_name_30 WHERE opponent = "@ edmonton oilers" AND game > 1 AND series = "oilers lead 3–2" | {
"input": "CREATE TABLE table_name_30 (score VARCHAR, series VARCHAR, opponent VARCHAR, game VARCHAR)",
"instruction": "Opponent of @ edmonton oilers, and a Game larger than 1, and a Series of oilers lead 3–2 had what score?",
"output": "SELECT score FROM table_name_30 WHERE opponent = \"@ edmonton oilers\" AND game > 1 AND series = \"oilers lead 3–2\""
} |
### INSTRUCTION
Show the number of cities in counties that have a population more than 20000.
### INPUT
CREATE TABLE county_public_safety (county_ID VARCHAR, population INTEGER); CREATE TABLE city (county_ID VARCHAR, population INTEGER)
### OUTPUT
SELECT COUNT(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000) | {
"input": "CREATE TABLE county_public_safety (county_ID VARCHAR, population INTEGER); CREATE TABLE city (county_ID VARCHAR, population INTEGER)",
"instruction": "Show the number of cities in counties that have a population more than 20000.",
"output": "SELECT COUNT(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000)"
} |
### INSTRUCTION
What is Record, when Location Attendance is "Izod Center 16,911"?
### INPUT
CREATE TABLE table_name_4 (record VARCHAR, location_attendance VARCHAR)
### OUTPUT
SELECT record FROM table_name_4 WHERE location_attendance = "izod center 16,911" | {
"input": "CREATE TABLE table_name_4 (record VARCHAR, location_attendance VARCHAR)",
"instruction": "What is Record, when Location Attendance is \"Izod Center 16,911\"?",
"output": "SELECT record FROM table_name_4 WHERE location_attendance = \"izod center 16,911\""
} |
### INSTRUCTION
What is the venue of teh carfax 250 race?
### INPUT
CREATE TABLE table_name_62 (venue VARCHAR, race VARCHAR)
### OUTPUT
SELECT venue FROM table_name_62 WHERE race = "carfax 250" | {
"input": "CREATE TABLE table_name_62 (venue VARCHAR, race VARCHAR)",
"instruction": "What is the venue of teh carfax 250 race?",
"output": "SELECT venue FROM table_name_62 WHERE race = \"carfax 250\""
} |
### INSTRUCTION
What's the most wins of Tatong?
### INPUT
CREATE TABLE table_name_43 (wins INTEGER, benalla_dfl VARCHAR)
### OUTPUT
SELECT MAX(wins) FROM table_name_43 WHERE benalla_dfl = "tatong" | {
"input": "CREATE TABLE table_name_43 (wins INTEGER, benalla_dfl VARCHAR)",
"instruction": "What's the most wins of Tatong?",
"output": "SELECT MAX(wins) FROM table_name_43 WHERE benalla_dfl = \"tatong\""
} |
### INSTRUCTION
What is the lane for notes Q, SB and time less than 11.22?
### INPUT
CREATE TABLE table_name_31 (lane INTEGER, notes VARCHAR, time___sec__ VARCHAR)
### OUTPUT
SELECT SUM(lane) FROM table_name_31 WHERE notes = "q, sb" AND time___sec__ < 11.22 | {
"input": "CREATE TABLE table_name_31 (lane INTEGER, notes VARCHAR, time___sec__ VARCHAR)",
"instruction": "What is the lane for notes Q, SB and time less than 11.22?",
"output": "SELECT SUM(lane) FROM table_name_31 WHERE notes = \"q, sb\" AND time___sec__ < 11.22"
} |
### INSTRUCTION
How much money did reestore request ?
### INPUT
CREATE TABLE table_name_59 (money_requested__£_ VARCHAR, company_or_product_name VARCHAR)
### OUTPUT
SELECT money_requested__£_ FROM table_name_59 WHERE company_or_product_name = "reestore" | {
"input": "CREATE TABLE table_name_59 (money_requested__£_ VARCHAR, company_or_product_name VARCHAR)",
"instruction": "How much money did reestore request ?",
"output": "SELECT money_requested__£_ FROM table_name_59 WHERE company_or_product_name = \"reestore\""
} |
### INSTRUCTION
When is every date that control site condition or owner is machine shop on Martin Dr.?
### INPUT
CREATE TABLE table_22282917_26 (dates VARCHAR, control_site_condition_owner VARCHAR)
### OUTPUT
SELECT dates FROM table_22282917_26 WHERE control_site_condition_owner = "machine shop on Martin Dr." | {
"input": "CREATE TABLE table_22282917_26 (dates VARCHAR, control_site_condition_owner VARCHAR)",
"instruction": "When is every date that control site condition or owner is machine shop on Martin Dr.?",
"output": "SELECT dates FROM table_22282917_26 WHERE control_site_condition_owner = \"machine shop on Martin Dr.\""
} |
### INSTRUCTION
List the campus that have between 600 and 1000 faculty lines in year 2004.
### INPUT
CREATE TABLE campuses (id VARCHAR); CREATE TABLE faculty (campus VARCHAR, faculty VARCHAR)
### OUTPUT
SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T1.year = 2004 | {
"input": "CREATE TABLE campuses (id VARCHAR); CREATE TABLE faculty (campus VARCHAR, faculty VARCHAR)",
"instruction": "List the campus that have between 600 and 1000 faculty lines in year 2004.",
"output": "SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T1.year = 2004"
} |
### INSTRUCTION
What is the grand final television commentator status after 1959 when Dave was the grand final dual television commentator and Marie Myriam was the spokesperson?
### INPUT
CREATE TABLE table_name_20 (grand_final_television_commentator VARCHAR, spokesperson VARCHAR, year_s_ VARCHAR, grand_final_dual_television_commentator VARCHAR)
### OUTPUT
SELECT grand_final_television_commentator FROM table_name_20 WHERE year_s_ > 1959 AND grand_final_dual_television_commentator = "dave" AND spokesperson = "marie myriam" | {
"input": "CREATE TABLE table_name_20 (grand_final_television_commentator VARCHAR, spokesperson VARCHAR, year_s_ VARCHAR, grand_final_dual_television_commentator VARCHAR)",
"instruction": "What is the grand final television commentator status after 1959 when Dave was the grand final dual television commentator and Marie Myriam was the spokesperson?",
"output": "SELECT grand_final_television_commentator FROM table_name_20 WHERE year_s_ > 1959 AND grand_final_dual_television_commentator = \"dave\" AND spokesperson = \"marie myriam\""
} |
### INSTRUCTION
Please show the most common occupation of players.
### INPUT
CREATE TABLE player (Occupation VARCHAR)
### OUTPUT
SELECT Occupation FROM player GROUP BY Occupation ORDER BY COUNT(*) DESC LIMIT 1 | {
"input": "CREATE TABLE player (Occupation VARCHAR)",
"instruction": "Please show the most common occupation of players.",
"output": "SELECT Occupation FROM player GROUP BY Occupation ORDER BY COUNT(*) DESC LIMIT 1"
} |
### INSTRUCTION
What race did Meo Constantini win at the circuit of monza ?
### INPUT
CREATE TABLE table_name_36 (name VARCHAR, winning_driver VARCHAR, circuit VARCHAR)
### OUTPUT
SELECT name FROM table_name_36 WHERE winning_driver = "meo constantini" AND circuit = "monza" | {
"input": "CREATE TABLE table_name_36 (name VARCHAR, winning_driver VARCHAR, circuit VARCHAR)",
"instruction": "What race did Meo Constantini win at the circuit of monza ?",
"output": "SELECT name FROM table_name_36 WHERE winning_driver = \"meo constantini\" AND circuit = \"monza\""
} |
### INSTRUCTION
What round has this song: 陶喆、蔡依林 - 今天你要嫁给我/曹格 - 世界唯一的你?
### INPUT
CREATE TABLE table_name_18 (round VARCHAR, song VARCHAR)
### OUTPUT
SELECT round FROM table_name_18 WHERE song = "陶喆、蔡依林 - 今天你要嫁给我/曹格 - 世界唯一的你" | {
"input": "CREATE TABLE table_name_18 (round VARCHAR, song VARCHAR)",
"instruction": "What round has this song: 陶喆、蔡依林 - 今天你要嫁给我/曹格 - 世界唯一的你?",
"output": "SELECT round FROM table_name_18 WHERE song = \"陶喆、蔡依林 - 今天你要嫁给我/曹格 - 世界唯一的你\""
} |
### INSTRUCTION
Can you tell me the Time that has the Opponent of phil baroni?
### INPUT
CREATE TABLE table_name_75 (time VARCHAR, opponent VARCHAR)
### OUTPUT
SELECT time FROM table_name_75 WHERE opponent = "phil baroni" | {
"input": "CREATE TABLE table_name_75 (time VARCHAR, opponent VARCHAR)",
"instruction": "Can you tell me the Time that has the Opponent of phil baroni?",
"output": "SELECT time FROM table_name_75 WHERE opponent = \"phil baroni\""
} |
### INSTRUCTION
Name the average ERP W when it has a city of license of pound, virginia and frequency mhz more than 91.3
### INPUT
CREATE TABLE table_name_90 (erp_w INTEGER, city_of_license VARCHAR, frequency_mhz VARCHAR)
### OUTPUT
SELECT AVG(erp_w) FROM table_name_90 WHERE city_of_license = "pound, virginia" AND frequency_mhz > 91.3 | {
"input": "CREATE TABLE table_name_90 (erp_w INTEGER, city_of_license VARCHAR, frequency_mhz VARCHAR)",
"instruction": "Name the average ERP W when it has a city of license of pound, virginia and frequency mhz more than 91.3",
"output": "SELECT AVG(erp_w) FROM table_name_90 WHERE city_of_license = \"pound, virginia\" AND frequency_mhz > 91.3"
} |
### INSTRUCTION
Which Year(s) won has a To par smaller than 12, and a Player of john daly?
### INPUT
CREATE TABLE table_name_50 (year_s__won VARCHAR, to_par VARCHAR, player VARCHAR)
### OUTPUT
SELECT year_s__won FROM table_name_50 WHERE to_par < 12 AND player = "john daly" | {
"input": "CREATE TABLE table_name_50 (year_s__won VARCHAR, to_par VARCHAR, player VARCHAR)",
"instruction": "Which Year(s) won has a To par smaller than 12, and a Player of john daly?",
"output": "SELECT year_s__won FROM table_name_50 WHERE to_par < 12 AND player = \"john daly\""
} |
### INSTRUCTION
What is the chassis for Augusto Scalbi on Team RP Motorsport?
### INPUT
CREATE TABLE table_name_34 (chassis VARCHAR, team VARCHAR, driver VARCHAR)
### OUTPUT
SELECT chassis FROM table_name_34 WHERE team = "rp motorsport" AND driver = "augusto scalbi" | {
"input": "CREATE TABLE table_name_34 (chassis VARCHAR, team VARCHAR, driver VARCHAR)",
"instruction": "What is the chassis for Augusto Scalbi on Team RP Motorsport?",
"output": "SELECT chassis FROM table_name_34 WHERE team = \"rp motorsport\" AND driver = \"augusto scalbi\""
} |
### INSTRUCTION
What country did Chris Witty represent?
### INPUT
CREATE TABLE table_name_50 (nation VARCHAR, name VARCHAR)
### OUTPUT
SELECT nation FROM table_name_50 WHERE name = "chris witty" | {
"input": "CREATE TABLE table_name_50 (nation VARCHAR, name VARCHAR)",
"instruction": "What country did Chris Witty represent?",
"output": "SELECT nation FROM table_name_50 WHERE name = \"chris witty\""
} |
### INSTRUCTION
What series has a season after 2008, super leg final as the format, and conference v as the conference?
### INPUT
CREATE TABLE table_name_39 (series VARCHAR, conference VARCHAR, season VARCHAR, format VARCHAR)
### OUTPUT
SELECT series FROM table_name_39 WHERE season > 2008 AND format = "super leg final" AND conference = "conference v" | {
"input": "CREATE TABLE table_name_39 (series VARCHAR, conference VARCHAR, season VARCHAR, format VARCHAR)",
"instruction": "What series has a season after 2008, super leg final as the format, and conference v as the conference?",
"output": "SELECT series FROM table_name_39 WHERE season > 2008 AND format = \"super leg final\" AND conference = \"conference v\""
} |
### INSTRUCTION
how many times is the home team wollongong hawks?
### INPUT
CREATE TABLE table_name_62 (crowd VARCHAR, home_team VARCHAR)
### OUTPUT
SELECT COUNT(crowd) FROM table_name_62 WHERE home_team = "wollongong hawks" | {
"input": "CREATE TABLE table_name_62 (crowd VARCHAR, home_team VARCHAR)",
"instruction": "how many times is the home team wollongong hawks?",
"output": "SELECT COUNT(crowd) FROM table_name_62 WHERE home_team = \"wollongong hawks\""
} |
### INSTRUCTION
what is the English meaning of the old English name "sæturnesdæg"?
### INPUT
CREATE TABLE table_2624098_1 (english_day_name_meaning VARCHAR, old_english_day_name VARCHAR)
### OUTPUT
SELECT english_day_name_meaning FROM table_2624098_1 WHERE old_english_day_name = "Sæturnesdæg" | {
"input": "CREATE TABLE table_2624098_1 (english_day_name_meaning VARCHAR, old_english_day_name VARCHAR)",
"instruction": "what is the English meaning of the old English name \"sæturnesdæg\"?",
"output": "SELECT english_day_name_meaning FROM table_2624098_1 WHERE old_english_day_name = \"Sæturnesdæg\""
} |
### INSTRUCTION
What is the average points of players from club with name "AIB".
### INPUT
CREATE TABLE player (Points INTEGER, Club_ID VARCHAR); CREATE TABLE club (Club_ID VARCHAR, name VARCHAR)
### OUTPUT
SELECT AVG(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = "AIB" | {
"input": "CREATE TABLE player (Points INTEGER, Club_ID VARCHAR); CREATE TABLE club (Club_ID VARCHAR, name VARCHAR)",
"instruction": "What is the average points of players from club with name \"AIB\".",
"output": "SELECT AVG(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = \"AIB\""
} |
### INSTRUCTION
Which competition was on August 11, 1996?
### INPUT
CREATE TABLE table_name_42 (competition VARCHAR, date VARCHAR)
### OUTPUT
SELECT competition FROM table_name_42 WHERE date = "august 11, 1996" | {
"input": "CREATE TABLE table_name_42 (competition VARCHAR, date VARCHAR)",
"instruction": "Which competition was on August 11, 1996?",
"output": "SELECT competition FROM table_name_42 WHERE date = \"august 11, 1996\""
} |
### INSTRUCTION
How many hometowns does the catcher have?
### INPUT
CREATE TABLE table_11677100_15 (hometown VARCHAR, position VARCHAR)
### OUTPUT
SELECT COUNT(hometown) FROM table_11677100_15 WHERE position = "Catcher" | {
"input": "CREATE TABLE table_11677100_15 (hometown VARCHAR, position VARCHAR)",
"instruction": "How many hometowns does the catcher have?",
"output": "SELECT COUNT(hometown) FROM table_11677100_15 WHERE position = \"Catcher\""
} |
### INSTRUCTION
What is the socket type for the processor with a multiplier 1 of 11.5x?
### INPUT
CREATE TABLE table_name_66 (socket VARCHAR, multiplier_1 VARCHAR)
### OUTPUT
SELECT socket FROM table_name_66 WHERE multiplier_1 = "11.5x" | {
"input": "CREATE TABLE table_name_66 (socket VARCHAR, multiplier_1 VARCHAR)",
"instruction": "What is the socket type for the processor with a multiplier 1 of 11.5x?",
"output": "SELECT socket FROM table_name_66 WHERE multiplier_1 = \"11.5x\""
} |
### INSTRUCTION
What is the lowest Perigee with a Launch date of 1970-08-26?
### INPUT
CREATE TABLE table_name_30 (perigee__km_ INTEGER, launch_date VARCHAR)
### OUTPUT
SELECT MIN(perigee__km_) FROM table_name_30 WHERE launch_date = "1970-08-26" | {
"input": "CREATE TABLE table_name_30 (perigee__km_ INTEGER, launch_date VARCHAR)",
"instruction": "What is the lowest Perigee with a Launch date of 1970-08-26?",
"output": "SELECT MIN(perigee__km_) FROM table_name_30 WHERE launch_date = \"1970-08-26\""
} |
### INSTRUCTION
Which of the attributes has is cancelable and an answer of yes for bubbles?
### INPUT
CREATE TABLE table_name_15 (attribute VARCHAR, cancelable VARCHAR, bubbles VARCHAR)
### OUTPUT
SELECT attribute FROM table_name_15 WHERE cancelable = "yes" AND bubbles = "yes" | {
"input": "CREATE TABLE table_name_15 (attribute VARCHAR, cancelable VARCHAR, bubbles VARCHAR)",
"instruction": "Which of the attributes has is cancelable and an answer of yes for bubbles?",
"output": "SELECT attribute FROM table_name_15 WHERE cancelable = \"yes\" AND bubbles = \"yes\""
} |
### INSTRUCTION
What is the result for 2004 when A is the result for 2005, and the result of q1 when 2009?
### INPUT
CREATE TABLE table_name_32 (Id VARCHAR)
### OUTPUT
SELECT 2004 FROM table_name_32 WHERE 2005 = "a" AND 2009 = "q1" | {
"input": "CREATE TABLE table_name_32 (Id VARCHAR)",
"instruction": "What is the result for 2004 when A is the result for 2005, and the result of q1 when 2009?",
"output": "SELECT 2004 FROM table_name_32 WHERE 2005 = \"a\" AND 2009 = \"q1\""
} |
### INSTRUCTION
For how long did Bolivia have a lane greater than 6?
### INPUT
CREATE TABLE table_name_56 (time VARCHAR, country VARCHAR, lane VARCHAR)
### OUTPUT
SELECT COUNT(time) FROM table_name_56 WHERE country = "bolivia" AND lane > 6 | {
"input": "CREATE TABLE table_name_56 (time VARCHAR, country VARCHAR, lane VARCHAR)",
"instruction": "For how long did Bolivia have a lane greater than 6?",
"output": "SELECT COUNT(time) FROM table_name_56 WHERE country = \"bolivia\" AND lane > 6"
} |
### INSTRUCTION
Which Population (2005) has a Literacy (2003) of 90%, and an Infant Mortality (2002) of 18.3‰?
### INPUT
CREATE TABLE table_name_14 (population__2005_ INTEGER, literacy__2003_ VARCHAR, infant_mortality__2002_ VARCHAR)
### OUTPUT
SELECT SUM(population__2005_) FROM table_name_14 WHERE literacy__2003_ = "90%" AND infant_mortality__2002_ = "18.3‰" | {
"input": "CREATE TABLE table_name_14 (population__2005_ INTEGER, literacy__2003_ VARCHAR, infant_mortality__2002_ VARCHAR)",
"instruction": "Which Population (2005) has a Literacy (2003) of 90%, and an Infant Mortality (2002) of 18.3‰?",
"output": "SELECT SUM(population__2005_) FROM table_name_14 WHERE literacy__2003_ = \"90%\" AND infant_mortality__2002_ = \"18.3‰\""
} |
### INSTRUCTION
Which college/junior/club teams nationality is canada and nhl team is minnesota north stars
### INPUT
CREATE TABLE table_1213511_7 (college_junior_club_team VARCHAR, nationality VARCHAR, nhl_team VARCHAR)
### OUTPUT
SELECT college_junior_club_team FROM table_1213511_7 WHERE nationality = "Canada" AND nhl_team = "Minnesota North Stars" | {
"input": "CREATE TABLE table_1213511_7 (college_junior_club_team VARCHAR, nationality VARCHAR, nhl_team VARCHAR)",
"instruction": "Which college/junior/club teams nationality is canada and nhl team is minnesota north stars",
"output": "SELECT college_junior_club_team FROM table_1213511_7 WHERE nationality = \"Canada\" AND nhl_team = \"Minnesota North Stars\""
} |
### INSTRUCTION
Find the first name and gender of student who have more than one pet.
### INPUT
CREATE TABLE student (fname VARCHAR, sex VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR)
### OUTPUT
SELECT T1.fname, T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING COUNT(*) > 1 | {
"input": "CREATE TABLE student (fname VARCHAR, sex VARCHAR, stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR)",
"instruction": "Find the first name and gender of student who have more than one pet.",
"output": "SELECT T1.fname, T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING COUNT(*) > 1"
} |
### INSTRUCTION
WHAT IS THE PACKAGE VERSION FOR blackberry storm 9530, APPLICATION 5.0.0.419, AND MTS MOBILITY?
### INPUT
CREATE TABLE table_name_9 (package_version VARCHAR, carrier VARCHAR, device VARCHAR, applications VARCHAR)
### OUTPUT
SELECT package_version FROM table_name_9 WHERE device = "blackberry storm 9530" AND applications = "5.0.0.419" AND carrier = "mts mobility" | {
"input": "CREATE TABLE table_name_9 (package_version VARCHAR, carrier VARCHAR, device VARCHAR, applications VARCHAR)",
"instruction": "WHAT IS THE PACKAGE VERSION FOR blackberry storm 9530, APPLICATION 5.0.0.419, AND MTS MOBILITY?",
"output": "SELECT package_version FROM table_name_9 WHERE device = \"blackberry storm 9530\" AND applications = \"5.0.0.419\" AND carrier = \"mts mobility\""
} |
### INSTRUCTION
What is the name of the winner of the tour championship tournament?
### INPUT
CREATE TABLE table_name_73 (winner VARCHAR, tournament VARCHAR)
### OUTPUT
SELECT winner FROM table_name_73 WHERE tournament = "the tour championship" | {
"input": "CREATE TABLE table_name_73 (winner VARCHAR, tournament VARCHAR)",
"instruction": "What is the name of the winner of the tour championship tournament?",
"output": "SELECT winner FROM table_name_73 WHERE tournament = \"the tour championship\""
} |
### INSTRUCTION
Which Home team faced the Away team, Hawthorn?
### INPUT
CREATE TABLE table_name_9 (home_team VARCHAR, away_team VARCHAR)
### OUTPUT
SELECT home_team FROM table_name_9 WHERE away_team = "hawthorn" | {
"input": "CREATE TABLE table_name_9 (home_team VARCHAR, away_team VARCHAR)",
"instruction": "Which Home team faced the Away team, Hawthorn?",
"output": "SELECT home_team FROM table_name_9 WHERE away_team = \"hawthorn\""
} |
### INSTRUCTION
How many times is vuelta wins when points is more than 0, country is spain and the name is josé pérez-francés?
### INPUT
CREATE TABLE table_name_67 (vuelta_wins VARCHAR, name VARCHAR, points VARCHAR, country VARCHAR)
### OUTPUT
SELECT COUNT(vuelta_wins) FROM table_name_67 WHERE points > 0 AND country = "spain" AND name = "josé pérez-francés" | {
"input": "CREATE TABLE table_name_67 (vuelta_wins VARCHAR, name VARCHAR, points VARCHAR, country VARCHAR)",
"instruction": "How many times is vuelta wins when points is more than 0, country is spain and the name is josé pérez-francés?",
"output": "SELECT COUNT(vuelta_wins) FROM table_name_67 WHERE points > 0 AND country = \"spain\" AND name = \"josé pérez-francés\""
} |
### INSTRUCTION
What was the outcome of the Tournament of lugano , switzerland wta virginia slims, against bonnie gadusek?
### INPUT
CREATE TABLE table_name_68 (outcome VARCHAR, tournament VARCHAR, opponent_in_the_final VARCHAR)
### OUTPUT
SELECT outcome FROM table_name_68 WHERE tournament = "lugano , switzerland wta virginia slims" AND opponent_in_the_final = "bonnie gadusek" | {
"input": "CREATE TABLE table_name_68 (outcome VARCHAR, tournament VARCHAR, opponent_in_the_final VARCHAR)",
"instruction": "What was the outcome of the Tournament of lugano , switzerland wta virginia slims, against bonnie gadusek?",
"output": "SELECT outcome FROM table_name_68 WHERE tournament = \"lugano , switzerland wta virginia slims\" AND opponent_in_the_final = \"bonnie gadusek\""
} |
### INSTRUCTION
What is the home team score when they played at Victoria Park?
### INPUT
CREATE TABLE table_name_7 (home_team VARCHAR, venue VARCHAR)
### OUTPUT
SELECT home_team AS score FROM table_name_7 WHERE venue = "victoria park" | {
"input": "CREATE TABLE table_name_7 (home_team VARCHAR, venue VARCHAR)",
"instruction": "What is the home team score when they played at Victoria Park?",
"output": "SELECT home_team AS score FROM table_name_7 WHERE venue = \"victoria park\""
} |
### INSTRUCTION
find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30.
### INPUT
CREATE TABLE MATCH (winning_pilot VARCHAR); CREATE TABLE pilot (name VARCHAR, age INTEGER, pilot_id VARCHAR)
### OUTPUT
SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY COUNT(*) DESC LIMIT 1 | {
"input": "CREATE TABLE MATCH (winning_pilot VARCHAR); CREATE TABLE pilot (name VARCHAR, age INTEGER, pilot_id VARCHAR)",
"instruction": "find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30.",
"output": "SELECT t1.name, t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY COUNT(*) DESC LIMIT 1"
} |
### INSTRUCTION
What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is "PUR"?
### INPUT
CREATE TABLE LOTS (lot_details VARCHAR, lot_id VARCHAR); CREATE TABLE TRANSACTIONS_LOTS (transaction_id VARCHAR); CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, share_count VARCHAR, transaction_type_code VARCHAR)
### OUTPUT
SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = "PUR" | {
"input": "CREATE TABLE LOTS (lot_details VARCHAR, lot_id VARCHAR); CREATE TABLE TRANSACTIONS_LOTS (transaction_id VARCHAR); CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, share_count VARCHAR, transaction_type_code VARCHAR)",
"instruction": "What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is \"PUR\"?",
"output": "SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = \"PUR\""
} |
### INSTRUCTION
How many votes did Lee Teng-Hui receive when he was elected?
### INPUT
CREATE TABLE table_name_7 (total_votes INTEGER, outcome VARCHAR, candidate VARCHAR)
### OUTPUT
SELECT MAX(total_votes) FROM table_name_7 WHERE outcome = "elected" AND candidate = "lee teng-hui" | {
"input": "CREATE TABLE table_name_7 (total_votes INTEGER, outcome VARCHAR, candidate VARCHAR)",
"instruction": "How many votes did Lee Teng-Hui receive when he was elected?",
"output": "SELECT MAX(total_votes) FROM table_name_7 WHERE outcome = \"elected\" AND candidate = \"lee teng-hui\""
} |
### INSTRUCTION
What is Caps, when Province / Club is DRFC, and when Position is Center?
### INPUT
CREATE TABLE table_name_49 (caps VARCHAR, province___club VARCHAR, position VARCHAR)
### OUTPUT
SELECT caps FROM table_name_49 WHERE province___club = "drfc" AND position = "center" | {
"input": "CREATE TABLE table_name_49 (caps VARCHAR, province___club VARCHAR, position VARCHAR)",
"instruction": "What is Caps, when Province / Club is DRFC, and when Position is Center?",
"output": "SELECT caps FROM table_name_49 WHERE province___club = \"drfc\" AND position = \"center\""
} |
### INSTRUCTION
Name the total number of reason for change for not filled this congress
### INPUT
CREATE TABLE table_225200_4 (reason_for_change VARCHAR, date_successor_seated VARCHAR)
### OUTPUT
SELECT COUNT(reason_for_change) FROM table_225200_4 WHERE date_successor_seated = "Not filled this congress" | {
"input": "CREATE TABLE table_225200_4 (reason_for_change VARCHAR, date_successor_seated VARCHAR)",
"instruction": "Name the total number of reason for change for not filled this congress",
"output": "SELECT COUNT(reason_for_change) FROM table_225200_4 WHERE date_successor_seated = \"Not filled this congress\""
} |
### INSTRUCTION
What was Footscray's score as an away team?
### INPUT
CREATE TABLE table_name_45 (away_team VARCHAR)
### OUTPUT
SELECT away_team AS score FROM table_name_45 WHERE away_team = "footscray" | {
"input": "CREATE TABLE table_name_45 (away_team VARCHAR)",
"instruction": "What was Footscray's score as an away team?",
"output": "SELECT away_team AS score FROM table_name_45 WHERE away_team = \"footscray\""
} |
### INSTRUCTION
What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff?
### INPUT
CREATE TABLE Staff_Department_Assignments (staff_id VARCHAR, date_assigned_to INTEGER, job_title_code VARCHAR)
### OUTPUT
SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT MAX(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff') | {
"input": "CREATE TABLE Staff_Department_Assignments (staff_id VARCHAR, date_assigned_to INTEGER, job_title_code VARCHAR)",
"instruction": "What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff?",
"output": "SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT MAX(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff')"
} |
### INSTRUCTION
What is the l/100km urban (cold) with a CO 2 g/km less than 222, an mpg-us urban greater than 17.8, an mpg-uk extra-urban of 55.4, and an engine capacity greater than 1560?
### INPUT
CREATE TABLE table_name_24 (l_100km_urban__cold_ VARCHAR, engine_capacity VARCHAR, mpg_uk_extra_urban VARCHAR, co_2_g_km VARCHAR, mpg_us_urban VARCHAR)
### OUTPUT
SELECT l_100km_urban__cold_ FROM table_name_24 WHERE co_2_g_km < 222 AND mpg_us_urban > 17.8 AND mpg_uk_extra_urban = 55.4 AND engine_capacity > 1560 | {
"input": "CREATE TABLE table_name_24 (l_100km_urban__cold_ VARCHAR, engine_capacity VARCHAR, mpg_uk_extra_urban VARCHAR, co_2_g_km VARCHAR, mpg_us_urban VARCHAR)",
"instruction": "What is the l/100km urban (cold) with a CO 2 g/km less than 222, an mpg-us urban greater than 17.8, an mpg-uk extra-urban of 55.4, and an engine capacity greater than 1560?",
"output": "SELECT l_100km_urban__cold_ FROM table_name_24 WHERE co_2_g_km < 222 AND mpg_us_urban > 17.8 AND mpg_uk_extra_urban = 55.4 AND engine_capacity > 1560"
} |
### INSTRUCTION
Which customer status code has least number of customers?
### INPUT
CREATE TABLE Customers (customer_status_code VARCHAR)
### OUTPUT
SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY COUNT(*) LIMIT 1 | {
"input": "CREATE TABLE Customers (customer_status_code VARCHAR)",
"instruction": "Which customer status code has least number of customers?",
"output": "SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY COUNT(*) LIMIT 1"
} |
### INSTRUCTION
Where the time/retired is +1 lap, the constructor is BRM, and the grid is above 1, what's the highest laps recorded?
### INPUT
CREATE TABLE table_name_25 (laps INTEGER, grid VARCHAR, time_retired VARCHAR, constructor VARCHAR)
### OUTPUT
SELECT MAX(laps) FROM table_name_25 WHERE time_retired = "+1 lap" AND constructor = "brm" AND grid > 1 | {
"input": "CREATE TABLE table_name_25 (laps INTEGER, grid VARCHAR, time_retired VARCHAR, constructor VARCHAR)",
"instruction": "Where the time/retired is +1 lap, the constructor is BRM, and the grid is above 1, what's the highest laps recorded?",
"output": "SELECT MAX(laps) FROM table_name_25 WHERE time_retired = \"+1 lap\" AND constructor = \"brm\" AND grid > 1"
} |
### INSTRUCTION
What is the lowest Rank for the Name, "area of permanent crops", Out of a number smaller than 181?
### INPUT
CREATE TABLE table_name_66 (rank INTEGER, name VARCHAR, out_of VARCHAR)
### OUTPUT
SELECT MIN(rank) FROM table_name_66 WHERE name = "area of permanent crops" AND out_of < 181 | {
"input": "CREATE TABLE table_name_66 (rank INTEGER, name VARCHAR, out_of VARCHAR)",
"instruction": "What is the lowest Rank for the Name, \"area of permanent crops\", Out of a number smaller than 181?",
"output": "SELECT MIN(rank) FROM table_name_66 WHERE name = \"area of permanent crops\" AND out_of < 181"
} |
### INSTRUCTION
Which common has an area (km2) of 38.38?
### INPUT
CREATE TABLE table_1449169_1 (common VARCHAR, area__km_2__ VARCHAR)
### OUTPUT
SELECT common FROM table_1449169_1 WHERE area__km_2__ = "38.38" | {
"input": "CREATE TABLE table_1449169_1 (common VARCHAR, area__km_2__ VARCHAR)",
"instruction": "Which common has an area (km2) of 38.38?",
"output": "SELECT common FROM table_1449169_1 WHERE area__km_2__ = \"38.38\""
} |
### INSTRUCTION
Find the start and end dates of detentions of teachers with last name "Schultz".
### INPUT
CREATE TABLE Detention (datetime_detention_start VARCHAR, teacher_id VARCHAR); CREATE TABLE Teachers (teacher_id VARCHAR, last_name VARCHAR)
### OUTPUT
SELECT T1.datetime_detention_start, datetime_detention_end FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = "Schultz" | {
"input": "CREATE TABLE Detention (datetime_detention_start VARCHAR, teacher_id VARCHAR); CREATE TABLE Teachers (teacher_id VARCHAR, last_name VARCHAR)",
"instruction": "Find the start and end dates of detentions of teachers with last name \"Schultz\".",
"output": "SELECT T1.datetime_detention_start, datetime_detention_end FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = \"Schultz\""
} |
### INSTRUCTION
When in November were they 11-7-3 with over 21 games?
### INPUT
CREATE TABLE table_name_80 (november INTEGER, record VARCHAR, game VARCHAR)
### OUTPUT
SELECT MAX(november) FROM table_name_80 WHERE record = "11-7-3" AND game > 21 | {
"input": "CREATE TABLE table_name_80 (november INTEGER, record VARCHAR, game VARCHAR)",
"instruction": "When in November were they 11-7-3 with over 21 games?",
"output": "SELECT MAX(november) FROM table_name_80 WHERE record = \"11-7-3\" AND game > 21"
} |
### INSTRUCTION
How many Picks have a Position of defensive end, and an Overall smaller than 33?
### INPUT
CREATE TABLE table_name_22 (pick__number VARCHAR, position VARCHAR, overall VARCHAR)
### OUTPUT
SELECT COUNT(pick__number) FROM table_name_22 WHERE position = "defensive end" AND overall < 33 | {
"input": "CREATE TABLE table_name_22 (pick__number VARCHAR, position VARCHAR, overall VARCHAR)",
"instruction": "How many Picks have a Position of defensive end, and an Overall smaller than 33?",
"output": "SELECT COUNT(pick__number) FROM table_name_22 WHERE position = \"defensive end\" AND overall < 33"
} |
### INSTRUCTION
Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in.
### INPUT
CREATE TABLE trained_in (physician VARCHAR, treatment VARCHAR); CREATE TABLE procedures (name VARCHAR, cost INTEGER); CREATE TABLE physician (employeeid VARCHAR, name VARCHAR); CREATE TABLE procedures (name VARCHAR, code VARCHAR)
### OUTPUT
SELECT name FROM procedures WHERE cost < 5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = "John Wen" | {
"input": "CREATE TABLE trained_in (physician VARCHAR, treatment VARCHAR); CREATE TABLE procedures (name VARCHAR, cost INTEGER); CREATE TABLE physician (employeeid VARCHAR, name VARCHAR); CREATE TABLE procedures (name VARCHAR, code VARCHAR)",
"instruction": "Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in.",
"output": "SELECT name FROM procedures WHERE cost < 5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\""
} |
### INSTRUCTION
How many wins when there are more than 19 points, place smaller than 12, and fewer than 30 played?
### INPUT
CREATE TABLE table_name_36 (wins INTEGER, played VARCHAR, points VARCHAR, position VARCHAR)
### OUTPUT
SELECT SUM(wins) FROM table_name_36 WHERE points > 19 AND position < 12 AND played < 30 | {
"input": "CREATE TABLE table_name_36 (wins INTEGER, played VARCHAR, points VARCHAR, position VARCHAR)",
"instruction": "How many wins when there are more than 19 points, place smaller than 12, and fewer than 30 played?",
"output": "SELECT SUM(wins) FROM table_name_36 WHERE points > 19 AND position < 12 AND played < 30"
} |
### INSTRUCTION
What is the Score when the opponent in the final is alicia pillay on a hard surface?
### INPUT
CREATE TABLE table_name_73 (score VARCHAR, surface VARCHAR, opponent_in_the_final VARCHAR)
### OUTPUT
SELECT score FROM table_name_73 WHERE surface = "hard" AND opponent_in_the_final = "alicia pillay" | {
"input": "CREATE TABLE table_name_73 (score VARCHAR, surface VARCHAR, opponent_in_the_final VARCHAR)",
"instruction": "What is the Score when the opponent in the final is alicia pillay on a hard surface?",
"output": "SELECT score FROM table_name_73 WHERE surface = \"hard\" AND opponent_in_the_final = \"alicia pillay\""
} |
### INSTRUCTION
What is the col location with a col height (m) of 1107?
### INPUT
CREATE TABLE table_2731431_1 (col_location VARCHAR, col_height__m_ VARCHAR)
### OUTPUT
SELECT col_location FROM table_2731431_1 WHERE col_height__m_ = 1107 | {
"input": "CREATE TABLE table_2731431_1 (col_location VARCHAR, col_height__m_ VARCHAR)",
"instruction": "What is the col location with a col height (m) of 1107?",
"output": "SELECT col_location FROM table_2731431_1 WHERE col_height__m_ = 1107"
} |
### INSTRUCTION
Find all the songs that do not have a back vocal.
### INPUT
CREATE TABLE songs (title VARCHAR, songid VARCHAR); CREATE TABLE vocals (songid VARCHAR)
### OUTPUT
SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = "back" | {
"input": "CREATE TABLE songs (title VARCHAR, songid VARCHAR); CREATE TABLE vocals (songid VARCHAR)",
"instruction": "Find all the songs that do not have a back vocal.",
"output": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = \"back\""
} |
### INSTRUCTION
Who was the elevator when the Cardinal-Deacon of S. Nicola in Carcere Tulliano was the order and title?
### INPUT
CREATE TABLE table_name_56 (elevator VARCHAR, order_and_title VARCHAR)
### OUTPUT
SELECT elevator FROM table_name_56 WHERE order_and_title = "cardinal-deacon of s. nicola in carcere tulliano" | {
"input": "CREATE TABLE table_name_56 (elevator VARCHAR, order_and_title VARCHAR)",
"instruction": "Who was the elevator when the Cardinal-Deacon of S. Nicola in Carcere Tulliano was the order and title?",
"output": "SELECT elevator FROM table_name_56 WHERE order_and_title = \"cardinal-deacon of s. nicola in carcere tulliano\""
} |
### INSTRUCTION
What is the highest tourism arrivals in 2011 in millions with a 3.82 tourism competitiveness in 2011 and more than 1,102 US$ per arrival in 2011 tourism receipts?
### INPUT
CREATE TABLE table_name_92 (tourist_arrivals__2011___millions_ INTEGER, tourism_competitiveness__2011___ttci_ VARCHAR, tourism_receipts__2011___us$_per_arrival_ VARCHAR)
### OUTPUT
SELECT MAX(tourist_arrivals__2011___millions_) FROM table_name_92 WHERE tourism_competitiveness__2011___ttci_ = "3.82" AND tourism_receipts__2011___us$_per_arrival_ > 1 OFFSET 102 | {
"input": "CREATE TABLE table_name_92 (tourist_arrivals__2011___millions_ INTEGER, tourism_competitiveness__2011___ttci_ VARCHAR, tourism_receipts__2011___us$_per_arrival_ VARCHAR)",
"instruction": "What is the highest tourism arrivals in 2011 in millions with a 3.82 tourism competitiveness in 2011 and more than 1,102 US$ per arrival in 2011 tourism receipts?",
"output": "SELECT MAX(tourist_arrivals__2011___millions_) FROM table_name_92 WHERE tourism_competitiveness__2011___ttci_ = \"3.82\" AND tourism_receipts__2011___us$_per_arrival_ > 1 OFFSET 102"
} |
### INSTRUCTION
What is the Time of the Player with a Rank of 1 or 2 and Notes of FA?
### INPUT
CREATE TABLE table_name_75 (time VARCHAR, notes VARCHAR, rank VARCHAR)
### OUTPUT
SELECT time FROM table_name_75 WHERE notes = "fa" AND rank < 2 | {
"input": "CREATE TABLE table_name_75 (time VARCHAR, notes VARCHAR, rank VARCHAR)",
"instruction": "What is the Time of the Player with a Rank of 1 or 2 and Notes of FA?",
"output": "SELECT time FROM table_name_75 WHERE notes = \"fa\" AND rank < 2"
} |
### INSTRUCTION
When 7th place, what is the date?
### INPUT
CREATE TABLE table_name_45 (date VARCHAR, place VARCHAR)
### OUTPUT
SELECT date FROM table_name_45 WHERE place = "7th" | {
"input": "CREATE TABLE table_name_45 (date VARCHAR, place VARCHAR)",
"instruction": "When 7th place, what is the date?",
"output": "SELECT date FROM table_name_45 WHERE place = \"7th\""
} |
### INSTRUCTION
Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000.
### INPUT
CREATE TABLE Product_Suppliers (supplier_id VARCHAR, total_amount_purchased INTEGER)
### OUTPUT
SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING AVG(total_amount_purchased) > 50000 OR AVG(total_amount_purchased) < 30000 | {
"input": "CREATE TABLE Product_Suppliers (supplier_id VARCHAR, total_amount_purchased INTEGER)",
"instruction": "Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000.",
"output": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING AVG(total_amount_purchased) > 50000 OR AVG(total_amount_purchased) < 30000"
} |
### INSTRUCTION
Which Democratic incumbent was first elected in 1998?
### INPUT
CREATE TABLE table_name_18 (incumbent VARCHAR, party VARCHAR, first_elected VARCHAR)
### OUTPUT
SELECT incumbent FROM table_name_18 WHERE party = "democratic" AND first_elected = 1998 | {
"input": "CREATE TABLE table_name_18 (incumbent VARCHAR, party VARCHAR, first_elected VARCHAR)",
"instruction": "Which Democratic incumbent was first elected in 1998?",
"output": "SELECT incumbent FROM table_name_18 WHERE party = \"democratic\" AND first_elected = 1998"
} |
### INSTRUCTION
Find the name of students who took any class in the years of 2009 and 2010.
### INPUT
CREATE TABLE student (name VARCHAR, id VARCHAR); CREATE TABLE takes (id VARCHAR)
### OUTPUT
SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010 | {
"input": "CREATE TABLE student (name VARCHAR, id VARCHAR); CREATE TABLE takes (id VARCHAR)",
"instruction": "Find the name of students who took any class in the years of 2009 and 2010.",
"output": "SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010"
} |
### INSTRUCTION
What is the pos with more than 1 tier during Pokal Slovenije 1. round?
### INPUT
CREATE TABLE table_name_20 (pos VARCHAR, tier VARCHAR, cup_competitions VARCHAR)
### OUTPUT
SELECT pos FROM table_name_20 WHERE tier > 1 AND cup_competitions = "pokal slovenije 1. round" | {
"input": "CREATE TABLE table_name_20 (pos VARCHAR, tier VARCHAR, cup_competitions VARCHAR)",
"instruction": "What is the pos with more than 1 tier during Pokal Slovenije 1. round?",
"output": "SELECT pos FROM table_name_20 WHERE tier > 1 AND cup_competitions = \"pokal slovenije 1. round\""
} |
### INSTRUCTION
What is the average number of points for a team that played 17 games and had more than 15 losses?
### INPUT
CREATE TABLE table_name_37 (points INTEGER, games VARCHAR, losses VARCHAR)
### OUTPUT
SELECT AVG(points) FROM table_name_37 WHERE games = 17 AND losses > 15 | {
"input": "CREATE TABLE table_name_37 (points INTEGER, games VARCHAR, losses VARCHAR)",
"instruction": "What is the average number of points for a team that played 17 games and had more than 15 losses?",
"output": "SELECT AVG(points) FROM table_name_37 WHERE games = 17 AND losses > 15"
} |
### INSTRUCTION
Find the number of classes in each school.
### INPUT
CREATE TABLE department (school_code VARCHAR, dept_code VARCHAR); CREATE TABLE CLASS (crs_code VARCHAR); CREATE TABLE course (crs_code VARCHAR, dept_code VARCHAR)
### OUTPUT
SELECT COUNT(*), T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T2.dept_code = T3.dept_code GROUP BY T3.school_code | {
"input": "CREATE TABLE department (school_code VARCHAR, dept_code VARCHAR); CREATE TABLE CLASS (crs_code VARCHAR); CREATE TABLE course (crs_code VARCHAR, dept_code VARCHAR)",
"instruction": "Find the number of classes in each school.",
"output": "SELECT COUNT(*), T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T2.dept_code = T3.dept_code GROUP BY T3.school_code"
} |
### INSTRUCTION
List the dates of enrollment and completion of the student with personal name "Karson".
### INPUT
CREATE TABLE Student_Course_Enrolment (date_of_enrolment VARCHAR, date_of_completion VARCHAR, student_id VARCHAR); CREATE TABLE Students (student_id VARCHAR, personal_name VARCHAR)
### OUTPUT
SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = "Karson" | {
"input": "CREATE TABLE Student_Course_Enrolment (date_of_enrolment VARCHAR, date_of_completion VARCHAR, student_id VARCHAR); CREATE TABLE Students (student_id VARCHAR, personal_name VARCHAR)",
"instruction": "List the dates of enrollment and completion of the student with personal name \"Karson\".",
"output": "SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = \"Karson\""
} |
### INSTRUCTION
How many names have a country of civ?
### INPUT
CREATE TABLE table_22810095_8 (COUnT VARCHAR, country VARCHAR)
### OUTPUT
SELECT COUnT AS name FROM table_22810095_8 WHERE country = "CIV" | {
"input": "CREATE TABLE table_22810095_8 (COUnT VARCHAR, country VARCHAR)",
"instruction": "How many names have a country of civ?",
"output": "SELECT COUnT AS name FROM table_22810095_8 WHERE country = \"CIV\""
} |
### INSTRUCTION
How many games were played in park "Columbia Park" in 1907?
### INPUT
CREATE TABLE park (park_id VARCHAR, park_name VARCHAR); CREATE TABLE home_game (park_id VARCHAR, year VARCHAR)
### OUTPUT
SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park' | {
"input": "CREATE TABLE park (park_id VARCHAR, park_name VARCHAR); CREATE TABLE home_game (park_id VARCHAR, year VARCHAR)",
"instruction": "How many games were played in park \"Columbia Park\" in 1907?",
"output": "SELECT COUNT(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park'"
} |
### INSTRUCTION
Tell me the declination for consellaion of ophiuchus and apparent magnitude less than 8.6 with right ascension of 16h47m14.5s
### INPUT
CREATE TABLE table_name_55 (declination___j2000__ VARCHAR, right_ascension___j2000__ VARCHAR, constellation VARCHAR, apparent_magnitude VARCHAR)
### OUTPUT
SELECT declination___j2000__ FROM table_name_55 WHERE constellation = "ophiuchus" AND apparent_magnitude < 8.6 AND right_ascension___j2000__ = "16h47m14.5s" | {
"input": "CREATE TABLE table_name_55 (declination___j2000__ VARCHAR, right_ascension___j2000__ VARCHAR, constellation VARCHAR, apparent_magnitude VARCHAR)",
"instruction": "Tell me the declination for consellaion of ophiuchus and apparent magnitude less than 8.6 with right ascension of 16h47m14.5s",
"output": "SELECT declination___j2000__ FROM table_name_55 WHERE constellation = \"ophiuchus\" AND apparent_magnitude < 8.6 AND right_ascension___j2000__ = \"16h47m14.5s\""
} |
### INSTRUCTION
What is the least amount of bronze Andorra, who has more than 6 total medals, has?
### INPUT
CREATE TABLE table_name_86 (bronze INTEGER, nation VARCHAR, total VARCHAR)
### OUTPUT
SELECT MIN(bronze) FROM table_name_86 WHERE nation = "andorra" AND total > 6 | {
"input": "CREATE TABLE table_name_86 (bronze INTEGER, nation VARCHAR, total VARCHAR)",
"instruction": "What is the least amount of bronze Andorra, who has more than 6 total medals, has?",
"output": "SELECT MIN(bronze) FROM table_name_86 WHERE nation = \"andorra\" AND total > 6"
} |
### INSTRUCTION
Which Date has a Winning constructor of fiat and a Winning driver of louis wagner?
### INPUT
CREATE TABLE table_name_34 (date VARCHAR, winning_constructor VARCHAR, winning_driver VARCHAR)
### OUTPUT
SELECT date FROM table_name_34 WHERE winning_constructor = "fiat" AND winning_driver = "louis wagner" | {
"input": "CREATE TABLE table_name_34 (date VARCHAR, winning_constructor VARCHAR, winning_driver VARCHAR)",
"instruction": "Which Date has a Winning constructor of fiat and a Winning driver of louis wagner?",
"output": "SELECT date FROM table_name_34 WHERE winning_constructor = \"fiat\" AND winning_driver = \"louis wagner\""
} |
### INSTRUCTION
Who is performing in the back stage position for the song "Der Kapitan"? Show the first name and last name.
### INPUT
CREATE TABLE Band (firstname VARCHAR, lastname VARCHAR, id VARCHAR); CREATE TABLE Performance (bandmate VARCHAR, SongId VARCHAR, StagePosition VARCHAR); CREATE TABLE Songs (SongId VARCHAR, Title VARCHAR)
### OUTPUT
SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = "Der Kapitan" AND T1.StagePosition = "back" | {
"input": "CREATE TABLE Band (firstname VARCHAR, lastname VARCHAR, id VARCHAR); CREATE TABLE Performance (bandmate VARCHAR, SongId VARCHAR, StagePosition VARCHAR); CREATE TABLE Songs (SongId VARCHAR, Title VARCHAR)",
"instruction": "Who is performing in the back stage position for the song \"Der Kapitan\"? Show the first name and last name.",
"output": "SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Der Kapitan\" AND T1.StagePosition = \"back\""
} |
### INSTRUCTION
How many times does Switzerland have under 7 golds and less than 3 silvers?
### INPUT
CREATE TABLE table_name_17 (total VARCHAR, silver VARCHAR, country VARCHAR, gold VARCHAR)
### OUTPUT
SELECT COUNT(total) FROM table_name_17 WHERE country = "switzerland" AND gold < 7 AND silver < 3 | {
"input": "CREATE TABLE table_name_17 (total VARCHAR, silver VARCHAR, country VARCHAR, gold VARCHAR)",
"instruction": "How many times does Switzerland have under 7 golds and less than 3 silvers?",
"output": "SELECT COUNT(total) FROM table_name_17 WHERE country = \"switzerland\" AND gold < 7 AND silver < 3"
} |
### INSTRUCTION
Which products has been complained by the customer who has filed least amount of complaints?
### INPUT
CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE complaints (product_id VARCHAR)
### OUTPUT
SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id JOIN customers AS t3 GROUP BY t3.customer_id ORDER BY COUNT(*) LIMIT 1 | {
"input": "CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE products (product_name VARCHAR, product_id VARCHAR); CREATE TABLE complaints (product_id VARCHAR)",
"instruction": "Which products has been complained by the customer who has filed least amount of complaints?",
"output": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id JOIN customers AS t3 GROUP BY t3.customer_id ORDER BY COUNT(*) LIMIT 1"
} |
### INSTRUCTION
what is the soap opera when the duration is 18 years and the character is miley byrne?
### INPUT
CREATE TABLE table_name_4 (soap_opera VARCHAR, duration VARCHAR, character VARCHAR)
### OUTPUT
SELECT soap_opera FROM table_name_4 WHERE duration = "18 years" AND character = "miley byrne" | {
"input": "CREATE TABLE table_name_4 (soap_opera VARCHAR, duration VARCHAR, character VARCHAR)",
"instruction": "what is the soap opera when the duration is 18 years and the character is miley byrne?",
"output": "SELECT soap_opera FROM table_name_4 WHERE duration = \"18 years\" AND character = \"miley byrne\""
} |
### INSTRUCTION
What are the names of nations speak both English and French?
### INPUT
CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR)
### OUTPUT
SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "French" | {
"input": "CREATE TABLE country (Name VARCHAR, Code VARCHAR); CREATE TABLE countrylanguage (CountryCode VARCHAR, Language VARCHAR)",
"instruction": "What are the names of nations speak both English and French?",
"output": "SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"English\" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = \"French\""
} |
### INSTRUCTION
how many times were the candidates thomas h. hubbard (dr) 51.5% simeon ford (f) 48.4%?
### INPUT
CREATE TABLE table_2668347_14 (party VARCHAR, candidates VARCHAR)
### OUTPUT
SELECT COUNT(party) FROM table_2668347_14 WHERE candidates = "Thomas H. Hubbard (DR) 51.5% Simeon Ford (F) 48.4%" | {
"input": "CREATE TABLE table_2668347_14 (party VARCHAR, candidates VARCHAR)",
"instruction": "how many times were the candidates thomas h. hubbard (dr) 51.5% simeon ford (f) 48.4%?",
"output": "SELECT COUNT(party) FROM table_2668347_14 WHERE candidates = \"Thomas H. Hubbard (DR) 51.5% Simeon Ford (F) 48.4%\""
} |
### INSTRUCTION
Find the names of the customers who have an deputy policy.
### INPUT
CREATE TABLE policies (customer_id VARCHAR, policy_type_code VARCHAR); CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR)
### OUTPUT
SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = "Deputy" | {
"input": "CREATE TABLE policies (customer_id VARCHAR, policy_type_code VARCHAR); CREATE TABLE customers (customer_details VARCHAR, customer_id VARCHAR)",
"instruction": "Find the names of the customers who have an deputy policy.",
"output": "SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = \"Deputy\""
} |
### INSTRUCTION
What is teh born-died dates of the king with a throne name 315 and left office in 1021?
### INPUT
CREATE TABLE table_name_74 (born_died VARCHAR, left_office VARCHAR, throne_name VARCHAR)
### OUTPUT
SELECT born_died FROM table_name_74 WHERE left_office = "1021" AND throne_name = "315" | {
"input": "CREATE TABLE table_name_74 (born_died VARCHAR, left_office VARCHAR, throne_name VARCHAR)",
"instruction": "What is teh born-died dates of the king with a throne name 315 and left office in 1021?",
"output": "SELECT born_died FROM table_name_74 WHERE left_office = \"1021\" AND throne_name = \"315\""
} |
### INSTRUCTION
In which year was the Tournament of european indoor championships played where the Extra was 800 m and the Result was 2nd?
### INPUT
CREATE TABLE table_name_95 (year VARCHAR, result VARCHAR, extra VARCHAR, tournament VARCHAR)
### OUTPUT
SELECT year FROM table_name_95 WHERE extra = "800 m" AND tournament = "european indoor championships" AND result = "2nd" | {
"input": "CREATE TABLE table_name_95 (year VARCHAR, result VARCHAR, extra VARCHAR, tournament VARCHAR)",
"instruction": "In which year was the Tournament of european indoor championships played where the Extra was 800 m and the Result was 2nd?",
"output": "SELECT year FROM table_name_95 WHERE extra = \"800 m\" AND tournament = \"european indoor championships\" AND result = \"2nd\""
} |
### INSTRUCTION
How many RolePlay actors played the same role as FlatSpin's Tracy Taylor?
### INPUT
CREATE TABLE table_17827271_1 (roleplay VARCHAR, flatspin VARCHAR)
### OUTPUT
SELECT COUNT(roleplay) FROM table_17827271_1 WHERE flatspin = "Tracy Taylor" | {
"input": "CREATE TABLE table_17827271_1 (roleplay VARCHAR, flatspin VARCHAR)",
"instruction": "How many RolePlay actors played the same role as FlatSpin's Tracy Taylor?",
"output": "SELECT COUNT(roleplay) FROM table_17827271_1 WHERE flatspin = \"Tracy Taylor\""
} |
### INSTRUCTION
What season had more than 12 contestants in which greydis gil won?
### INPUT
CREATE TABLE table_name_98 (season VARCHAR, number_of_contestants VARCHAR, winner VARCHAR)
### OUTPUT
SELECT season FROM table_name_98 WHERE number_of_contestants > 12 AND winner = "greydis gil" | {
"input": "CREATE TABLE table_name_98 (season VARCHAR, number_of_contestants VARCHAR, winner VARCHAR)",
"instruction": "What season had more than 12 contestants in which greydis gil won?",
"output": "SELECT season FROM table_name_98 WHERE number_of_contestants > 12 AND winner = \"greydis gil\""
} |
### INSTRUCTION
Name for the high rebounds when score is w 105–91 (ot)
### INPUT
CREATE TABLE table_15780718_6 (high_rebounds VARCHAR, score VARCHAR)
### OUTPUT
SELECT high_rebounds FROM table_15780718_6 WHERE score = "W 105–91 (OT)" | {
"input": "CREATE TABLE table_15780718_6 (high_rebounds VARCHAR, score VARCHAR)",
"instruction": "Name for the high rebounds when score is w 105–91 (ot)",
"output": "SELECT high_rebounds FROM table_15780718_6 WHERE score = \"W 105–91 (OT)\""
} |
### INSTRUCTION
How many FA cup goals have Jimmy Nicholson as the name, and league cup goals greater than 0?
### INPUT
CREATE TABLE table_name_41 (fa_cup_goals VARCHAR, name VARCHAR, league_cup_goals VARCHAR)
### OUTPUT
SELECT COUNT(fa_cup_goals) FROM table_name_41 WHERE name = "jimmy nicholson" AND league_cup_goals > 0 | {
"input": "CREATE TABLE table_name_41 (fa_cup_goals VARCHAR, name VARCHAR, league_cup_goals VARCHAR)",
"instruction": "How many FA cup goals have Jimmy Nicholson as the name, and league cup goals greater than 0?",
"output": "SELECT COUNT(fa_cup_goals) FROM table_name_41 WHERE name = \"jimmy nicholson\" AND league_cup_goals > 0"
} |
### INSTRUCTION
Name the original airdate for robin mukherjee and margy kinmonth
### INPUT
CREATE TABLE table_27208814_1 (original_airdate VARCHAR, writer VARCHAR, director VARCHAR)
### OUTPUT
SELECT original_airdate FROM table_27208814_1 WHERE writer = "Robin Mukherjee" AND director = "Margy Kinmonth" | {
"input": "CREATE TABLE table_27208814_1 (original_airdate VARCHAR, writer VARCHAR, director VARCHAR)",
"instruction": "Name the original airdate for robin mukherjee and margy kinmonth",
"output": "SELECT original_airdate FROM table_27208814_1 WHERE writer = \"Robin Mukherjee\" AND director = \"Margy Kinmonth\""
} |
### INSTRUCTION
What is Incumbent, when Results is "Re-Elected", when Party is "Democratic", and when District is "Minnesota 7"?
### INPUT
CREATE TABLE table_name_75 (incumbent VARCHAR, district VARCHAR, results VARCHAR, party VARCHAR)
### OUTPUT
SELECT incumbent FROM table_name_75 WHERE results = "re-elected" AND party = "democratic" AND district = "minnesota 7" | {
"input": "CREATE TABLE table_name_75 (incumbent VARCHAR, district VARCHAR, results VARCHAR, party VARCHAR)",
"instruction": "What is Incumbent, when Results is \"Re-Elected\", when Party is \"Democratic\", and when District is \"Minnesota 7\"?",
"output": "SELECT incumbent FROM table_name_75 WHERE results = \"re-elected\" AND party = \"democratic\" AND district = \"minnesota 7\""
} |
### INSTRUCTION
What is the name of organization that has the greatest number of contact individuals?
### INPUT
CREATE TABLE organization_contact_individuals (organization_id VARCHAR); CREATE TABLE organizations (organization_name VARCHAR, organization_id VARCHAR)
### OUTPUT
SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id GROUP BY t1.organization_name ORDER BY COUNT(*) DESC LIMIT 1 | {
"input": "CREATE TABLE organization_contact_individuals (organization_id VARCHAR); CREATE TABLE organizations (organization_name VARCHAR, organization_id VARCHAR)",
"instruction": "What is the name of organization that has the greatest number of contact individuals?",
"output": "SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id GROUP BY t1.organization_name ORDER BY COUNT(*) DESC LIMIT 1"
} |
### INSTRUCTION
For armenia as opponent team and edition is 2009 europe/africa group iiib mention all the opponent
### INPUT
CREATE TABLE table_27877656_7 (opponent VARCHAR, edition VARCHAR, opponent_team VARCHAR)
### OUTPUT
SELECT opponent FROM table_27877656_7 WHERE edition = "2009 Europe/Africa Group IIIB" AND opponent_team = "Armenia" | {
"input": "CREATE TABLE table_27877656_7 (opponent VARCHAR, edition VARCHAR, opponent_team VARCHAR)",
"instruction": "For armenia as opponent team and edition is 2009 europe/africa group iiib mention all the opponent",
"output": "SELECT opponent FROM table_27877656_7 WHERE edition = \"2009 Europe/Africa Group IIIB\" AND opponent_team = \"Armenia\""
} |
### INSTRUCTION
Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.
### INPUT
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, id VARCHAR); CREATE TABLE employees (reports_to VARCHAR)
### OUTPUT
SELECT T2.first_name, T2.last_name, COUNT(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY COUNT(T1.reports_to) DESC LIMIT 1 | {
"input": "CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, id VARCHAR); CREATE TABLE employees (reports_to VARCHAR)",
"instruction": "Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.",
"output": "SELECT T2.first_name, T2.last_name, COUNT(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY COUNT(T1.reports_to) DESC LIMIT 1"
} |
### INSTRUCTION
If the Home team was st kilda, what was the score of the Away team they played?
### INPUT
CREATE TABLE table_name_16 (away_team VARCHAR, home_team VARCHAR)
### OUTPUT
SELECT away_team AS score FROM table_name_16 WHERE home_team = "st kilda" | {
"input": "CREATE TABLE table_name_16 (away_team VARCHAR, home_team VARCHAR)",
"instruction": "If the Home team was st kilda, what was the score of the Away team they played?",
"output": "SELECT away_team AS score FROM table_name_16 WHERE home_team = \"st kilda\""
} |
### INSTRUCTION
Find the list of cities that no customer is living in.
### INPUT
CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE addresses (city VARCHAR, address_id VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE addresses (city VARCHAR)
### OUTPUT
SELECT city FROM addresses WHERE NOT city IN (SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id) | {
"input": "CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE addresses (city VARCHAR, address_id VARCHAR); CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE addresses (city VARCHAR)",
"instruction": "Find the list of cities that no customer is living in.",
"output": "SELECT city FROM addresses WHERE NOT city IN (SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id)"
} |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.