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 is the date southampton was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"fifth_round_proper\" WHERE \"away_team\"='southampton';"
}
]
|
[
{
"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 is the score of the home team tottenham hotspur?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fifth_round_proper\" WHERE \"home_team\"='tottenham hotspur';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_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 score of the game on 16 december 1987?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round_proper\" WHERE \"date\"='16 december 1987';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who played against the away team hereford united?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"second_round_proper\" WHERE \"away_team\"='hereford united';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who played against away team hereford united?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"second_round_proper\" WHERE \"away_team\"='hereford united';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"details_of_participants\" (\n \"clubs\" text,\n \"seasons_at_this_level\" text,\n \"settlements\" text,\n \"season_joined_league\" text,\n \"position_in_1959_1960\" text\n);\n\nQuestion: Which club was in Position 1 in 1959-1960?"
},
{
"role": "assistant",
"content": "SELECT \"clubs\" FROM \"details_of_participants\" WHERE \"position_in_1959_1960\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"details_of_participants\" (\n \"clubs\" text,\n \"seasons_at_this_level\" text,\n \"settlements\" text,\n \"season_joined_league\" text,\n \"position_in_1959_1960\" text\n);\n\nQuestion: In which season did the \u00e9vora settlements join the league?"
},
{
"role": "assistant",
"content": "SELECT \"season_joined_league\" FROM \"details_of_participants\" WHERE \"settlements\"='\u00e9vora';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"details_of_participants\" (\n \"clubs\" text,\n \"seasons_at_this_level\" text,\n \"settlements\" text,\n \"season_joined_league\" text,\n \"position_in_1959_1960\" text\n);\n\nQuestion: What was the position in 1959-1960 for the club that had 14 seasons at this level?"
},
{
"role": "assistant",
"content": "SELECT \"position_in_1959_1960\" FROM \"details_of_participants\" WHERE \"seasons_at_this_level\"='14 seasons';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"details_of_participants\" (\n \"clubs\" text,\n \"seasons_at_this_level\" text,\n \"settlements\" text,\n \"season_joined_league\" text,\n \"position_in_1959_1960\" text\n);\n\nQuestion: What was the position in 1959-1960 for the Sporting De Braga club?"
},
{
"role": "assistant",
"content": "SELECT \"position_in_1959_1960\" FROM \"details_of_participants\" WHERE \"clubs\"='sporting de braga';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"details_of_participants\" (\n \"clubs\" text,\n \"seasons_at_this_level\" text,\n \"settlements\" text,\n \"season_joined_league\" text,\n \"position_in_1959_1960\" text\n);\n\nQuestion: What is the \"season joined league\" for the club that had 15 seasons at this level?"
},
{
"role": "assistant",
"content": "SELECT \"season_joined_league\" FROM \"details_of_participants\" WHERE \"seasons_at_this_level\"='15 seasons';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What country has a score of 71-66-72-72=281?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_round\" WHERE \"score\"='71-66-72-72=281';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the total amount of money that Payne Stewart has?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"money\") FROM \"final_round\" WHERE \"player\"='payne stewart';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What country has player Nick Faldo?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_round\" WHERE \"player\"='nick faldo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the to par for the score 64-73-74-69=280?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"score\"='64-73-74-69=280';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"busiest_international_routes_from_jeju_2\" (\n \"rank\" real,\n \"airport\" text,\n \"passengers\" real,\n \"aircraft_movements\" real,\n \"carriers\" text\n);\n\nQuestion: What is the lowest rank for China Eastern Airlines, Korean Air with more passengers than 97,055?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"busiest_international_routes_from_jeju_2\" WHERE \"carriers\"='china eastern airlines, korean air' AND \"passengers\">'97,055';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"busiest_international_routes_from_jeju_2\" (\n \"rank\" real,\n \"airport\" text,\n \"passengers\" real,\n \"aircraft_movements\" real,\n \"carriers\" text\n);\n\nQuestion: What is the smallest rank for passengers more than 73,754?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"busiest_international_routes_from_jeju_2\" WHERE \"passengers\">'73,754';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"busiest_international_routes_from_jeju_2\" (\n \"rank\" real,\n \"airport\" text,\n \"passengers\" real,\n \"aircraft_movements\" real,\n \"carriers\" text\n);\n\nQuestion: Which carrier is ranked 20?"
},
{
"role": "assistant",
"content": "SELECT \"carriers\" FROM \"busiest_international_routes_from_jeju_2\" WHERE \"rank\"=20;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"busiest_international_routes_from_jeju_2\" (\n \"rank\" real,\n \"airport\" text,\n \"passengers\" real,\n \"aircraft_movements\" real,\n \"carriers\" text\n);\n\nQuestion: What is the highest rank when there are fewer than 124,296 passengers?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"busiest_international_routes_from_jeju_2\" WHERE \"passengers\"<'124,296';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What's the 2013 result for the grand slam tournaments?"
},
{
"role": "assistant",
"content": "SELECT \"2013\" FROM \"women_s_doubles_performance_timeline\" WHERE \"tournament\"='grand slam tournaments';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What's the 2010 result when 2006 is a?"
},
{
"role": "assistant",
"content": "SELECT \"2010\" FROM \"women_s_doubles_performance_timeline\" WHERE \"2006\"='a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What tournament has a 2003 of a?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"women_s_doubles_performance_timeline\" WHERE \"2003\"='a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What's the 2007 result when 2003 is a?"
},
{
"role": "assistant",
"content": "SELECT \"2007\" FROM \"women_s_doubles_performance_timeline\" WHERE \"2003\"='a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What's the 2011 result when 2010 is 2r and 2013 is w?"
},
{
"role": "assistant",
"content": "SELECT \"2011\" FROM \"women_s_doubles_performance_timeline\" WHERE \"2010\"='2r' AND \"2013\"='w';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What's the 2005 result when 2001 is sf?"
},
{
"role": "assistant",
"content": "SELECT \"2005\" FROM \"women_s_doubles_performance_timeline\" WHERE \"2001\"='sf';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_division\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: When the wolverhampton wanderers were the opponent, with a crowd larger than 41,415, what was the result?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"first_division\" WHERE \"attendance\">'41,415' AND \"opponent\"='wolverhampton wanderers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"title_holders_from_1992_until_1999\" (\n \"year\" real,\n \"binibining_pilipinas_universe\" text,\n \"binibining_pilipinas_world\" text,\n \"binibining_pilipinas_international\" text,\n \"miss_maja_pilipinas\" text,\n \"first_runner_up\" text,\n \"second_runner_up\" text\n);\n\nQuestion: Which Binibining Pilipinas-World has a Second runner-up of sonia santiago?"
},
{
"role": "assistant",
"content": "SELECT \"binibining_pilipinas_world\" FROM \"title_holders_from_1992_until_1999\" WHERE \"second_runner_up\"='sonia santiago';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"title_holders_from_1992_until_1999\" (\n \"year\" real,\n \"binibining_pilipinas_universe\" text,\n \"binibining_pilipinas_world\" text,\n \"binibining_pilipinas_international\" text,\n \"miss_maja_pilipinas\" text,\n \"first_runner_up\" text,\n \"second_runner_up\" text\n);\n\nQuestion: Which Year has a Binibining Pilipinas International of alma concepcion?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"title_holders_from_1992_until_1999\" WHERE \"binibining_pilipinas_international\"='alma concepcion';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"title_holders_from_1992_until_1999\" (\n \"year\" real,\n \"binibining_pilipinas_universe\" text,\n \"binibining_pilipinas_world\" text,\n \"binibining_pilipinas_international\" text,\n \"miss_maja_pilipinas\" text,\n \"first_runner_up\" text,\n \"second_runner_up\" text\n);\n\nQuestion: Which Binibining Pilipinas International has a Binibining Pilipinas-World of sharmaine gutierrez?"
},
{
"role": "assistant",
"content": "SELECT \"binibining_pilipinas_international\" FROM \"title_holders_from_1992_until_1999\" WHERE \"binibining_pilipinas_world\"='sharmaine gutierrez';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Which Result has a Site of rice stadium \u2022 houston, tx?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"site\"='rice stadium \u2022 houston, tx';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What Opponent has a Site of razorback stadium \u2022 fayetteville, ar, and a Date of october 7, 1967?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"site\"='razorback stadium \u2022 fayetteville, ar' AND \"date\"='october 7, 1967';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What Opponent has a Site of war memorial stadium \u2022 little rock, ar, and a Result of l6\u20137?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"site\"='war memorial stadium \u2022 little rock, ar' AND \"result\"='l6\u20137';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What Result has a Date of october 14, 1967?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='october 14, 1967';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What Attendance has a Result of l12\u201321?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"result\"='l12\u201321';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What Site has Attendance of 53,000, and a Date of october 21, 1967?"
},
{
"role": "assistant",
"content": "SELECT \"site\" FROM \"schedule\" WHERE \"attendance\"='53,000' AND \"date\"='october 21, 1967';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recording_and_release_details\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format_s\" text,\n \"catalog\" text\n);\n\nQuestion: What region is the toshiba emi label with a cd format?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"recording_and_release_details\" WHERE \"format_s\"='cd' AND \"label\"='toshiba emi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recording_and_release_details\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format_s\" text,\n \"catalog\" text\n);\n\nQuestion: What is the dage of catalog asw 28033?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"recording_and_release_details\" WHERE \"catalog\"='asw 28033';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recording_and_release_details\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format_s\" text,\n \"catalog\" text\n);\n\nQuestion: What is the date with a Japan region?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"recording_and_release_details\" WHERE \"region\"='japan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recording_and_release_details\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format_s\" text,\n \"catalog\" text\n);\n\nQuestion: What region has a lp format on 4 August 2008?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"recording_and_release_details\" WHERE \"format_s\"='lp' AND \"date\"='4 august 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"recording_and_release_details\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format_s\" text,\n \"catalog\" text\n);\n\nQuestion: What region is on 11 August 2008?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"recording_and_release_details\" WHERE \"date\"='11 august 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"odi_centuries\" (\n \"score\" text,\n \"pos\" real,\n \"inn\" real,\n \"venue\" text,\n \"h_a_n\" text\n);\n\nQuestion: What is the position with a neutral H/A/N and more than 2 innings?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pos\") FROM \"odi_centuries\" WHERE \"h_a_n\"='neutral' AND \"inn\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"odi_centuries\" (\n \"score\" text,\n \"pos\" real,\n \"inn\" real,\n \"venue\" text,\n \"h_a_n\" text\n);\n\nQuestion: Which venue has a neutral H/A/N, lower than position 3 and a score of 141?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"odi_centuries\" WHERE \"h_a_n\"='neutral' AND \"pos\"<3 AND \"score\"='141';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"odi_centuries\" (\n \"score\" text,\n \"pos\" real,\n \"inn\" real,\n \"venue\" text,\n \"h_a_n\" text\n);\n\nQuestion: Which H/A/N has a score of 105*\u2660?"
},
{
"role": "assistant",
"content": "SELECT \"h_a_n\" FROM \"odi_centuries\" WHERE \"score\"='105*\u2660';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation_table\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" text\n);\n\nQuestion: What is the average goals scored when less than 34 were played and there were more than 2 draws?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goals_scored\") FROM \"relegation_table\" WHERE \"played\"<34 AND \"draw\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation_table\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" text\n);\n\nQuestion: What is the average goals scored of the team who scored 44 points and placed higher than 5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goals_scored\") FROM \"relegation_table\" WHERE \"points\"='44' AND \"place\">5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation_table\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" text\n);\n\nQuestion: What is the lowest place of the team who conceded 36 goals and lost more than 6 times?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"place\") FROM \"relegation_table\" WHERE \"goals_conceded\"=36 AND \"lost\">6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"quarterbacks_sorted_by_win_percentage\" (\n \"quarterback\" text,\n \"games\" real,\n \"teams\" text,\n \"wins\" real,\n \"losses\" real,\n \"percent\" real\n);\n\nQuestion: what is games when the losses is more than 1, percent is 0.5 and wins is 2?"
},
{
"role": "assistant",
"content": "SELECT \"games\" FROM \"quarterbacks_sorted_by_win_percentage\" WHERE \"losses\">1 AND \"percent\"=0.5 AND \"wins\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"quarterbacks_sorted_by_win_percentage\" (\n \"quarterback\" text,\n \"games\" real,\n \"teams\" text,\n \"wins\" real,\n \"losses\" real,\n \"percent\" real\n);\n\nQuestion: what is the average wins when percent is more than 0.4 and teams is chargers~?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"quarterbacks_sorted_by_win_percentage\" WHERE \"percent\">0.4 AND \"teams\"='chargers~';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"quarterbacks_sorted_by_win_percentage\" (\n \"quarterback\" text,\n \"games\" real,\n \"teams\" text,\n \"wins\" real,\n \"losses\" real,\n \"percent\" real\n);\n\nQuestion: What is the average wins when teams is lions and the percent is more than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"quarterbacks_sorted_by_win_percentage\" WHERE \"teams\"='lions' AND \"percent\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"quarterbacks_sorted_by_win_percentage\" (\n \"quarterback\" text,\n \"games\" real,\n \"teams\" text,\n \"wins\" real,\n \"losses\" real,\n \"percent\" real\n);\n\nQuestion: what is the highest wins when the losses is less than 1, team is rams and the games is more than 8?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"quarterbacks_sorted_by_win_percentage\" WHERE \"losses\"<1 AND \"teams\"='rams' AND \"games\">8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_6_3_titles_3_runner_ups\" (\n \"outcome\" text,\n \"date\" text,\n \"category\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What category is Matthew Barton?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"singles_6_3_titles_3_runner_ups\" WHERE \"opponent\"='matthew barton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_in_class\" (\n \"bow_number\" text,\n \"ship_name\" text,\n \"launched\" text,\n \"commissioned\" text,\n \"service\" text\n);\n\nQuestion: When did the ship commissioned in November 1975 with a bow number of ps-18 launch?"
},
{
"role": "assistant",
"content": "SELECT \"launched\" FROM \"ships_in_class\" WHERE \"commissioned\"='november 1975' AND \"bow_number\"='ps-18';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_in_class\" (\n \"bow_number\" text,\n \"ship_name\" text,\n \"launched\" text,\n \"commissioned\" text,\n \"service\" text\n);\n\nQuestion: When did the ship that was commissioned July 1948 with a bow number of ps-31 launch?"
},
{
"role": "assistant",
"content": "SELECT \"launched\" FROM \"ships_in_class\" WHERE \"commissioned\"='july 1948' AND \"bow_number\"='ps-31';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_in_class\" (\n \"bow_number\" text,\n \"ship_name\" text,\n \"launched\" text,\n \"commissioned\" text,\n \"service\" text\n);\n\nQuestion: When was the ship BRP Miguel Malvar commissioned?"
},
{
"role": "assistant",
"content": "SELECT \"commissioned\" FROM \"ships_in_class\" WHERE \"ship_name\"='brp miguel malvar';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"parishes\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What parish has the lowest area and a population of more than 1,776 and a 579 of 5,008 census ranking?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"area_km_2\") FROM \"parishes\" WHERE \"population\">'1,776' AND \"census_ranking\"='579 of 5,008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"parishes\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the population of northfield parish that has an area less than 342.4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"population\") FROM \"parishes\" WHERE \"area_km_2\"<342.4 AND \"official_name\"='northfield';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"parishes\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the population of the parish with a census ranking of 579 of 5,008?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"population\") FROM \"parishes\" WHERE \"census_ranking\"='579 of 5,008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"parishes\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the population of the parish that has an area of 304.06?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"population\") FROM \"parishes\" WHERE \"area_km_2\"=304.06;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What is the earliest year the world junior championships has 1500 m notes?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"achievements\" WHERE \"notes\"='1500 m' AND \"competition\"='world junior championships';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: Which venue had 5000 m notes in 2009 with a 1st position?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"notes\"='5000 m' AND \"year\"=2009 AND \"position\"='1st';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What is the average year with 7th (heats) position?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"achievements\" WHERE \"position\"='7th (heats)';"
}
]
|
[
{
"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 \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What Method was used with opponent Kenneth Allen?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='kenneth allen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_dmfas_programme_managers_and_chi\" (\n \"number\" real,\n \"name\" text,\n \"dates_in_office\" text,\n \"country_of_origin\" text,\n \"remarks\" text\n);\n\nQuestion: What is the remark for Norway?"
},
{
"role": "assistant",
"content": "SELECT \"remarks\" FROM \"list_of_dmfas_programme_managers_and_chi\" WHERE \"country_of_origin\"='norway';"
}
]
|
[
{
"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: How many people attended the game against the Kaizer Chiefs?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"pre_season_and_friendlies\" WHERE \"opponents\"='kaizer chiefs';"
}
]
|
[
{
"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 is the result F-A with an H/A of h and more than 31,727 attending?"
},
{
"role": "assistant",
"content": "SELECT \"result_f_a\" FROM \"pre_season_and_friendlies\" WHERE \"h_a\"='h' AND \"attendance\">'31,727';"
}
]
|
[
{
"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 was the result F-A with more than 11,372 attending and an H/A of n?"
},
{
"role": "assistant",
"content": "SELECT \"result_f_a\" FROM \"pre_season_and_friendlies\" WHERE \"attendance\">'11,372' AND \"h_a\"='n';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is Player, when College/Junior/Club Team (League) is \"Val d'Or Foreurs ( QMJHL )\"?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"2011_draft_picks\" WHERE \"college_junior_club_team_league\"='val d''or foreurs ( qmjhl )';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is the Position, when Player is \"Magnus Nygren\"?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"2011_draft_picks\" WHERE \"player\"='magnus nygren';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is Position, when Round is less than 5, when Nationality is \"Canada\", and when College/Junior/Club Team (League) is \"Saint John Sea Dogs ( QMJHL )\"?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"2011_draft_picks\" WHERE \"round\"<5 AND \"nationality\"='canada' AND \"college_junior_club_team_league\"='saint john sea dogs ( qmjhl )';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is College/Junior/Club Team (League), when Position is \"Defence\", when Nationality is \"Canada\", when Round is less than 5, and when Player is \"Josiah Didier\"?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team_league\" FROM \"2011_draft_picks\" WHERE \"position\"='defence' AND \"nationality\"='canada' AND \"round\"<5 AND \"player\"='josiah didier';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: count the the average Total of ian baker-finch?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"missed_the_cut\" WHERE \"player\"='ian baker-finch';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: Which Country has a Year(s) won of 1963?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"missed_the_cut\" WHERE \"year_s_won\"='1963';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is Greg Norman's score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"player\"='greg norman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What place is John Cook in?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_leaderboard\" WHERE \"player\"='john cook';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is the money for the player with a score of 68-69-67-73=277?"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_leaderboard\" WHERE \"score\"='68-69-67-73=277';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is the to par of the player with a 72-71-65-69=277 score?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"score\"='72-71-65-69=277';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is the country of the player with playoff money and a score of 66-67-70-67=270?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_round\" WHERE \"money\"='playoff' AND \"score\"='66-67-70-67=270';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: How much money does the player with a score of 76-70-65-68=279 have?"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_round\" WHERE \"score\"='76-70-65-68=279';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is the score of player darren clarke, who has $112,500?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_round\" WHERE \"money\"='112,500' AND \"player\"='darren clarke';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is the to par of player notah begay iii from the United States?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"country\"='united states' AND \"player\"='notah begay iii';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semi_final_2_31_january_2009\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"results\" text,\n \"place\" text\n);\n\nQuestion: What song has a draw more than 4 in 1st place?"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"semi_final_2_31_january_2009\" WHERE \"draw\">4 AND \"place\"='1st';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semi_final_2_31_january_2009\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"results\" text,\n \"place\" text\n);\n\nQuestion: What is the artist for the song \"alt har en mening n\u00e5\"?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"semi_final_2_31_january_2009\" WHERE \"song\"='\\\"alt har en mening n\u00e5\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semi_final_2_31_january_2009\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"results\" text,\n \"place\" text\n);\n\nQuestion: What is the result of the song \"ride\"?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"semi_final_2_31_january_2009\" WHERE \"song\"='\\\"ride\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885_macclesfield_parliamentar\" (\n \"election\" real,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: Which 1st member has Thomas Grimsditch as a 2nd member?"
},
{
"role": "assistant",
"content": "SELECT \"1st_member\" FROM \"m_ps_1832_1885_macclesfield_parliamentar\" WHERE \"2nd_member\"='thomas grimsditch';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885_macclesfield_parliamentar\" (\n \"election\" real,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: What is all the total election that has conservative as 2nd party?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"election\") FROM \"m_ps_1832_1885_macclesfield_parliamentar\" WHERE \"2nd_party\"='conservative';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885_macclesfield_parliamentar\" (\n \"election\" real,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: Which 1st party has John Brocklehurst as 1st member, Edward Christopher Egerton 2nd memeber, and election smaller than 1880?"
},
{
"role": "assistant",
"content": "SELECT \"1st_party\" FROM \"m_ps_1832_1885_macclesfield_parliamentar\" WHERE \"election\"<1880 AND \"1st_member\"='john brocklehurst' AND \"2nd_member\"='edward christopher egerton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885_macclesfield_parliamentar\" (\n \"election\" real,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: Which 1st party has 2nd party conservative, election smaller than 1852, and Thomas Grimsditch as 2nd member?"
},
{
"role": "assistant",
"content": "SELECT \"1st_party\" FROM \"m_ps_1832_1885_macclesfield_parliamentar\" WHERE \"2nd_party\"='conservative' AND \"election\"<1852 AND \"2nd_member\"='thomas grimsditch';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_squad\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"2012_club\" text\n);\n\nQuestion: Name the Weight of \u00e1d\u00e1m steinmetz category:articles with hcards?"
},
{
"role": "assistant",
"content": "SELECT \"weight\" FROM \"current_squad\" WHERE \"name\"='\u00e1d\u00e1m steinmetz category:articles with hcards';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_squad\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"2012_club\" text\n);\n\nQuestion: Name the Weight which has a 2012 club of pro recco, and a Name of tam\u00e1s k\u00e1s\u00e1s category:articles with hcards?"
},
{
"role": "assistant",
"content": "SELECT \"weight\" FROM \"current_squad\" WHERE \"2012_club\"='pro recco' AND \"name\"='tam\u00e1s k\u00e1s\u00e1s category:articles with hcards';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_squad\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"2012_club\" text\n);\n\nQuestion: Name the Weight which has a Name of bal\u00e1zs h\u00e1rai category:articles with hcards?"
},
{
"role": "assistant",
"content": "SELECT \"weight\" FROM \"current_squad\" WHERE \"name\"='bal\u00e1zs h\u00e1rai category:articles with hcards';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_squad\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"2012_club\" text\n);\n\nQuestion: Name the 012 club which has of norbert hosny\u00e1nszky category:articles with hcards?"
},
{
"role": "assistant",
"content": "SELECT \"2012_club\" FROM \"current_squad\" WHERE \"name\"='norbert hosny\u00e1nszky category:articles with hcards';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005\" (\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 Venue is \"Twickenham , London\", when Status is \"Six Nations\", and when Opposing Teams is \"France\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"against\") FROM \"2005\" WHERE \"venue\"='twickenham , london' AND \"status\"='six nations' AND \"opposing_teams\"='france';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the total number of Against, when Date is \"27/02/2005\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"against\") FROM \"2005\" WHERE \"date\"='27/02/2005';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the highest Against, when Date is \"27/02/2005\"?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"against\") FROM \"2005\" WHERE \"date\"='27/02/2005';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is Status, when Opposing Teams is \"Italy\"?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"2005\" WHERE \"opposing_teams\"='italy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"huchra_et_al_1982_members_of_the_dorado_\" (\n \"name\" text,\n \"type\" text,\n \"r_a_j2000\" text,\n \"dec_j2000\" text,\n \"redshift_km_s\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: Which Name has Apparent Magnitude smaller than 11.4, and R.A. (J2000) of 04h17m35.8s?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"huchra_et_al_1982_members_of_the_dorado_\" WHERE \"apparent_magnitude\"<11.4 AND \"r_a_j2000\"='04h17m35.8s';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"huchra_et_al_1982_members_of_the_dorado_\" (\n \"name\" text,\n \"type\" text,\n \"r_a_j2000\" text,\n \"dec_j2000\" text,\n \"redshift_km_s\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: Which R.A. (J2000) has a Name of ngc 1543?"
},
{
"role": "assistant",
"content": "SELECT \"r_a_j2000\" FROM \"huchra_et_al_1982_members_of_the_dorado_\" WHERE \"name\"='ngc 1543';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"huchra_et_al_1982_members_of_the_dorado_\" (\n \"name\" text,\n \"type\" text,\n \"r_a_j2000\" text,\n \"dec_j2000\" text,\n \"redshift_km_s\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: Which Dec. (J2000) has a Redshift (km/ s) of 1331 \u00b1 3?"
},
{
"role": "assistant",
"content": "SELECT \"dec_j2000\" FROM \"huchra_et_al_1982_members_of_the_dorado_\" WHERE \"redshift_km_s\"='1331 \u00b1 3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"huchra_et_al_1982_members_of_the_dorado_\" (\n \"name\" text,\n \"type\" text,\n \"r_a_j2000\" text,\n \"dec_j2000\" text,\n \"redshift_km_s\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: Which R.A. (J2000) has a Name of ngc 1515?"
},
{
"role": "assistant",
"content": "SELECT \"r_a_j2000\" FROM \"huchra_et_al_1982_members_of_the_dorado_\" WHERE \"name\"='ngc 1515';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"huchra_et_al_1982_members_of_the_dorado_\" (\n \"name\" text,\n \"type\" text,\n \"r_a_j2000\" text,\n \"dec_j2000\" text,\n \"redshift_km_s\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: Which R.A. (J2000) has Apparent Magnitude of 11.7, and Dec. (J2000) of \u00b007\u203206\u2033?"
},
{
"role": "assistant",
"content": "SELECT \"r_a_j2000\" FROM \"huchra_et_al_1982_members_of_the_dorado_\" WHERE \"apparent_magnitude\"=11.7 AND \"dec_j2000\"='\u00b007\u203206\u2033';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Which player had a To par of +11?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"to_par\"='+11';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.