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 \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Date, when Team is \"Orlando\"?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"team\"='orlando';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: What is the total number of laps that Beno\u00eet Tr\u00e9yluyer completed when his position was 7th and the year was before 2008?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"24_hours_of_le_mans_results\" WHERE \"class_pos\"='7th' AND \"year\"<2008;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Which team has finished in 1st place in 2011?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"24_hours_of_le_mans_results\" WHERE \"pos\"='1st' AND \"year\"=2011;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"director\" (\n \"year\" real,\n \"show\" text,\n \"season\" text,\n \"episode\" text,\n \"notes\" text\n);\n\nQuestion: What is the Episode number of Ernest Dickerson in 2009 when the show was dexter?"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"director\" WHERE \"year\"=2009 AND \"show\"='dexter';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the result on 29 September 2007?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"date\"='29 september 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which competition was on 29 September 2007?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"date\"='29 september 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Where was the game where the senators scored 80 points?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"game_log\" WHERE \"points\"=80;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the highest number of points against the boston bruins on game 77?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"game_log\" WHERE \"opponent\"='boston bruins' AND \"game\"=77;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"250cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: WHAT IS THE LOWEST GRID FOR RETIREMENT, AND LAPS LARGER THAN 17?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"250cc_classification\" WHERE \"time_retired\"='retirement' AND \"laps\">17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"250cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: WHAT IS THE GRID WITH AN ACCIDENT AND HONDA MANUFACTURER?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"grid\") FROM \"250cc_classification\" WHERE \"time_retired\"='accident' AND \"manufacturer\"='honda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oldest_first_class_cricketers\" (\n \"rank\" real,\n \"name\" text,\n \"team_s\" text,\n \"birth_date\" text,\n \"death_date\" text,\n \"age_as_of_1_february_2014\" text,\n \"nationality\" text\n);\n\nQuestion: What was the date of death for a rank below 14 and age of 103 years, 148 days?"
},
{
"role": "assistant",
"content": "SELECT \"death_date\" FROM \"oldest_first_class_cricketers\" WHERE \"rank\"<14 AND \"age_as_of_1_february_2014\"='103 years, 148 days';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oldest_first_class_cricketers\" (\n \"rank\" real,\n \"name\" text,\n \"team_s\" text,\n \"birth_date\" text,\n \"death_date\" text,\n \"age_as_of_1_february_2014\" text,\n \"nationality\" text\n);\n\nQuestion: What is the age of Fred Gibson?"
},
{
"role": "assistant",
"content": "SELECT \"age_as_of_1_february_2014\" FROM \"oldest_first_class_cricketers\" WHERE \"name\"='fred gibson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oldest_first_class_cricketers\" (\n \"rank\" real,\n \"name\" text,\n \"team_s\" text,\n \"birth_date\" text,\n \"death_date\" text,\n \"age_as_of_1_february_2014\" text,\n \"nationality\" text\n);\n\nQuestion: Who is at rank 9?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"oldest_first_class_cricketers\" WHERE \"rank\"=9;"
}
] |
[
{
"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\" real,\n \"finish\" text\n);\n\nQuestion: What is the finish of player Hale Irwin?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"made_the_cut\" WHERE \"player\"='hale irwin';"
}
] |
[
{
"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\" real,\n \"finish\" text\n);\n\nQuestion: What is the finish of South Africa?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"made_the_cut\" WHERE \"country\"='south africa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"possessive_adjectives\" (\n \"nominative\" text,\n \"ergative\" text,\n \"dative\" text,\n \"genitive\" text,\n \"instrumental\" text,\n \"adverbial\" text\n);\n\nQuestion: With a nominative of chven-i what is the ergative?"
},
{
"role": "assistant",
"content": "SELECT \"ergative\" FROM \"possessive_adjectives\" WHERE \"nominative\"='chven-i';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"possessive_adjectives\" (\n \"nominative\" text,\n \"ergative\" text,\n \"dative\" text,\n \"genitive\" text,\n \"instrumental\" text,\n \"adverbial\" text\n);\n\nQuestion: What instrumental has tkven-i as the genitive?"
},
{
"role": "assistant",
"content": "SELECT \"instrumental\" FROM \"possessive_adjectives\" WHERE \"genitive\"='tkven-i';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"possessive_adjectives\" (\n \"nominative\" text,\n \"ergative\" text,\n \"dative\" text,\n \"genitive\" text,\n \"instrumental\" text,\n \"adverbial\" text\n);\n\nQuestion: What nominative has mis as the dative?"
},
{
"role": "assistant",
"content": "SELECT \"nominative\" FROM \"possessive_adjectives\" WHERE \"dative\"='mis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"possessive_adjectives\" (\n \"nominative\" text,\n \"ergative\" text,\n \"dative\" text,\n \"genitive\" text,\n \"instrumental\" text,\n \"adverbial\" text\n);\n\nQuestion: With chem-s as the dative, what is the ergative?"
},
{
"role": "assistant",
"content": "SELECT \"ergative\" FROM \"possessive_adjectives\" WHERE \"dative\"='chem-s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"possessive_adjectives\" (\n \"nominative\" text,\n \"ergative\" text,\n \"dative\" text,\n \"genitive\" text,\n \"instrumental\" text,\n \"adverbial\" text\n);\n\nQuestion: What instrumental has chven-s as the adverbial?"
},
{
"role": "assistant",
"content": "SELECT \"instrumental\" FROM \"possessive_adjectives\" WHERE \"adverbial\"='chven-s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"possessive_adjectives\" (\n \"nominative\" text,\n \"ergative\" text,\n \"dative\" text,\n \"genitive\" text,\n \"instrumental\" text,\n \"adverbial\" text\n);\n\nQuestion: Mis-i is the nominative of what ergative?"
},
{
"role": "assistant",
"content": "SELECT \"ergative\" FROM \"possessive_adjectives\" WHERE \"nominative\"='mis-i';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: what was the week for the match on a hard surface at Indian Wells tournament?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"singles\" WHERE \"surface\"='hard' AND \"tournament\"='indian wells';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: What week was the tournament at Cincinnati?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"singles\" WHERE \"tournament\"='cincinnati';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: Where was the tournament where the match was on a hard surface and jan-michael gambill (19) was the finalist?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles\" WHERE \"surface\"='hard' AND \"finalist\"='jan-michael gambill (19)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: Who was the semifinalist at the tournament in miami?"
},
{
"role": "assistant",
"content": "SELECT \"semifinalists\" FROM \"singles\" WHERE \"tournament\"='miami';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: Who was the winner at the tournament in Hamburg?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"singles\" WHERE \"tournament\"='hamburg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"greek_cup_finals\" (\n \"year\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"venue\" text\n);\n\nQuestion: what is the venue on 21 june 1987?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"greek_cup_finals\" WHERE \"year\"='21 june 1987';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"greek_cup_finals\" (\n \"year\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"venue\" text\n);\n\nQuestion: When is the winner panathinaikos, the runner-up olympiacos and the venue nikos goumas stadium?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"greek_cup_finals\" WHERE \"winner\"='panathinaikos' AND \"runner_up\"='olympiacos' AND \"venue\"='nikos goumas stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"greek_cup_finals\" (\n \"year\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"venue\" text\n);\n\nQuestion: When is the winner olympiacos, the venue is georgios karaiskakis stadium and the runner-up is iraklis?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"greek_cup_finals\" WHERE \"winner\"='olympiacos' AND \"venue\"='georgios karaiskakis stadium' AND \"runner_up\"='iraklis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"greek_cup_finals\" (\n \"year\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"venue\" text\n);\n\nQuestion: when is the venue nikos goumas stadium and the score is 2\u20132 4\u20134 a.e.t. 6\u20135 pso?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"greek_cup_finals\" WHERE \"venue\"='nikos goumas stadium' AND \"score\"='2\u20132 4\u20134 a.e.t. 6\u20135 pso';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"greek_cup_finals\" (\n \"year\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"venue\" text\n);\n\nQuestion: what is the score when the venue is athens olympic stadium on 30 april 2011?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"greek_cup_finals\" WHERE \"venue\"='athens olympic stadium' AND \"year\"='30 april 2011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"season\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Which Season has a Skip of Eve Muirhead with a thirs of Jackie Lockhart (e/o) Kelly Wood (w)?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"teams\" WHERE \"skip\"='eve muirhead' AND \"third\"='jackie lockhart (e/o) kelly wood (w)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"season\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: What is the season with a Skip of Eve Muirhead and a third of Kerry Barr?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"teams\" WHERE \"skip\"='eve muirhead' AND \"third\"='kerry barr';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"season\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who is the second with a lead of Sarah Macintyre (jr) Anne Laird (w)?"
},
{
"role": "assistant",
"content": "SELECT \"second\" FROM \"teams\" WHERE \"lead\"='sarah macintyre (jr) anne laird (w)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"season\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: What is the skip that has a third of Anna Sloan in season 2012-13?"
},
{
"role": "assistant",
"content": "SELECT \"skip\" FROM \"teams\" WHERE \"third\"='anna sloan' AND \"season\"='2012-13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"season\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: What is the lead with a second of Vicki Adams and a third of Anna Sloan?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"teams\" WHERE \"second\"='vicki adams' AND \"third\"='anna sloan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"season\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who is the second where the third of Kelly Wood (e) Anna Sloan (Jr)?"
},
{
"role": "assistant",
"content": "SELECT \"second\" FROM \"teams\" WHERE \"third\"='kelly wood (e) anna sloan (jr)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Date, when Game is \"65\"?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"game\"=65;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is High Rebounds, when Date is \"March 12\"?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"date\"='march 12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is High Rebounds, when Date is \"March 13\"?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"date\"='march 13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Record, when Location Attendance is \"TD Banknorth Garden 18,624\"?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"location_attendance\"='td banknorth garden 18,624';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Team, when Game is \"59\"?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"game\"=59;"
}
] |
[
{
"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 \"attendance\" text\n);\n\nQuestion: What is the Score when the Away Team is Torquay United?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round_proper\" WHERE \"away_team\"='torquay 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 \"attendance\" text\n);\n\nQuestion: Which Away Team has a Tie no of replay and a Home Team of Chesterfield?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"second_round_proper\" WHERE \"tie_no\"='replay' AND \"home_team\"='chesterfield';"
}
] |
[
{
"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 \"attendance\" text\n);\n\nQuestion: What is the Away Team when the Home Team is Torquay United and the Attendence is 6 December 1997?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"second_round_proper\" WHERE \"attendance\"='6 december 1997' AND \"home_team\"='torquay united';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tire\" text,\n \"sponsor\" text\n);\n\nQuestion: What is the Chassis of the Honda Engine with a Motorola sponsor?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"teams_and_drivers\" WHERE \"engine\"='honda' AND \"sponsor\"='motorola';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tire\" text,\n \"sponsor\" text\n);\n\nQuestion: What is the engine of the goodyear tire and Herdez as a sponsor?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"teams_and_drivers\" WHERE \"tire\"='goodyear' AND \"sponsor\"='herdez';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tire\" text,\n \"sponsor\" text\n);\n\nQuestion: What engine does the Tasman Motorsports team have?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"teams_and_drivers\" WHERE \"team\"='tasman motorsports';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tire\" text,\n \"sponsor\" text\n);\n\nQuestion: Which Tire has a Sponsor of Duracell?"
},
{
"role": "assistant",
"content": "SELECT \"tire\" FROM \"teams_and_drivers\" WHERE \"sponsor\"='duracell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tire\" text,\n \"sponsor\" text\n);\n\nQuestion: Which team has Firestone Tires a Reynard 95i Chassis and is sponsored by Motorola?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"teams_and_drivers\" WHERE \"tire\"='firestone' AND \"chassis\"='reynard 95i' AND \"sponsor\"='motorola';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_election_results\" (\n \"election\" real,\n \"leader\" text,\n \"num_of_candidates\" real,\n \"num_of_constituency_votes\" real,\n \"pct_of_constituency_vote\" text\n);\n\nQuestion: What is the highest # Of Constituency Votes, when Election is 2005?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"num_of_constituency_votes\") FROM \"general_election_results\" WHERE \"election\"=2005;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_election_results\" (\n \"election\" real,\n \"leader\" text,\n \"num_of_candidates\" real,\n \"num_of_constituency_votes\" real,\n \"pct_of_constituency_vote\" text\n);\n\nQuestion: What is the sum of # Of Candidates, when # of Constituency Votes is less than 25,643,309, when Leader is Masayoshi \u014chira, and when Election is before 1979?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"num_of_candidates\") FROM \"general_election_results\" WHERE \"num_of_constituency_votes\"<'25,643,309' AND \"leader\"='masayoshi \u014dhira' AND \"election\"<1979;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_election_results\" (\n \"election\" real,\n \"leader\" text,\n \"num_of_candidates\" real,\n \"num_of_constituency_votes\" real,\n \"pct_of_constituency_vote\" text\n);\n\nQuestion: What is the % Of Constituency Vote, when # Of Constituency Votes is greater than 25,643,309, and when # Of Candidates is 310?"
},
{
"role": "assistant",
"content": "SELECT \"pct_of_constituency_vote\" FROM \"general_election_results\" WHERE \"num_of_constituency_votes\">'25,643,309' AND \"num_of_candidates\"=310;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_election_results\" (\n \"election\" real,\n \"leader\" text,\n \"num_of_candidates\" real,\n \"num_of_constituency_votes\" real,\n \"pct_of_constituency_vote\" text\n);\n\nQuestion: What is the highest # Of Constituency Votes, when Election is before 1976, when Leader is Eisaku Sat\u014d, and when # Of Candidates is less than 328?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"num_of_constituency_votes\") FROM \"general_election_results\" WHERE \"election\"<1976 AND \"leader\"='eisaku sat\u014d' AND \"num_of_candidates\"<328;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was the overall draft pick of the player who was a db and attended college in iowa?"
},
{
"role": "assistant",
"content": "SELECT \"overall\" FROM \"washington_redskins_draft_history\" WHERE \"college\"='iowa' AND \"position\"='db';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What number pick was the player drafted in round 3 at #28 overall?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"overall\"<28 AND \"round\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_intelligence_program_nip\" (\n \"administrating_agencies_by_nip_funds_only\" text,\n \"management_and_support\" real,\n \"data_collection\" text,\n \"data_processing_and_exploitation\" text,\n \"total\" real\n);\n\nQuestion: What is the lowest total data processing and exploitation of 00 0,228, and a management and support larger than 1,7?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"national_intelligence_program_nip\" WHERE \"data_processing_and_exploitation\"='00 0,228' AND \"management_and_support\">'1,7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"defunct_sites\" (\n \"name\" text,\n \"year_began\" text,\n \"registration\" text,\n \"userpics_free\" text,\n \"userpics_paid\" text,\n \"monthly_cost_for_paid_account\" text,\n \"yearly_cost_for_paid_account\" text,\n \"permanent_account\" text\n);\n\nQuestion: Which permanent account has registration of invite-only and userpics free of unknown?"
},
{
"role": "assistant",
"content": "SELECT \"permanent_account\" FROM \"defunct_sites\" WHERE \"userpics_free\"='unknown' AND \"registration\"='invite-only';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"defunct_sites\" (\n \"name\" text,\n \"year_began\" text,\n \"registration\" text,\n \"userpics_free\" text,\n \"userpics_paid\" text,\n \"monthly_cost_for_paid_account\" text,\n \"yearly_cost_for_paid_account\" text,\n \"permanent_account\" text\n);\n\nQuestion: What is the year began for the site with free userpics cost of $1 and a userpics paid value of N/A?"
},
{
"role": "assistant",
"content": "SELECT \"year_began\" FROM \"defunct_sites\" WHERE \"userpics_paid\"='n/a' AND \"userpics_free\"='1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner_and_score\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: Which Week has a Tournament of monte carlo?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"singles\" WHERE \"tournament\"='monte carlo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner_and_score\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: Which Winner and score has a Finalist of aaron krickstein?"
},
{
"role": "assistant",
"content": "SELECT \"winner_and_score\" FROM \"singles\" WHERE \"finalist\"='aaron krickstein';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner_and_score\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: Which Semifinalists have a Surface of hard, and a Winner and score of pete sampras 6\u20133, 3\u20136, 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"semifinalists\" FROM \"singles\" WHERE \"surface\"='hard' AND \"winner_and_score\"='pete sampras 6\u20133, 3\u20136, 6\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner_and_score\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: Which Finalist has a Winner and score of boris becker 7\u20136(3), 6\u20133, 3\u20136, 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"finalist\" FROM \"singles\" WHERE \"winner_and_score\"='boris becker 7\u20136(3), 6\u20133, 3\u20136, 6\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner_and_score\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: Which Semifinalists have a Finalist of andrei chesnokov?"
},
{
"role": "assistant",
"content": "SELECT \"semifinalists\" FROM \"singles\" WHERE \"finalist\"='andrei chesnokov';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"surface\" text,\n \"week\" text,\n \"winner_and_score\" text,\n \"finalist\" text,\n \"semifinalists\" text\n);\n\nQuestion: Which Surface has Semifinalists of wally masur malivai washington?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles\" WHERE \"semifinalists\"='wally masur malivai washington';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What place had a score of 73-69-68=210?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"third_round\" WHERE \"score\"='73-69-68=210';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What country is Gary Player from in T9 place?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"place\"='t9' AND \"player\"='gary player';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What's the score of New Zealand?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"third_round\" WHERE \"country\"='new zealand';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What player has a score of 67-70-77=214?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"third_round\" WHERE \"score\"='67-70-77=214';"
}
] |
[
{
"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: What country has a finish of 59?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"finish\"='59';"
}
] |
[
{
"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: What is the To Par when the finish was t16 and the player was Julius Boros?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"finish\"='t16' AND \"player\"='julius boros';"
}
] |
[
{
"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: What was the finish for Billy Casper?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"made_the_cut\" WHERE \"player\"='billy casper';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"alpine_skiing_at_the_1936_winter_olympic\" (\n \"place\" text,\n \"downhill\" real,\n \"competitor\" text,\n \"1st_run\" text,\n \"2nd_run\" text,\n \"points\" text\n);\n\nQuestion: Who is the competitor with a downhill of more than 55, and 1st DQ run?"
},
{
"role": "assistant",
"content": "SELECT \"competitor\" FROM \"alpine_skiing_at_the_1936_winter_olympic\" WHERE \"downhill\">55 AND \"1st_run\"='dq';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"alpine_skiing_at_the_1936_winter_olympic\" (\n \"place\" text,\n \"downhill\" real,\n \"competitor\" text,\n \"1st_run\" text,\n \"2nd_run\" text,\n \"points\" text\n);\n\nQuestion: What is the 1st run that is down hill less than 46, and 84.45 points?"
},
{
"role": "assistant",
"content": "SELECT \"1st_run\" FROM \"alpine_skiing_at_the_1936_winter_olympic\" WHERE \"downhill\"<46 AND \"points\"='84.45';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"week_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What ground has 0.14.1.6 (93) as the home team score?"
},
{
"role": "assistant",
"content": "SELECT \"ground\" FROM \"week_1\" WHERE \"home_team_score\"='0.14.1.6 (93)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"week_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What away team score has hawthorn as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"week_1\" WHERE \"home_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gt300\" (\n \"team\" text,\n \"make\" text,\n \"drivers\" text,\n \"tyre\" text,\n \"rounds\" text\n);\n\nQuestion: What is the make of the vehicle for driver Hisashi Wada?"
},
{
"role": "assistant",
"content": "SELECT \"make\" FROM \"gt300\" WHERE \"drivers\"='hisashi wada';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gt300\" (\n \"team\" text,\n \"make\" text,\n \"drivers\" text,\n \"tyre\" text,\n \"rounds\" text\n);\n\nQuestion: In what rounds was the featured team of Avanzza Rosso?"
},
{
"role": "assistant",
"content": "SELECT \"rounds\" FROM \"gt300\" WHERE \"team\"='avanzza rosso';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gt300\" (\n \"team\" text,\n \"make\" text,\n \"drivers\" text,\n \"tyre\" text,\n \"rounds\" text\n);\n\nQuestion: In what rounds was the featured driver Tomonobu Fujii with a Tyre of Y?"
},
{
"role": "assistant",
"content": "SELECT \"rounds\" FROM \"gt300\" WHERE \"tyre\"='y' AND \"drivers\"='tomonobu fujii';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gt300\" (\n \"team\" text,\n \"make\" text,\n \"drivers\" text,\n \"tyre\" text,\n \"rounds\" text\n);\n\nQuestion: Who is the driver with a tyre of k for Avanzza Rosso?"
},
{
"role": "assistant",
"content": "SELECT \"drivers\" FROM \"gt300\" WHERE \"tyre\"='k' AND \"team\"='avanzza rosso';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gt300\" (\n \"team\" text,\n \"make\" text,\n \"drivers\" text,\n \"tyre\" text,\n \"rounds\" text\n);\n\nQuestion: What is the tyre for Yoshihisa Namekata?"
},
{
"role": "assistant",
"content": "SELECT \"tyre\" FROM \"gt300\" WHERE \"drivers\"='yoshihisa namekata';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: If the pick is under 28 and the position is k, what's the highest Overall pick?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"position\"='k' AND \"pick\"<28;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: During round 8 when the Position being picked was rb, what was the highest overall pick?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"position\"='rb' AND \"round\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"kerrypct\" text,\n \"kerrynum\" real,\n \"bushpct\" text,\n \"bushnum\" real,\n \"otherspct\" text,\n \"othersnum\" real\n);\n\nQuestion: Which county had a Bush number of votes of 566?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"by_county\" WHERE \"bushnum\"=566;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_10_8_2\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: who is the opponent when the year is after 1996 and the outcome is winner?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"singles_10_8_2\" WHERE \"year\">1996 AND \"outcome\"='winner';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_10_8_2\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: what is the surface when the championship is rome and the opponent is sergi bruguera?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_10_8_2\" WHERE \"championship\"='rome' AND \"opponent\"='sergi bruguera';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_10_8_2\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: what is the score when the surface is hard and outcome is runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_10_8_2\" WHERE \"surface\"='hard' AND \"outcome\"='runner-up';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the number of the game played on February 24?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"game\") FROM \"game_log\" WHERE \"date\"='february 24';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Where was the game played when the opponent was Oklahoma City, and what was the attendance?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"team\"='oklahoma city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the record when they played game 58?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"game\"=58;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_23_15_8\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is Score In The Final, when Date is \"22 October 1990\"?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_the_final\" FROM \"singles_23_15_8\" WHERE \"date\"='22 october 1990';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_23_15_8\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is Outcome, when Surface is \"Carpet (I)\", and when Date is \"15 November 1993\"?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_23_15_8\" WHERE \"surface\"='carpet (i)' AND \"date\"='15 november 1993';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_23_15_8\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is Tournament, when Opponent In The Final is \"Andre Agassi\"?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_23_15_8\" WHERE \"opponent_in_the_final\"='andre agassi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_23_15_8\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is Score In The Final, when Date is \"30 August 1993\"?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_the_final\" FROM \"singles_23_15_8\" WHERE \"date\"='30 august 1993';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_23_15_8\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is Date, when Outcome is \"Winner\", and when Surface is \"Grass\"?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_23_15_8\" WHERE \"outcome\"='winner' AND \"surface\"='grass';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_23_15_8\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is Opponent In The Final, when Outcome is \"Winner\", when Surface is \"Carpet (I)\", and when Tournament is \"Lyon, France\"?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"singles_23_15_8\" WHERE \"outcome\"='winner' AND \"surface\"='carpet (i)' AND \"tournament\"='lyon, france';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_round\" (\n \"rank\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"ties\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"points\" real\n);\n\nQuestion: What are the total goals against the winner with less than 5 wins, and less than 5 plays?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals_against\") FROM \"preliminary_round\" WHERE \"wins\"<5 AND \"played\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_round\" (\n \"rank\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"ties\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"points\" real\n);\n\nQuestion: What is the average losses for 22 goals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"losses\") FROM \"preliminary_round\" WHERE \"goals_for\">22;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_round\" (\n \"rank\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"ties\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"points\" real\n);\n\nQuestion: What is the total wins with less than 2 ties, 18 goals, and less than 2 losses?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"wins\") FROM \"preliminary_round\" WHERE \"ties\"<2 AND \"goals_against\"=18 AND \"losses\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"record_vs_big_12_opponents\" (\n \"oklahoma_vs\" text,\n \"overall_record\" text,\n \"at_norman\" text,\n \"at_opponent_s_venue\" text,\n \"at_neutral_site\" text,\n \"last_5_meetings\" text,\n \"last_10_meetings\" text,\n \"current_streak\" text,\n \"since_beginning_of_big_12\" text\n);\n\nQuestion: What is the Overall Record when the Last 10 Meetings is ou, 7-3, and Norman is ou, 18-3?"
},
{
"role": "assistant",
"content": "SELECT \"overall_record\" FROM \"record_vs_big_12_opponents\" WHERE \"last_10_meetings\"='ou, 7-3' AND \"at_norman\"='ou, 18-3';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.