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 \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the date of the game that tied at 3?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fifth_round_proper\" WHERE \"tie_no\"='3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"games\" (\n \"series\" text,\n \"platform\" text,\n \"japanese_release_date\" text,\n \"north_american_release_date\" text,\n \"european_release_date\" text,\n \"australia_release_date\" text\n);\n\nQuestion: What is European Release Date, when North American Release Date is \"2013-03-05\"?"
},
{
"role": "assistant",
"content": "SELECT \"european_release_date\" FROM \"games\" WHERE \"north_american_release_date\"='2013-03-05';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"games\" (\n \"series\" text,\n \"platform\" text,\n \"japanese_release_date\" text,\n \"north_american_release_date\" text,\n \"european_release_date\" text,\n \"australia_release_date\" text\n);\n\nQuestion: What is Japanese Release Date, when Australia Release Date is \"2006-03-23\"?"
},
{
"role": "assistant",
"content": "SELECT \"japanese_release_date\" FROM \"games\" WHERE \"australia_release_date\"='2006-03-23';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"games\" (\n \"series\" text,\n \"platform\" text,\n \"japanese_release_date\" text,\n \"north_american_release_date\" text,\n \"european_release_date\" text,\n \"australia_release_date\" text\n);\n\nQuestion: What is North American Release Date, when Japanese Release Date is \"2011-06-23\"?"
},
{
"role": "assistant",
"content": "SELECT \"north_american_release_date\" FROM \"games\" WHERE \"japanese_release_date\"='2011-06-23';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the goal difference when there are fewer than 12 wins, 32 goals against and 8 draws?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"goal_difference\") FROM \"group_ii\" WHERE \"draws\"=8 AND \"goals_against\"=32 AND \"wins\"<12;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_ii\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What's the lowest goal difference when the position is higher than 16?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goal_difference\") FROM \"group_ii\" WHERE \"position\">16;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1997\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Which venue was the opposing team New Zealand on 22/11/1997?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"1997\" WHERE \"opposing_teams\"='new zealand' AND \"date\"='22/11/1997';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1997\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What day was the opposing team Australia and the against 25?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1997\" WHERE \"against\"=25 AND \"opposing_teams\"='australia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1997\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What was the status for the opposing team South Africa?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"1997\" WHERE \"opposing_teams\"='south africa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the League Goals when the FA Cup Goals are 0, position is mf, League Cup Apps of 0, and name is Ben Thornley?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"league_goals\") FROM \"appearances_and_goals\" WHERE \"fa_cup_goals\"=0 AND \"position\"='mf' AND \"league_cup_apps\"='0' AND \"name\"='ben thornley';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the Total Apps when League Cup Apps is 0 (1), and position is df?"
},
{
"role": "assistant",
"content": "SELECT \"total_apps\" FROM \"appearances_and_goals\" WHERE \"league_cup_apps\"='0 (1)' AND \"position\"='df';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" text,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What is the total goals for Mark Ward?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total_goals\") FROM \"appearances_and_goals\" WHERE \"name\"='mark ward';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"name\" text,\n \"residence\" text,\n \"party\" text,\n \"years_in_assembly\" text,\n \"years_in_senate\" text\n);\n\nQuestion: What is the political party of Jackie Goldberg?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"former_members\" WHERE \"name\"='jackie goldberg';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"name\" text,\n \"residence\" text,\n \"party\" text,\n \"years_in_assembly\" text,\n \"years_in_senate\" text\n);\n\nQuestion: During what years was Christine Kehoe in Assembly?"
},
{
"role": "assistant",
"content": "SELECT \"years_in_assembly\" FROM \"former_members\" WHERE \"name\"='christine kehoe';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"name\" text,\n \"residence\" text,\n \"party\" text,\n \"years_in_assembly\" text,\n \"years_in_senate\" text\n);\n\nQuestion: What were the San Francisco resident's years in assembly?"
},
{
"role": "assistant",
"content": "SELECT \"years_in_assembly\" FROM \"former_members\" WHERE \"residence\"='san francisco';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"name\" text,\n \"residence\" text,\n \"party\" text,\n \"years_in_assembly\" text,\n \"years_in_senate\" text\n);\n\nQuestion: What political party does the person from San Diego belong to?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"former_members\" WHERE \"residence\"='san diego';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1988\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Which Opposing Teams is on 06/02/1988?"
},
{
"role": "assistant",
"content": "SELECT \"opposing_teams\" FROM \"1988\" WHERE \"date\"='06/02/1988';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1988\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: When Status of five nations, and a Venue of twickenham , london, and a Opposing Teams of ireland are in?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1988\" WHERE \"status\"='five nations' AND \"venue\"='twickenham , london' AND \"opposing_teams\"='ireland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_and_friendlies\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What's the attendance when the opponents are cambridge united?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"pre_season_and_friendlies\" WHERE \"opponents\"='cambridge united';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_and_friendlies\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What's the average attendance when the opponents are dundalk?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"pre_season_and_friendlies\" WHERE \"opponents\"='dundalk';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_and_friendlies\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What's the total attendance for H/A of A and opponents of wolverhampton wanderers?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"pre_season_and_friendlies\" WHERE \"h_a\"='a' AND \"opponents\"='wolverhampton wanderers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Total has a Gold smaller than 4?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"gold\"<4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Rank has a Nation of china (chn), and a Bronze smaller than 4?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"medal_table\" WHERE \"nation\"='china (chn)' AND \"bronze\"<4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How much Total has a Bronze smaller than 13, and a Nation of netherlands (ned), and a Gold larger than 4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"medal_table\" WHERE \"bronze\"<13 AND \"nation\"='netherlands (ned)' AND \"gold\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a\" (\n \"school\" text,\n \"suburb_town\" text,\n \"years\" text,\n \"founded\" real,\n \"website\" text\n);\n\nQuestion: Which website was founded before 1897, and is located in Adaminaby?"
},
{
"role": "assistant",
"content": "SELECT \"website\" FROM \"a\" WHERE \"founded\"<1897 AND \"suburb_town\"='adaminaby';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a\" (\n \"school\" text,\n \"suburb_town\" text,\n \"years\" text,\n \"founded\" real,\n \"website\" text\n);\n\nQuestion: Which website is located in Albury and has a school of Albury High School?"
},
{
"role": "assistant",
"content": "SELECT \"website\" FROM \"a\" WHERE \"suburb_town\"='albury' AND \"school\"='albury high school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a\" (\n \"school\" text,\n \"suburb_town\" text,\n \"years\" text,\n \"founded\" real,\n \"website\" text\n);\n\nQuestion: What is the average year founded that is located in Broken Hill and has school years of k-6?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"founded\") FROM \"a\" WHERE \"years\"='k-6' AND \"suburb_town\"='broken hill';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a\" (\n \"school\" text,\n \"suburb_town\" text,\n \"years\" text,\n \"founded\" real,\n \"website\" text\n);\n\nQuestion: What suburb/town has school years of k-6, was founded before 1875, and has Ashfield Public School as its school?"
},
{
"role": "assistant",
"content": "SELECT \"suburb_town\" FROM \"a\" WHERE \"years\"='k-6' AND \"founded\"<1875 AND \"school\"='ashfield public school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a\" (\n \"school\" text,\n \"suburb_town\" text,\n \"years\" text,\n \"founded\" real,\n \"website\" text\n);\n\nQuestion: What is the year Airds High School was founded?"
},
{
"role": "assistant",
"content": "SELECT \"founded\" FROM \"a\" WHERE \"school\"='airds high school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a\" (\n \"school\" text,\n \"suburb_town\" text,\n \"years\" text,\n \"founded\" real,\n \"website\" text\n);\n\nQuestion: Which website has 1921 as the year founded?"
},
{
"role": "assistant",
"content": "SELECT \"website\" FROM \"a\" WHERE \"founded\"=1921;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualification\" (\n \"shooter\" text,\n \"event\" text,\n \"rank_points\" text,\n \"score_points\" text,\n \"total\" text\n);\n\nQuestion: What Score points has a Rank points of defending champion?"
},
{
"role": "assistant",
"content": "SELECT \"score_points\" FROM \"qualification\" WHERE \"rank_points\"='defending champion';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualification\" (\n \"shooter\" text,\n \"event\" text,\n \"rank_points\" text,\n \"score_points\" text,\n \"total\" text\n);\n\nQuestion: What Rank points has an Event of wc beijing, and Score points of 11?"
},
{
"role": "assistant",
"content": "SELECT \"rank_points\" FROM \"qualification\" WHERE \"event\"='wc beijing' AND \"score_points\"='11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualification\" (\n \"shooter\" text,\n \"event\" text,\n \"rank_points\" text,\n \"score_points\" text,\n \"total\" text\n);\n\nQuestion: What Shooter has a Total of 28?"
},
{
"role": "assistant",
"content": "SELECT \"shooter\" FROM \"qualification\" WHERE \"total\"='28';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualification\" (\n \"shooter\" text,\n \"event\" text,\n \"rank_points\" text,\n \"score_points\" text,\n \"total\" text\n);\n\nQuestion: What Shooter has an Event of wc beijing, a Total of 16, and Rank points of 4?"
},
{
"role": "assistant",
"content": "SELECT \"shooter\" FROM \"qualification\" WHERE \"event\"='wc beijing' AND \"total\"='16' AND \"rank_points\"='4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1982\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the average against of Murrayfield, Edinburgh?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"against\") FROM \"1982\" WHERE \"venue\"='murrayfield, edinburgh';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1982\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the status of the Wales opposing team?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"1982\" WHERE \"opposing_teams\"='wales';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1982\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What date has an against of 7?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1982\" WHERE \"against\"=7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"new_york\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What District was Incumbent Steve Israel First elected after 1998 in the Democratic party?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"new_york\" WHERE \"first_elected\">1998 AND \"party\"='democratic' AND \"incumbent\"='steve israel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"new_york\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What are the results of a first elected prior to year 1982?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"new_york\" WHERE \"first_elected\"<1982;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"new_york\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: Who is the Incumbent of the Democratic Party at an election after 1992 in the New York 1 District who was Re-elected?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"new_york\" WHERE \"party\"='democratic' AND \"results\"='re-elected' AND \"first_elected\">1992 AND \"district\"='new york 1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is Gene Sauers' to par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"player\"='gene sauers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Where is john daly of united states from?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"first_round\" WHERE \"country\"='united states' AND \"player\"='john daly';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"largest_cities_and_metropolitan_areas\" (\n \"rank\" real,\n \"city\" text,\n \"state\" text,\n \"population\" real,\n \"metro_population_of_4_aspects\" real\n);\n\nQuestion: What is the average rank of the city of el paso, which has a population greater than 672,538?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"largest_cities_and_metropolitan_areas\" WHERE \"city\"='el paso' AND \"population\">'672,538';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"largest_cities_and_metropolitan_areas\" (\n \"rank\" real,\n \"city\" text,\n \"state\" text,\n \"population\" real,\n \"metro_population_of_4_aspects\" real\n);\n\nQuestion: What is the state of the city of denver, which has a rank less than 10?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"largest_cities_and_metropolitan_areas\" WHERE \"rank\"<10 AND \"city\"='denver';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"boxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What is the result when the round is less than 3, the location is in Auckland, New Zealand, and tko is the method?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"boxing_record\" WHERE \"round\"<3 AND \"location\"='auckland, new zealand' AND \"method\"='tko';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"boxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What is the smallest round to have a record of 4-0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"boxing_record\" WHERE \"record\"='4-0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"boxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What is the result of a round greater than 3?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"boxing_record\" WHERE \"round\">3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"boxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: Which event has Toa Naketoatama as an opponent?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"boxing_record\" WHERE \"opponent\"='toa naketoatama';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"europe\" (\n \"perpetrator\" text,\n \"date\" text,\n \"year\" real,\n \"location\" text,\n \"country\" text,\n \"killed\" real,\n \"injured\" text\n);\n\nQuestion: How many kills have 15 as the injured, with a year prior to 1987?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"killed\") FROM \"europe\" WHERE \"injured\"='15' AND \"year\"<1987;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is Date, when Opposing Teams is \"South Africa\", and when Venus is \"Vodacom Park , Bloemfontein\"?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2007\" WHERE \"opposing_teams\"='south africa' AND \"venue\"='vodacom park , bloemfontein';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the average Against, when Status is \"2007 Rugby World Cup\", and when Opposing Teams is \"U.S.A.\"?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"against\") FROM \"2007\" WHERE \"status\"='2007 rugby world cup' AND \"opposing_teams\"='u.s.a.';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is Venue, when Status is \"2007 Rugby World Cup\", when Against is less than 22, and when Date is \"08/09/2007\"?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"2007\" WHERE \"status\"='2007 rugby world cup' AND \"against\"<22 AND \"date\"='08/09/2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the lowest Against, when Status is \"First Test\", and when Date is \"26/05/2007\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"against\") FROM \"2007\" WHERE \"status\"='first test' AND \"date\"='26/05/2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is Opposing Teams, when Against is \"20\", and when Venue is \"Twickenham , London\"?"
},
{
"role": "assistant",
"content": "SELECT \"opposing_teams\" FROM \"2007\" WHERE \"against\"=20 AND \"venue\"='twickenham , london';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"location\" text\n);\n\nQuestion: What is the record when Danilo Pereira was the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='danilo pereira';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"location\" text\n);\n\nQuestion: Which event had Edson Claas Vieira as an opponent?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='edson claas vieira';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"location\" text\n);\n\nQuestion: Which method was used when Rafael Cavalcante was the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='rafael cavalcante';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"location\" text\n);\n\nQuestion: Which method was used when Alessio Sakara was the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='alessio sakara';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"location\" text\n);\n\nQuestion: Who is the opponent when the record is 3-8?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='3-8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"25_largest_local_government_areas_by_pop\" (\n \"rank\" real,\n \"local_government_area\" text,\n \"population_2006_census\" real,\n \"population_2007_estimate\" real,\n \"growth_rate\" text,\n \"stat_division_district\" text\n);\n\nQuestion: What was the 2006 population for the local government area of alexandrina council whose rank was smaller than 19?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"population_2006_census\") FROM \"25_largest_local_government_areas_by_pop\" WHERE \"local_government_area\"='alexandrina council' AND \"rank\"<19;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparative_properties_of_common_cooking\" (\n \"total_fat\" text,\n \"saturated_fat\" text,\n \"monounsaturated_fat\" text,\n \"polyunsaturated_fat\" text,\n \"smoke_point\" text\n);\n\nQuestion: What is the total fat with a smoke point of \u00b0c (), 25g of saturated fat?"
},
{
"role": "assistant",
"content": "SELECT \"total_fat\" FROM \"comparative_properties_of_common_cooking\" WHERE \"smoke_point\"='\u00b0c ()' AND \"saturated_fat\"='25g';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparative_properties_of_common_cooking\" (\n \"total_fat\" text,\n \"saturated_fat\" text,\n \"monounsaturated_fat\" text,\n \"polyunsaturated_fat\" text,\n \"smoke_point\" text\n);\n\nQuestion: What is the total fat when the polyunsaturated fat is 11g, and Monounsaturated fat is 73g?"
},
{
"role": "assistant",
"content": "SELECT \"total_fat\" FROM \"comparative_properties_of_common_cooking\" WHERE \"polyunsaturated_fat\"='11g' AND \"monounsaturated_fat\"='73g';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparative_properties_of_common_cooking\" (\n \"total_fat\" text,\n \"saturated_fat\" text,\n \"monounsaturated_fat\" text,\n \"polyunsaturated_fat\" text,\n \"smoke_point\" text\n);\n\nQuestion: What is the smoke point with a total fat of 100g, and monounsaturated fat of 46g?"
},
{
"role": "assistant",
"content": "SELECT \"smoke_point\" FROM \"comparative_properties_of_common_cooking\" WHERE \"total_fat\"='100g' AND \"monounsaturated_fat\"='46g';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparative_properties_of_common_cooking\" (\n \"total_fat\" text,\n \"saturated_fat\" text,\n \"monounsaturated_fat\" text,\n \"polyunsaturated_fat\" text,\n \"smoke_point\" text\n);\n\nQuestion: What shows for monounsaturated fat when the saturated fat is 39g?"
},
{
"role": "assistant",
"content": "SELECT \"monounsaturated_fat\" FROM \"comparative_properties_of_common_cooking\" WHERE \"saturated_fat\"='39g';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparative_properties_of_common_cooking\" (\n \"total_fat\" text,\n \"saturated_fat\" text,\n \"monounsaturated_fat\" text,\n \"polyunsaturated_fat\" text,\n \"smoke_point\" text\n);\n\nQuestion: What is the smoke point when the polyunsaturated fat is 69g (4g in high oleic variety)?"
},
{
"role": "assistant",
"content": "SELECT \"smoke_point\" FROM \"comparative_properties_of_common_cooking\" WHERE \"polyunsaturated_fat\"='69g (4g in high oleic variety)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparative_properties_of_common_cooking\" (\n \"total_fat\" text,\n \"saturated_fat\" text,\n \"monounsaturated_fat\" text,\n \"polyunsaturated_fat\" text,\n \"smoke_point\" text\n);\n\nQuestion: What is the saturated fat when the total fat is 100g, and polyunsaturated fat is 69g (4g in high oleic variety)?"
},
{
"role": "assistant",
"content": "SELECT \"saturated_fat\" FROM \"comparative_properties_of_common_cooking\" WHERE \"total_fat\"='100g' AND \"polyunsaturated_fat\"='69g (4g in high oleic variety)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sixth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the Tie No with a Score of 2\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"sixth_round_proper\" WHERE \"score\"='2\u20132';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sixth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the Date of the Crystal Palace Away game?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"sixth_round_proper\" WHERE \"away_team\"='crystal palace';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sixth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the Home team of Tie no 2?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"sixth_round_proper\" WHERE \"tie_no\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sixth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the Home team of tie no 2?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"sixth_round_proper\" WHERE \"tie_no\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_2_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the average Grid, when Laps is less than 24, when Bike is \"Honda CBR1000RR\", and when Rider is \"Jason Pridmore\"?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"grid\") FROM \"superbike_race_2_classification\" WHERE \"laps\"<24 AND \"bike\"='honda cbr1000rr' AND \"rider\"='jason pridmore';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_2_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the highest Laps, when Bike is \"Yamaha YZF-R1\", when Rider is \"David Checa\", and when Grid is greater than 18?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"superbike_race_2_classification\" WHERE \"bike\"='yamaha yzf-r1' AND \"rider\"='david checa' AND \"grid\">18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_2_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the sum of Grid, when Time is \"+16.687\"?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"superbike_race_2_classification\" WHERE \"time\"='+16.687';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_2_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the total number of Grid, when Laps is greater than 24?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"superbike_race_2_classification\" WHERE \"laps\">24;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"season\" real,\n \"year\" real,\n \"mole\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"total_prize_money\" text,\n \"potential_prize_money\" text,\n \"destination\" text\n);\n\nQuestion: Who was the runner-up after season 2 when the total prize money was $108,000?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"australia\" WHERE \"season\">2 AND \"total_prize_money\"='$108,000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"season\" real,\n \"year\" real,\n \"mole\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"total_prize_money\" text,\n \"potential_prize_money\" text,\n \"destination\" text\n);\n\nQuestion: What was the highest season number with a total prize of $108,000?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"season\") FROM \"australia\" WHERE \"total_prize_money\"='$108,000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"season\" real,\n \"year\" real,\n \"mole\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"total_prize_money\" text,\n \"potential_prize_money\" text,\n \"destination\" text\n);\n\nQuestion: What is the earliest season where Aisha Jefcoate was the runner-up?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"season\") FROM \"australia\" WHERE \"runner_up\"='aisha jefcoate';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"australia\" (\n \"season\" real,\n \"year\" real,\n \"mole\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"total_prize_money\" text,\n \"potential_prize_money\" text,\n \"destination\" text\n);\n\nQuestion: When the Mole was Petrina Edge, what was the potential prize money?"
},
{
"role": "assistant",
"content": "SELECT \"potential_prize_money\" FROM \"australia\" WHERE \"mole\"='petrina edge';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"show\" text,\n \"date\" text,\n \"official_ratings_millions\" real,\n \"weekly_rank\" text,\n \"share\" text\n);\n\nQuestion: Which Share has a weekly Rank of 8 and is dated 15 June?"
},
{
"role": "assistant",
"content": "SELECT \"share\" FROM \"ratings\" WHERE \"weekly_rank\"='8' AND \"date\"='15 june';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"show\" text,\n \"date\" text,\n \"official_ratings_millions\" real,\n \"weekly_rank\" text,\n \"share\" text\n);\n\nQuestion: Which Weekly Rank has an Official ratings (millions) of 11.58?"
},
{
"role": "assistant",
"content": "SELECT \"weekly_rank\" FROM \"ratings\" WHERE \"official_ratings_millions\"=11.58;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"show\" text,\n \"date\" text,\n \"official_ratings_millions\" real,\n \"weekly_rank\" text,\n \"share\" text\n);\n\nQuestion: Which Show is dated 9 June?"
},
{
"role": "assistant",
"content": "SELECT \"show\" FROM \"ratings\" WHERE \"date\"='9 june';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"show\" text,\n \"date\" text,\n \"official_ratings_millions\" real,\n \"weekly_rank\" text,\n \"share\" text\n);\n\nQuestion: Which Weekly Rank for a Live Final Show has an Official Ratings (millions) greater than 5.2?"
},
{
"role": "assistant",
"content": "SELECT \"weekly_rank\" FROM \"ratings\" WHERE \"official_ratings_millions\">5.2 AND \"show\"='live final';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1948\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the status with the opposing team of Scotland?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"1948\" WHERE \"opposing_teams\"='scotland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1948\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the lowest against score for Twickenham, London with the status of Five Nations against Ireland?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"against\") FROM \"1948\" WHERE \"venue\"='twickenham, london' AND \"status\"='five nations' AND \"opposing_teams\"='ireland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1992\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Which Venue has a Against smaller than 7?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"1992\" WHERE \"against\"<7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1992\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: When has a Status of five nations, and a Against of 7?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1992\" WHERE \"status\"='five nations' AND \"against\"=7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1992\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Which Venue has a Against larger than 13?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"1992\" WHERE \"against\">13;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1992\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Name the Against which has a Venue of wembley stadium , london?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"against\") FROM \"1992\" WHERE \"venue\"='wembley stadium , london';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_ladder_1999\" (\n \"club\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"against\" real\n);\n\nQuestion: Which wins have less than 1 bye?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"first_ladder_1999\" WHERE \"byes\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_ladder_1999\" (\n \"club\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"against\" real\n);\n\nQuestion: Which Against has Losses larger than 10, and Wins smaller than 4, and a Club of dunolly?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"against\") FROM \"first_ladder_1999\" WHERE \"losses\">10 AND \"wins\"<4 AND \"club\"='dunolly';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_ladder_1999\" (\n \"club\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"against\" real\n);\n\nQuestion: Which Byes has an Against smaller than 1297, and a Club of avoca, and Wins larger than 12?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"byes\") FROM \"first_ladder_1999\" WHERE \"against\"<1297 AND \"club\"='avoca' AND \"wins\">12;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recreational_aircraft\" (\n \"manufacturer\" text,\n \"model\" text,\n \"kit_factory\" text,\n \"wing\" text,\n \"seats\" real\n);\n\nQuestion: What Kit/Factory has a J250 model made by Jabiru?"
},
{
"role": "assistant",
"content": "SELECT \"kit_factory\" FROM \"recreational_aircraft\" WHERE \"manufacturer\"='jabiru' AND \"model\"='j250';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_savoy\" (\n \"name\" text,\n \"father\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_duchess\" text,\n \"ceased_to_be_duchess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: When was the duchess, who was married on 11 july 1643, born?"
},
{
"role": "assistant",
"content": "SELECT \"birth\" FROM \"house_of_savoy\" WHERE \"marriage\"='11 july 1643';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_savoy\" (\n \"name\" text,\n \"father\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_duchess\" text,\n \"ceased_to_be_duchess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: When was anne of lorraine born?"
},
{
"role": "assistant",
"content": "SELECT \"birth\" FROM \"house_of_savoy\" WHERE \"name\"='anne of lorraine';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_savoy\" (\n \"name\" text,\n \"father\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_duchess\" text,\n \"ceased_to_be_duchess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: When did the duchess, who was married to philippe, die?"
},
{
"role": "assistant",
"content": "SELECT \"death\" FROM \"house_of_savoy\" WHERE \"spouse\"='philippe';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"house_of_savoy\" (\n \"name\" text,\n \"father\" text,\n \"birth\" text,\n \"marriage\" text,\n \"became_duchess\" text,\n \"ceased_to_be_duchess\" text,\n \"death\" text,\n \"spouse\" text\n);\n\nQuestion: When did the woman, who was married 22 may 1657, cease to be the duchess?"
},
{
"role": "assistant",
"content": "SELECT \"ceased_to_be_duchess\" FROM \"house_of_savoy\" WHERE \"marriage\"='22 may 1657';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the score of the game with a tie no of 3?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who did home team sunderland play on 23 january 1982?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"fourth_round_proper\" WHERE \"date\"='23 january 1982' AND \"home_team\"='sunderland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the score of the game against away team queens park rangers on 23 january 1982?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"date\"='23 january 1982' AND \"away_team\"='queens park rangers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the score of the game with a tie no of 6?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='6';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.