chat_prompt
stringlengths 438
1.53k
|
|---|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17624965_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: How many seasons did \"strangled, not stirred\" air?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"no_in_season\") FROM \"table1_17624965_1\" WHERE \"title\"='\\\"Strangled, Not Stirred\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17624965_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: How many episodes did Alison Maclean direct?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"written_by\") FROM \"table1_17624965_1\" WHERE \"directed_by\"='Alison Maclean';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: Name the high points for may 29"
},
{
"role": "assistant",
"content": "SELECT \"high_points\" FROM \"playoffs\" WHERE \"date\"='May 29';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: Name the date for series 2-2"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"playoffs\" WHERE \"series\"='2-2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: Name the high assists for may 21"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"playoffs\" WHERE \"date\"='May 21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"colour_commentator_s\" text,\n \"sideline_reporters\" text,\n \"pregame_host\" text,\n \"pregame_analysts\" text\n);\n\nQuestion: How many different play-by-play announcers also had pregame analysis by Darren Flutie, Eric Tillman and Greg Frers?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"play_by_play\") FROM \"2000s\" WHERE \"pregame_analysts\"='Darren Flutie, Eric Tillman and Greg Frers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"colour_commentator_s\" text,\n \"sideline_reporters\" text,\n \"pregame_host\" text,\n \"pregame_analysts\" text\n);\n\nQuestion: Who did the play-by-play when the pregame host was Brian Williams and the sideline reporters were Steve Armitage and Brenda Irving?"
},
{
"role": "assistant",
"content": "SELECT \"play_by_play\" FROM \"2000s\" WHERE \"pregame_host\"='Brian Williams' AND \"sideline_reporters\"='Steve Armitage and Brenda Irving';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"colour_commentator_s\" text,\n \"sideline_reporters\" text,\n \"pregame_host\" text,\n \"pregame_analysts\" text\n);\n\nQuestion: Who were the pregame hosts when the sideline reporters were Steve Armitage and Brenda Irving?"
},
{
"role": "assistant",
"content": "SELECT \"pregame_host\" FROM \"2000s\" WHERE \"sideline_reporters\"='Steve Armitage and Brenda Irving';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"colour_commentator_s\" text,\n \"sideline_reporters\" text,\n \"pregame_host\" text,\n \"pregame_analysts\" text\n);\n\nQuestion: Who did pregame analysis in 2002?"
},
{
"role": "assistant",
"content": "SELECT \"pregame_analysts\" FROM \"2000s\" WHERE \"year\"=2002;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_the_most_populous_us_counties_so\" (\n \"rank\" real,\n \"county\" text,\n \"state\" text,\n \"land_area_km\" text,\n \"land_area_mi\" text,\n \"april_1_2010_census\" real,\n \"april_1_2010_density_km\" real,\n \"april_1_2010_density_mi\" real,\n \"july_1_2010_official_estimate\" real,\n \"july_1_2010_density_km\" real,\n \"july_1_2010_density_mi\" real,\n \"july_1_2011_official_estimate\" real,\n \"july_1_2011_density_km\" real,\n \"july_1_2011_density_mi\" real,\n \"mid_2010_to_mid_2011_change_absolute\" real,\n \"mid_2010_to_mid_2011_change_pct\" text,\n \"county_seat_or_courthouse\" text\n);\n\nQuestion: Name the state for lake county"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"list_of_the_most_populous_us_counties_so\" WHERE \"county\"='Lake County';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_the_most_populous_us_counties_so\" (\n \"rank\" real,\n \"county\" text,\n \"state\" text,\n \"land_area_km\" text,\n \"land_area_mi\" text,\n \"april_1_2010_census\" real,\n \"april_1_2010_density_km\" real,\n \"april_1_2010_density_mi\" real,\n \"july_1_2010_official_estimate\" real,\n \"july_1_2010_density_km\" real,\n \"july_1_2010_density_mi\" real,\n \"july_1_2011_official_estimate\" real,\n \"july_1_2011_density_km\" real,\n \"july_1_2011_density_mi\" real,\n \"mid_2010_to_mid_2011_change_absolute\" real,\n \"mid_2010_to_mid_2011_change_pct\" text,\n \"county_seat_or_courthouse\" text\n);\n\nQuestion: Name the total number of county seat or courthouse for april 1 2010 denisty is 2205"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"county_seat_or_courthouse\") FROM \"list_of_the_most_populous_us_counties_so\" WHERE \"april_1_2010_density_mi\"=2205;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_the_most_populous_us_counties_so\" (\n \"rank\" real,\n \"county\" text,\n \"state\" text,\n \"land_area_km\" text,\n \"land_area_mi\" text,\n \"april_1_2010_census\" real,\n \"april_1_2010_density_km\" real,\n \"april_1_2010_density_mi\" real,\n \"july_1_2010_official_estimate\" real,\n \"july_1_2010_density_km\" real,\n \"july_1_2010_density_mi\" real,\n \"july_1_2011_official_estimate\" real,\n \"july_1_2011_density_km\" real,\n \"july_1_2011_density_mi\" real,\n \"mid_2010_to_mid_2011_change_absolute\" real,\n \"mid_2010_to_mid_2011_change_pct\" text,\n \"county_seat_or_courthouse\" text\n);\n\nQuestion: Name the total number of states for july 1 2010 density is 1209"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"state\") FROM \"list_of_the_most_populous_us_counties_so\" WHERE \"july_1_2010_density_mi\"=1209;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semi_pro_seasons_1987_1993\" (\n \"season\" real,\n \"winners\" text,\n \"total_wins\" real,\n \"runners_up\" text,\n \"third_place\" text,\n \"number_of_clubs\" real\n);\n\nQuestion: What is the lowest season?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"season\") FROM \"semi_pro_seasons_1987_1993\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semi_pro_seasons_1987_1993\" (\n \"season\" real,\n \"winners\" text,\n \"total_wins\" real,\n \"runners_up\" text,\n \"third_place\" text,\n \"number_of_clubs\" real\n);\n\nQuestion: How many values for number of clubs have Shandong as the runner-up?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"number_of_clubs\") FROM \"semi_pro_seasons_1987_1993\" WHERE \"runners_up\"='Shandong';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semi_pro_seasons_1987_1993\" (\n \"season\" real,\n \"winners\" text,\n \"total_wins\" real,\n \"runners_up\" text,\n \"third_place\" text,\n \"number_of_clubs\" real\n);\n\nQuestion: How many total wins with Shanghai as runner-up?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total_wins\") FROM \"semi_pro_seasons_1987_1993\" WHERE \"runners_up\"='Shanghai';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Name the club for when tries for is 32"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"league_table\" WHERE \"tries_for\"='32';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Name the number of lost where tries for is 109"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lost\") FROM \"league_table\" WHERE \"tries_for\"='109';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Name the won when tries against is 72"
},
{
"role": "assistant",
"content": "SELECT \"won\" FROM \"league_table\" WHERE \"tries_against\"='72';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Name the points aginst when drawn is 1 and points is 51"
},
{
"role": "assistant",
"content": "SELECT \"points_against\" FROM \"league_table\" WHERE \"drawn\"='1' AND \"points\"='51';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17625876_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Name the original air date for number in season being 1"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_17625876_1\" WHERE \"no_in_season\"=1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many were won when 5 were lost? "
},
{
"role": "assistant",
"content": "SELECT \"won\" FROM \"league_table\" WHERE \"lost\"='5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many were drawn when 13 were lost? "
},
{
"role": "assistant",
"content": "SELECT \"drawn\" FROM \"league_table\" WHERE \"lost\"='13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many points are there for 63 tries against? "
},
{
"role": "assistant",
"content": "SELECT \"points_for\" FROM \"league_table\" WHERE \"tries_against\"='63';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is the try bonus when the tries against are 17? "
},
{
"role": "assistant",
"content": "SELECT \"try_bonus\" FROM \"league_table\" WHERE \"tries_against\"='17';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many tries for are there when 11 were won? "
},
{
"role": "assistant",
"content": "SELECT \"tries_for\" FROM \"league_table\" WHERE \"won\"='11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: How many points categories are there when the losing bonus is 2 and points for are 642?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"league_table\" WHERE \"losing_bonus\"='2' AND \"points_for\"='642';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17641206_2\" (\n \"episode\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"duration\" text,\n \"viewership\" text\n);\n\nQuestion: How many people wrote the episode that had 6.34 million viewers?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"written_by\") FROM \"table1_17641206_2\" WHERE \"viewership\"='6.34 million';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17641206_4\" (\n \"episode\" real,\n \"original_title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"duration\" text,\n \"viewership\" text\n);\n\nQuestion: What was the title of the episode with 5.04 million viewers?"
},
{
"role": "assistant",
"content": "SELECT \"original_title\" FROM \"table1_17641206_4\" WHERE \"viewership\"='5.04 million';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17641206_4\" (\n \"episode\" real,\n \"original_title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"duration\" text,\n \"viewership\" text\n);\n\nQuestion: What was the first airdate with a viewership of 4.77 million?"
},
{
"role": "assistant",
"content": "SELECT \"original_airdate\" FROM \"table1_17641206_4\" WHERE \"viewership\"='4.77 million';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17641206_4\" (\n \"episode\" real,\n \"original_title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"duration\" text,\n \"viewership\" text\n);\n\nQuestion: How many episodes of 30 minutes were written by John Sullivan?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"duration\") FROM \"table1_17641206_4\" WHERE \"written_by\"='John Sullivan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17641206_4\" (\n \"episode\" real,\n \"original_title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"duration\" text,\n \"viewership\" text\n);\n\nQuestion: Who was the director when the writer was John Sullivan?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_17641206_4\" WHERE \"written_by\"='John Sullivan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17641206_8\" (\n \"episode\" real,\n \"original_title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"duration\" text,\n \"viewership\" text\n);\n\nQuestion: What is the total length when the title is \" one man's junk \""
},
{
"role": "assistant",
"content": "SELECT COUNT(\"duration\") FROM \"table1_17641206_8\" WHERE \"original_title\"='\\\" One Man''s Junk \\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17641206_8\" (\n \"episode\" real,\n \"original_title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"duration\" text,\n \"viewership\" text\n);\n\nQuestion: What are the movies that are written and dircted by john sullivan with the airdate of 15january2009."
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_17641206_8\" WHERE \"written_by\"='John Sullivan' AND \"original_airdate\"='15January2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17641206_8\" (\n \"episode\" real,\n \"original_title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"duration\" text,\n \"viewership\" text\n);\n\nQuestion: What is the total viewership where the title is \" your cheating art \"."
},
{
"role": "assistant",
"content": "SELECT \"viewership\" FROM \"table1_17641206_8\" WHERE \"original_title\"='\\\" Your Cheating Art \\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17641206_8\" (\n \"episode\" real,\n \"original_title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text,\n \"duration\" text,\n \"viewership\" text\n);\n\nQuestion: How many episodes aired on 22january2009"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"episode\") FROM \"table1_17641206_8\" WHERE \"original_airdate\"='22January2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"country\" text,\n \"transfers_in\" real,\n \"transfers_out\" real,\n \"internal_transfers\" real,\n \"total_transfers\" real\n);\n\nQuestion: Name the least transfers out when transfers is 21"
},
{
"role": "assistant",
"content": "SELECT MIN(\"transfers_out\") FROM \"statistics\" WHERE \"total_transfers\"=21;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"country\" text,\n \"transfers_in\" real,\n \"transfers_out\" real,\n \"internal_transfers\" real,\n \"total_transfers\" real\n);\n\nQuestion: Name the least total transfers for romania"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total_transfers\") FROM \"statistics\" WHERE \"country\"='Romania';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"country\" text,\n \"transfers_in\" real,\n \"transfers_out\" real,\n \"internal_transfers\" real,\n \"total_transfers\" real\n);\n\nQuestion: Name the least internal transfers"
},
{
"role": "assistant",
"content": "SELECT MIN(\"internal_transfers\") FROM \"statistics\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"westmorland_county_new_brunswick\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" text,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: How many status are there for Moncton?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"status\") FROM \"westmorland_county_new_brunswick\" WHERE \"official_name\"='Moncton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"westmorland_county_new_brunswick\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" text,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the census ranking of the location with population of 959?"
},
{
"role": "assistant",
"content": "SELECT \"census_ranking\" FROM \"westmorland_county_new_brunswick\" WHERE \"population\"=959;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"westmorland_county_new_brunswick\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" text,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the name of the place with 582.20 square km area?"
},
{
"role": "assistant",
"content": "SELECT \"official_name\" FROM \"westmorland_county_new_brunswick\" WHERE \"area_km_2\"='582.20';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"westmorland_county_new_brunswick\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" text,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the name of the place where area is 578.28 square km?"
},
{
"role": "assistant",
"content": "SELECT \"official_name\" FROM \"westmorland_county_new_brunswick\" WHERE \"area_km_2\"='578.28';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"fin_pos\" real,\n \"car_no\" real,\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"laps_led\" real,\n \"points\" text\n);\n\nQuestion: If the points is 20, what was the team name?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"results\" WHERE \"points\"='20';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"fin_pos\" real,\n \"car_no\" real,\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"laps_led\" real,\n \"points\" text\n);\n\nQuestion: What is the time/retired if the driver is Marco Andretti?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"results\" WHERE \"driver\"='Marco Andretti';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"fin_pos\" real,\n \"car_no\" real,\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"laps_led\" real,\n \"points\" text\n);\n\nQuestion: If the laps is 191, what is the maximum laps led?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps_led\") FROM \"results\" WHERE \"laps\"=191;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"fin_pos\" real,\n \"car_no\" real,\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"laps_led\" real,\n \"points\" text\n);\n\nQuestion: What is the time/retired if the driver is Ed Carpenter?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"results\" WHERE \"driver\"='Ed Carpenter';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"fin_pos\" real,\n \"car_no\" real,\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"laps_led\" real,\n \"points\" text\n);\n\nQuestion: If the time/retired is +1 lap, what is the amount of maximum laps?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"results\" WHERE \"time_retired\"='+1 lap';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"fin_pos\" real,\n \"car_no\" real,\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"laps_led\" real,\n \"points\" text\n);\n\nQuestion: If the driver is Milka Duno, what is the name of the team?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"results\" WHERE \"driver\"='Milka Duno';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: How many stages were won by Robbie McEwen?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"stage\") FROM \"jersey_progress\" WHERE \"winner\"='Robbie McEwen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series_race_winners\" (\n \"season\" real,\n \"date\" text,\n \"winning_driver\" text,\n \"car_num\" real,\n \"sponsor\" text,\n \"make\" text,\n \"team\" text,\n \"avg_speed\" text,\n \"margin_of_victory\" text\n);\n\nQuestion: How many car numbers were listed for Rusty Wallace?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"car_num\") FROM \"nascar_sprint_cup_series_race_winners\" WHERE \"winning_driver\"='Rusty Wallace';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series_race_winners\" (\n \"season\" real,\n \"date\" text,\n \"winning_driver\" text,\n \"car_num\" real,\n \"sponsor\" text,\n \"make\" text,\n \"team\" text,\n \"avg_speed\" text,\n \"margin_of_victory\" text\n);\n\nQuestion: In what season did Rusty Wallace win?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"season\") FROM \"nascar_sprint_cup_series_race_winners\" WHERE \"winning_driver\"='Rusty Wallace';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series_race_winners\" (\n \"season\" real,\n \"date\" text,\n \"winning_driver\" text,\n \"car_num\" real,\n \"sponsor\" text,\n \"make\" text,\n \"team\" text,\n \"avg_speed\" text,\n \"margin_of_victory\" text\n);\n\nQuestion: What was the represented team on June 27?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"nascar_sprint_cup_series_race_winners\" WHERE \"date\"='June 27';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series_race_winners\" (\n \"season\" real,\n \"date\" text,\n \"winning_driver\" text,\n \"car_num\" real,\n \"sponsor\" text,\n \"make\" text,\n \"team\" text,\n \"avg_speed\" text,\n \"margin_of_victory\" text\n);\n\nQuestion: Who was the winning driver for Hendrick Motorsports in a Chevrolet Impala SS?"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"nascar_sprint_cup_series_race_winners\" WHERE \"team\"='Hendrick Motorsports' AND \"make\"='Chevrolet Impala SS';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: When 45 is the goals for and 10 is the drawn what is the lost?"
},
{
"role": "assistant",
"content": "SELECT \"lost\" FROM \"second_division_final_table\" WHERE \"drawn\"=10 AND \"goals_for\"=45;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: When +10 is the goal difference what is the goals for?"
},
{
"role": "assistant",
"content": "SELECT \"goals_for\" FROM \"second_division_final_table\" WHERE \"goal_difference\"='+10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"won\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: When ellesmere port & neston is the team what are the points 1?"
},
{
"role": "assistant",
"content": "SELECT \"points_1\" FROM \"second_division_final_table\" WHERE \"team\"='Ellesmere Port & Neston';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1771753_3\" (\n \"season\" text,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text,\n \"report\" text\n);\n\nQuestion: When 2005 is the season how many drivers are there?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"driver\") FROM \"table1_1771753_3\" WHERE \"season\"='2005';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1771753_3\" (\n \"season\" text,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text,\n \"report\" text\n);\n\nQuestion: When tony kanaan is the driver what is the average speed miles per hour?"
},
{
"role": "assistant",
"content": "SELECT \"average_speed_mph\" FROM \"table1_1771753_3\" WHERE \"driver\"='Tony Kanaan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1771753_3\" (\n \"season\" text,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text,\n \"report\" text\n);\n\nQuestion: When 169.182 is the average speed miles per hour what is the chassis?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"table1_1771753_3\" WHERE \"average_speed_mph\"='169.182';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1771753_3\" (\n \"season\" text,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text,\n \"report\" text\n);\n\nQuestion: When 1:34:01 is the race time what is the miles in kilometers?"
},
{
"role": "assistant",
"content": "SELECT \"miles_km\" FROM \"table1_1771753_3\" WHERE \"race_time\"='1:34:01';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1771753_3\" (\n \"season\" text,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text,\n \"report\" text\n);\n\nQuestion: When 228 is the lap and chip ganassi racing is the team what is the race time?"
},
{
"role": "assistant",
"content": "SELECT \"race_time\" FROM \"table1_1771753_3\" WHERE \"team\"='Chip Ganassi Racing' AND \"laps\"='228';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17736890_5\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: What tie number featured Chelsea as the home team?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"tie_no\") FROM \"table1_17736890_5\" WHERE \"home_team\"='Chelsea';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17736890_5\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: In what tie were Leeds United the away team?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"tie_no\") FROM \"table1_17736890_5\" WHERE \"away_team\"='Leeds United';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17736890_5\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: Who was the home team when Burnley were the away team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"table1_17736890_5\" WHERE \"away_team\"='Burnley';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_10_4_titles_6_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: what is the lowest year represented?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"women_s_doubles_10_4_titles_6_runner_ups\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_10_4_titles_6_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the score when Fran\u00e7oise D\u00fcrr was partner?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"women_s_doubles_10_4_titles_6_runner_ups\" WHERE \"partner\"='Fran\u00e7oise D\u00fcrr';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_10_4_titles_6_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome in 1975?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"women_s_doubles_10_4_titles_6_runner_ups\" WHERE \"year\"=1975;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_10_4_titles_6_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: On what surface was the game played with a score of 6\u20134, 6\u20134?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"women_s_doubles_10_4_titles_6_runner_ups\" WHERE \"score\"='6\u20134, 6\u20134';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"active_teams\" (\n \"tournament_appearances\" real,\n \"team\" text,\n \"league\" text,\n \"wins\" real,\n \"final_losses\" real,\n \"semi_final_losses\" real,\n \"fourth_place\" real,\n \"final_win_pct\" text,\n \"years_of_appearance\" text\n);\n\nQuestion: What is the year of appearance for the Prince Albert Raiders? "
},
{
"role": "assistant",
"content": "SELECT \"years_of_appearance\" FROM \"active_teams\" WHERE \"team\"='Prince Albert Raiders';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"active_teams\" (\n \"tournament_appearances\" real,\n \"team\" text,\n \"league\" text,\n \"wins\" real,\n \"final_losses\" real,\n \"semi_final_losses\" real,\n \"fourth_place\" real,\n \"final_win_pct\" text,\n \"years_of_appearance\" text\n);\n\nQuestion: How many wins do the Erie Otters have? "
},
{
"role": "assistant",
"content": "SELECT \"wins\" FROM \"active_teams\" WHERE \"team\"='Erie Otters';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"active_teams\" (\n \"tournament_appearances\" real,\n \"team\" text,\n \"league\" text,\n \"wins\" real,\n \"final_losses\" real,\n \"semi_final_losses\" real,\n \"fourth_place\" real,\n \"final_win_pct\" text,\n \"years_of_appearance\" text\n);\n\nQuestion: What is the final win percentage of the Sault Ste. Marie Greyhounds? "
},
{
"role": "assistant",
"content": "SELECT \"final_win_pct\" FROM \"active_teams\" WHERE \"team\"='Sault Ste. Marie Greyhounds';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"active_teams\" (\n \"tournament_appearances\" real,\n \"team\" text,\n \"league\" text,\n \"wins\" real,\n \"final_losses\" real,\n \"semi_final_losses\" real,\n \"fourth_place\" real,\n \"final_win_pct\" text,\n \"years_of_appearance\" text\n);\n\nQuestion: What is the total number of semi-final losses for the Kitchener Rangers? "
},
{
"role": "assistant",
"content": "SELECT MAX(\"semi_final_losses\") FROM \"active_teams\" WHERE \"team\"='Kitchener Rangers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"active_teams\" (\n \"tournament_appearances\" real,\n \"team\" text,\n \"league\" text,\n \"wins\" real,\n \"final_losses\" real,\n \"semi_final_losses\" real,\n \"fourth_place\" real,\n \"final_win_pct\" text,\n \"years_of_appearance\" text\n);\n\nQuestion: How many wins do the Red Deer Rebels have? "
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"active_teams\" WHERE \"team\"='Red Deer Rebels';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the record for November 26, 1961?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"date\"='November 26, 1961';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What was the game site against the Dallas Texans?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"regular_season\" WHERE \"opponent\"='Dallas Texans';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"commentators_and_spokespersons\" (\n \"year_s\" real,\n \"final_television_commentator\" text,\n \"radio_commentator\" text,\n \"spokesperson\" text,\n \"semi_final_television_commentator\" text,\n \"semi_final_second_television_commentator\" text\n);\n\nQuestion: In how many years was Tom Fleming the final television commentator? "
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year_s\") FROM \"commentators_and_spokespersons\" WHERE \"final_television_commentator\"='Tom Fleming';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"commentators_and_spokespersons\" (\n \"year_s\" real,\n \"final_television_commentator\" text,\n \"radio_commentator\" text,\n \"spokesperson\" text,\n \"semi_final_television_commentator\" text,\n \"semi_final_second_television_commentator\" text\n);\n\nQuestion: What was the latest year that Colin Berry was the spokesperson? "
},
{
"role": "assistant",
"content": "SELECT MAX(\"year_s\") FROM \"commentators_and_spokespersons\" WHERE \"spokesperson\"='Colin Berry';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"commentators_and_spokespersons\" (\n \"year_s\" real,\n \"final_television_commentator\" text,\n \"radio_commentator\" text,\n \"spokesperson\" text,\n \"semi_final_television_commentator\" text,\n \"semi_final_second_television_commentator\" text\n);\n\nQuestion: Who was the semi-final television commentator when the spokesperson was Colin Berry and the final television commentator was Pete Murray?"
},
{
"role": "assistant",
"content": "SELECT \"semi_final_television_commentator\" FROM \"commentators_and_spokespersons\" WHERE \"spokesperson\"='Colin Berry' AND \"final_television_commentator\"='Pete Murray';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"commentators_and_spokespersons\" (\n \"year_s\" real,\n \"final_television_commentator\" text,\n \"radio_commentator\" text,\n \"spokesperson\" text,\n \"semi_final_television_commentator\" text,\n \"semi_final_second_television_commentator\" text\n);\n\nQuestion: Who was the radio commentator when the final television commentator was John Dunn? "
},
{
"role": "assistant",
"content": "SELECT \"radio_commentator\" FROM \"commentators_and_spokespersons\" WHERE \"final_television_commentator\"='John Dunn';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"commentators_and_spokespersons\" (\n \"year_s\" real,\n \"final_television_commentator\" text,\n \"radio_commentator\" text,\n \"spokesperson\" text,\n \"semi_final_television_commentator\" text,\n \"semi_final_second_television_commentator\" text\n);\n\nQuestion: What is the latest year that the final television commentator was David Jacobs? "
},
{
"role": "assistant",
"content": "SELECT MAX(\"year_s\") FROM \"commentators_and_spokespersons\" WHERE \"final_television_commentator\"='David Jacobs';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What was their record when the attendance at the game was 14489?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"attendance\"=14489;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: When did they play at the Cotton Bowl?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"regular_season\" WHERE \"game_site\"='Cotton Bowl';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"rank\" real,\n \"family\" text,\n \"abbre_viation\" text,\n \"constellation\" text,\n \"area_sq_deg\" text,\n \"area_msr\" text,\n \"per_cent_age\" text,\n \"right_ascension_hm\" text,\n \"decli_nation_dm\" text,\n \"quad\" text\n);\n\nQuestion: What is the percentage of this constellation abbreviated as 'nor'?"
},
{
"role": "assistant",
"content": "SELECT \"per_cent_age\" FROM \"external_links\" WHERE \"abbre_viation\"='Nor';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"rank\" real,\n \"family\" text,\n \"abbre_viation\" text,\n \"constellation\" text,\n \"area_sq_deg\" text,\n \"area_msr\" text,\n \"per_cent_age\" text,\n \"right_ascension_hm\" text,\n \"decli_nation_dm\" text,\n \"quad\" text\n);\n\nQuestion: This constellation, abbreviated as 'oph' has how many right ascension (in hm)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"right_ascension_hm\") FROM \"external_links\" WHERE \"abbre_viation\"='Oph';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"rank\" real,\n \"family\" text,\n \"abbre_viation\" text,\n \"constellation\" text,\n \"area_sq_deg\" text,\n \"area_msr\" text,\n \"per_cent_age\" text,\n \"right_ascension_hm\" text,\n \"decli_nation_dm\" text,\n \"quad\" text\n);\n\nQuestion: What is the name of this constellation with an area of 245.375 sq. deg.?"
},
{
"role": "assistant",
"content": "SELECT \"constellation\" FROM \"external_links\" WHERE \"area_sq_deg\"='245.375';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"rank\" real,\n \"family\" text,\n \"abbre_viation\" text,\n \"constellation\" text,\n \"area_sq_deg\" text,\n \"area_msr\" text,\n \"per_cent_age\" text,\n \"right_ascension_hm\" text,\n \"decli_nation_dm\" text,\n \"quad\" text\n);\n\nQuestion: This constellation with a ranking of 51 has how many percentages on record?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"per_cent_age\") FROM \"external_links\" WHERE \"rank\"=51;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"rank\" real,\n \"family\" text,\n \"abbre_viation\" text,\n \"constellation\" text,\n \"area_sq_deg\" text,\n \"area_msr\" text,\n \"per_cent_age\" text,\n \"right_ascension_hm\" text,\n \"decli_nation_dm\" text,\n \"quad\" text\n);\n\nQuestion: What is the percentage of this constellation with an area of 248.885 sq. deg.?"
},
{
"role": "assistant",
"content": "SELECT \"per_cent_age\" FROM \"external_links\" WHERE \"area_sq_deg\"='248.885';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1776943_1\" (\n \"episode\" text,\n \"broadcast_date\" text,\n \"run_time\" text,\n \"viewers_in_millions\" text,\n \"archive\" text\n);\n\nQuestion: Name the broadcast date for 6.4 million viewers for the archive of 16mm t/r"
},
{
"role": "assistant",
"content": "SELECT \"broadcast_date\" FROM \"table1_1776943_1\" WHERE \"viewers_in_millions\"='6.4' AND \"archive\"='16mm t/r';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_1776943_1\" (\n \"episode\" text,\n \"broadcast_date\" text,\n \"run_time\" text,\n \"viewers_in_millions\" text,\n \"archive\" text\n);\n\nQuestion: Name the archive where run time 24:04"
},
{
"role": "assistant",
"content": "SELECT \"archive\" FROM \"table1_1776943_1\" WHERE \"run_time\"='24:04';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: On November 1, 1964, where was the game site?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"regular_season\" WHERE \"date\"='November 1, 1964';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: How many people attended the Week 8 game when Denver played Buffalo?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"regular_season\" WHERE \"week\"=8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: How many times did the Denver Broncos face the Dallas Texans this season?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"record\") FROM \"regular_season\" WHERE \"opponent\"='Dallas Texans';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17801022_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text\n);\n\nQuestion: What year was the winning race time 1:55:13?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"table1_17801022_1\" WHERE \"race_time\"='1:55:13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17801022_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text\n);\n\nQuestion: For races with an average speed of 113.835 mph, what are the winning race times?"
},
{
"role": "assistant",
"content": "SELECT \"race_time\" FROM \"table1_17801022_1\" WHERE \"average_speed_mph\"='113.835';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17801022_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text\n);\n\nQuestion: What manufacturer won the race on November 2?"
},
{
"role": "assistant",
"content": "SELECT \"manufacturer\" FROM \"table1_17801022_1\" WHERE \"date\"='November 2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17801022_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text\n);\n\nQuestion: What date did Jamie McMurray win the race?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"table1_17801022_1\" WHERE \"driver\"='Jamie McMurray';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17801022_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text\n);\n\nQuestion: What was the date of the race with a winning time of 1:55:13?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"table1_17801022_1\" WHERE \"race_time\"='1:55:13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17802778_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text\n);\n\nQuestion: What team(s) enjoyed an average spped (mph) of 138.14?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"table1_17802778_1\" WHERE \"average_speed_mph\"='138.14';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17802778_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text\n);\n\nQuestion: How many laps recorded in 2001?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"table1_17802778_1\" WHERE \"year\"=2001;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_17802778_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text\n);\n\nQuestion: What team(s) were in 2003?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"table1_17802778_1\" WHERE \"year\"=2003;"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.