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 \"ncaa_consensus_all_american_team\" (\n \"position\" text,\n \"name\" text,\n \"school\" text,\n \"unanimous\" text,\n \"college_hall_of_fame\" text\n);\n\nQuestion: What is the college hall of fame of the player who plays fullback?"
},
{
"role": "assistant",
"content": "SELECT \"college_hall_of_fame\" FROM \"ncaa_consensus_all_american_team\" WHERE \"position\"='fullback';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_consensus_all_american_team\" (\n \"position\" text,\n \"name\" text,\n \"school\" text,\n \"unanimous\" text,\n \"college_hall_of_fame\" text\n);\n\nQuestion: What is the position of the player from Dartmouth Ohio State?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"ncaa_consensus_all_american_team\" WHERE \"school\"='dartmouth ohio state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" real,\n \"original_title\" text,\n \"english_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is the English title of the film Directed by Jayme Monjardim?"
},
{
"role": "assistant",
"content": "SELECT \"english_title\" FROM \"submissions\" WHERE \"director\"='jayme monjardim';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" real,\n \"original_title\" text,\n \"english_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What was the Director with a Ceremony of 2001?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"submissions\" WHERE \"year_ceremony\"=2001;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: When have a Save of ||20,599||32-37?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"save\"='||20,599||32-37';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: Which Save is on June 15?"
},
{
"role": "assistant",
"content": "SELECT \"save\" FROM \"game_log\" WHERE \"date\"='june 15';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: Which Score has a Opponent of Boston red sox and a Save of sager?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='boston red sox' AND \"save\"='sager';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: When has an Opponent of at Seattle mariners?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"opponent\"='at seattle mariners';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: When is the Save of Ayala and a Loss of Olivares"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"save\"='ayala' AND \"loss\"='olivares';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_champion_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which Tournament has a Partner of mart\u00edn rodr\u00edguez?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_champion_5\" WHERE \"partner\"='mart\u00edn rodr\u00edguez';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"michigan_89_beloit_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: How many Touchdowns have Field goals larger than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"touchdowns\") FROM \"michigan_89_beloit_0\" WHERE \"field_goals\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"michigan_89_beloit_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: Which Extra points is the highest one that has a Player of herrnstein, and Points smaller than 30?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"extra_points\") FROM \"michigan_89_beloit_0\" WHERE \"player\"='herrnstein' AND \"points\"<30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"michigan_89_beloit_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: Which Touchdowns is the lowest one that has Extra points smaller than 14, and a Player of white, and Points smaller than 5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"touchdowns\") FROM \"michigan_89_beloit_0\" WHERE \"extra_points\"<14 AND \"player\"='white' AND \"points\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"michigan_89_beloit_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: Which Touchdowns is the lowest one that has Points of 5, and a Field goals larger than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"touchdowns\") FROM \"michigan_89_beloit_0\" WHERE \"points\"=5 AND \"field_goals\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"michigan_89_beloit_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: Which Points is the lowest one that has Touchdowns smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"michigan_89_beloit_0\" WHERE \"touchdowns\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bowl_games\" (\n \"season\" real,\n \"bowl_game\" text,\n \"result\" text,\n \"opponent\" text,\n \"stadium\" text,\n \"location\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Location of the Bowl in 2006?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"bowl_games\" WHERE \"season\"=2006;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bowl_games\" (\n \"season\" real,\n \"bowl_game\" text,\n \"result\" text,\n \"opponent\" text,\n \"stadium\" text,\n \"location\" text,\n \"attendance\" text\n);\n\nQuestion: At what Location was the Attendance 70,283?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"bowl_games\" WHERE \"attendance\"='70,283';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bowl_games\" (\n \"season\" real,\n \"bowl_game\" text,\n \"result\" text,\n \"opponent\" text,\n \"stadium\" text,\n \"location\" text,\n \"attendance\" text\n);\n\nQuestion: What was the Bowl game in San Francisco, CA after 1968?"
},
{
"role": "assistant",
"content": "SELECT \"bowl_game\" FROM \"bowl_games\" WHERE \"season\">1968 AND \"location\"='san francisco, ca';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_participants\" (\n \"team\" text,\n \"constructor\" text,\n \"motorcycle\" text,\n \"rider\" text,\n \"rounds\" text\n);\n\nQuestion: What team has a yamaha constructor with all rounds?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"moto_gp_participants\" WHERE \"rounds\"='all' AND \"constructor\"='yamaha';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_participants\" (\n \"team\" text,\n \"constructor\" text,\n \"motorcycle\" text,\n \"rider\" text,\n \"rounds\" text\n);\n\nQuestion: What rounds did rider Mika Kallio with a Ducati constructor have?"
},
{
"role": "assistant",
"content": "SELECT \"rounds\" FROM \"moto_gp_participants\" WHERE \"constructor\"='ducati' AND \"rider\"='mika kallio';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_participants\" (\n \"team\" text,\n \"constructor\" text,\n \"motorcycle\" text,\n \"rider\" text,\n \"rounds\" text\n);\n\nQuestion: Who is the rider of Scot Racing team with a Honda constructor and rounds 6-17?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"moto_gp_participants\" WHERE \"constructor\"='honda' AND \"team\"='scot racing team' AND \"rounds\"='6-17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_participants\" (\n \"team\" text,\n \"constructor\" text,\n \"motorcycle\" text,\n \"rider\" text,\n \"rounds\" text\n);\n\nQuestion: What is the rounds of rider Mika Kallio 1 of the Ducati Marlboro team?"
},
{
"role": "assistant",
"content": "SELECT \"rounds\" FROM \"moto_gp_participants\" WHERE \"team\"='ducati marlboro team' AND \"rider\"='mika kallio 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the average week that there was a game with less than 18,517 fans attending and occurred on November 21, 1954?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"attendance\"<'18,517' AND \"date\"='november 21, 1954';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the highest week that had a game against the Pittsburgh Steelers with 22,597 fans in attendance?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"attendance\"<'22,597' AND \"opponent\"='pittsburgh steelers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Who was the opponent for the game taht was before week 5 on October 10, 1954?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"<5 AND \"date\"='october 10, 1954';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the average attendance for the game that was after week 4 and on November 14, 1954?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"week\">4 AND \"date\"='november 14, 1954';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: After December 19, what is the Game number with a Record of 21\u20134\u20137?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"game\") FROM \"regular_season\" WHERE \"record\"='21\u20134\u20137' AND \"december\">19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What were the Points in the game with a Score of 2\u20137?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"regular_season\" WHERE \"score\"='2\u20137';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What's the lowest bronze with a 6 rank, smaller than 5 gold, and a total of more than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"women\" WHERE \"gold\"<5 AND \"rank\"='6' AND \"total\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What's the Bronze cumulative number for less than 0 gold?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"bronze\") FROM \"women\" WHERE \"gold\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which average Lost has an Against larger than 19, and a Drawn smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lost\") FROM \"torneio_rio_s_o_paulo\" WHERE \"against\">19 AND \"drawn\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which average Against has Drawn of 3, and Points larger than 9, and a Team of portuguesa?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"against\") FROM \"torneio_rio_s_o_paulo\" WHERE \"drawn\"=3 AND \"points\">9 AND \"team\"='portuguesa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which average Against has Points of 6, and a Played smaller than 9?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"against\") FROM \"torneio_rio_s_o_paulo\" WHERE \"points\"=6 AND \"played\"<9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which average Points have a Position of 7, and a Lost smaller than 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"torneio_rio_s_o_paulo\" WHERE \"position\"=7 AND \"lost\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which average Points have a Lost larger than 2, and Drawn larger than 2, and a Difference of 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"torneio_rio_s_o_paulo\" WHERE \"lost\">2 AND \"drawn\">2 AND \"difference\"='0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"michigan_119_michigan_agricultural_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: Which Touchdowns have an Extra points of 0, and Points larger than 5, and a Player of curtis redden?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"touchdowns\") FROM \"michigan_119_michigan_agricultural_0\" WHERE \"extra_points\"=0 AND \"points\">5 AND \"player\"='curtis redden';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"michigan_119_michigan_agricultural_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: How many Extra points have Touchdowns of 1, and a Player of ross kidston, and Points smaller than 5?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"extra_points\") FROM \"michigan_119_michigan_agricultural_0\" WHERE \"touchdowns\"=1 AND \"player\"='ross kidston' AND \"points\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"michigan_119_michigan_agricultural_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: Which Points is the lowest one that has an Extra points of 0, and a Player of curtis redden, and Touchdowns smaller than 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"michigan_119_michigan_agricultural_0\" WHERE \"extra_points\"=0 AND \"player\"='curtis redden' AND \"touchdowns\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"michigan_119_michigan_agricultural_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: Which Extra points is the lowest one that has a Player of ross kidston, and Points smaller than 5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"extra_points\") FROM \"michigan_119_michigan_agricultural_0\" WHERE \"player\"='ross kidston' AND \"points\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"michigan_119_michigan_agricultural_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: Which Points have Touchdowns of 1, and a Field goals smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"michigan_119_michigan_agricultural_0\" WHERE \"touchdowns\"=1 AND \"field_goals\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ranking_movement\" (\n \"poll\" text,\n \"wk_1\" text,\n \"wk_2\" text,\n \"wk_3\" text,\n \"wk_4\" text,\n \"wk_5\" text,\n \"wk_6\" text,\n \"wk_7\" text,\n \"wk_8\" real,\n \"wk_9\" real,\n \"wk_10\" real,\n \"wk_11\" real,\n \"wk_13\" real,\n \"wk_14\" real\n);\n\nQuestion: Which poll had a week 10 larger than 2, a week 2 of exactly 12, and a week 13 of 8?"
},
{
"role": "assistant",
"content": "SELECT \"poll\" FROM \"ranking_movement\" WHERE \"wk_10\">2 AND \"wk_2\"='12' AND \"wk_13\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ranking_movement\" (\n \"poll\" text,\n \"wk_1\" text,\n \"wk_2\" text,\n \"wk_3\" text,\n \"wk_4\" text,\n \"wk_5\" text,\n \"wk_6\" text,\n \"wk_7\" text,\n \"wk_8\" real,\n \"wk_9\" real,\n \"wk_10\" real,\n \"wk_11\" real,\n \"wk_13\" real,\n \"wk_14\" real\n);\n\nQuestion: What is the highest week 9 that had a week 6 of 7, a week 10 of greater than 2, a week 7 of 5, and a week 11 less than 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wk_9\") FROM \"ranking_movement\" WHERE \"wk_6\"='7' AND \"wk_10\">2 AND \"wk_7\"='5' AND \"wk_11\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ap_poll\" (\n \"week_2_sept_7\" text,\n \"week_3_sept_14\" text,\n \"week_4_sept_21\" text,\n \"week_5_sept_28\" text,\n \"week_6_oct_5\" text,\n \"week_7_oct_12\" text,\n \"week_10_nov_2\" text,\n \"week_12_nov_16\" text,\n \"week_14_nov_30\" text,\n \"week_15_dec_7\" text,\n \"week_16_final_jan_9\" text\n);\n\nQuestion: What was the week 5 opponent for the year with a week 10 opponent of Maryland (6-2)?"
},
{
"role": "assistant",
"content": "SELECT \"week_5_sept_28\" FROM \"ap_poll\" WHERE \"week_10_nov_2\"='maryland (6-2)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ap_poll\" (\n \"week_2_sept_7\" text,\n \"week_3_sept_14\" text,\n \"week_4_sept_21\" text,\n \"week_5_sept_28\" text,\n \"week_6_oct_5\" text,\n \"week_7_oct_12\" text,\n \"week_10_nov_2\" text,\n \"week_12_nov_16\" text,\n \"week_14_nov_30\" text,\n \"week_15_dec_7\" text,\n \"week_16_final_jan_9\" text\n);\n\nQuestion: What was the week 14 opponent for the year with a week 10 opponent of Michigan State (8-2)?"
},
{
"role": "assistant",
"content": "SELECT \"week_14_nov_30\" FROM \"ap_poll\" WHERE \"week_10_nov_2\"='michigan state (8-2)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ap_poll\" (\n \"week_2_sept_7\" text,\n \"week_3_sept_14\" text,\n \"week_4_sept_21\" text,\n \"week_5_sept_28\" text,\n \"week_6_oct_5\" text,\n \"week_7_oct_12\" text,\n \"week_10_nov_2\" text,\n \"week_12_nov_16\" text,\n \"week_14_nov_30\" text,\n \"week_15_dec_7\" text,\n \"week_16_final_jan_9\" text\n);\n\nQuestion: What is the week 4 opponent for the year with a week 10 opponent of Michigan State (8-2)?"
},
{
"role": "assistant",
"content": "SELECT \"week_4_sept_21\" FROM \"ap_poll\" WHERE \"week_10_nov_2\"='michigan state (8-2)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ap_poll\" (\n \"week_2_sept_7\" text,\n \"week_3_sept_14\" text,\n \"week_4_sept_21\" text,\n \"week_5_sept_28\" text,\n \"week_6_oct_5\" text,\n \"week_7_oct_12\" text,\n \"week_10_nov_2\" text,\n \"week_12_nov_16\" text,\n \"week_14_nov_30\" text,\n \"week_15_dec_7\" text,\n \"week_16_final_jan_9\" text\n);\n\nQuestion: What is the week 12 opponent for the year that had a week 3 opponent of South Florida (3-0)?"
},
{
"role": "assistant",
"content": "SELECT \"week_12_nov_16\" FROM \"ap_poll\" WHERE \"week_3_sept_14\"='south florida (3-0)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ap_poll\" (\n \"week_2_sept_7\" text,\n \"week_3_sept_14\" text,\n \"week_4_sept_21\" text,\n \"week_5_sept_28\" text,\n \"week_6_oct_5\" text,\n \"week_7_oct_12\" text,\n \"week_10_nov_2\" text,\n \"week_12_nov_16\" text,\n \"week_14_nov_30\" text,\n \"week_15_dec_7\" text,\n \"week_16_final_jan_9\" text\n);\n\nQuestion: What was the week 7 opponent for the year that had a week 12 opponent of Oregon State (7-3)?"
},
{
"role": "assistant",
"content": "SELECT \"week_7_oct_12\" FROM \"ap_poll\" WHERE \"week_12_nov_16\"='oregon state (7-3)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ap_poll\" (\n \"week_2_sept_7\" text,\n \"week_3_sept_14\" text,\n \"week_4_sept_21\" text,\n \"week_5_sept_28\" text,\n \"week_6_oct_5\" text,\n \"week_7_oct_12\" text,\n \"week_10_nov_2\" text,\n \"week_12_nov_16\" text,\n \"week_14_nov_30\" text,\n \"week_15_dec_7\" text,\n \"week_16_final_jan_9\" text\n);\n\nQuestion: What was the week 3 opponent for the year that had a week 7 opponent of Georgia (5-1)?"
},
{
"role": "assistant",
"content": "SELECT \"week_3_sept_14\" FROM \"ap_poll\" WHERE \"week_7_oct_12\"='georgia (5-1)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Name the women's singles for 2012"
},
{
"role": "assistant",
"content": "SELECT \"women_s_singles\" FROM \"previous_winners\" WHERE \"year\"='2012';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Name the year for angga pratama ryan agung saputra"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"previous_winners\" WHERE \"men_s_doubles\"='angga pratama ryan agung saputra';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Name the men's doubles for anneke feinya agustin nitya krishinda maheswari"
},
{
"role": "assistant",
"content": "SELECT \"men_s_doubles\" FROM \"previous_winners\" WHERE \"women_s_doubles\"='anneke feinya agustin nitya krishinda maheswari';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Name the men's doubles for 2010"
},
{
"role": "assistant",
"content": "SELECT \"men_s_doubles\" FROM \"previous_winners\" WHERE \"year\"='2010';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ap_poll\" (\n \"preseason\" text,\n \"week_1_aug_26\" text,\n \"week_2_sept_2\" text,\n \"week_3_sept_8\" text,\n \"week_4_sept_15\" text,\n \"week_5_sept_22\" text,\n \"week_6_sept_29\" text,\n \"week_7_oct_6\" text,\n \"week_8_oct_13\" text,\n \"week_9_oct_20\" text,\n \"week_10_oct_27\" text,\n \"week_11_nov_3\" text,\n \"week_12_nov_10\" text,\n \"week_13_nov_17\" text,\n \"week_14_nov_24\" text,\n \"week_15_dec_1\" text,\n \"week_16_dec_8\" text,\n \"week_17_final_jan_4\" text\n);\n\nQuestion: What is Week 14 Nov 24, that has Week 11 Nov 3 of USC (6-2)?"
},
{
"role": "assistant",
"content": "SELECT \"week_14_nov_24\" FROM \"ap_poll\" WHERE \"week_11_nov_3\"='usc (6-2)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ap_poll\" (\n \"preseason\" text,\n \"week_1_aug_26\" text,\n \"week_2_sept_2\" text,\n \"week_3_sept_8\" text,\n \"week_4_sept_15\" text,\n \"week_5_sept_22\" text,\n \"week_6_sept_29\" text,\n \"week_7_oct_6\" text,\n \"week_8_oct_13\" text,\n \"week_9_oct_20\" text,\n \"week_10_oct_27\" text,\n \"week_11_nov_3\" text,\n \"week_12_nov_10\" text,\n \"week_13_nov_17\" text,\n \"week_14_nov_24\" text,\n \"week_15_dec_1\" text,\n \"week_16_dec_8\" text,\n \"week_17_final_jan_4\" text\n);\n\nQuestion: What is listed for the Week 9 Oct 20 that has a Week 17 (Final) Jan 4 of Michigan (10-3)?"
},
{
"role": "assistant",
"content": "SELECT \"week_9_oct_20\" FROM \"ap_poll\" WHERE \"week_17_final_jan_4\"='michigan (10-3)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ap_poll\" (\n \"preseason\" text,\n \"week_1_aug_26\" text,\n \"week_2_sept_2\" text,\n \"week_3_sept_8\" text,\n \"week_4_sept_15\" text,\n \"week_5_sept_22\" text,\n \"week_6_sept_29\" text,\n \"week_7_oct_6\" text,\n \"week_8_oct_13\" text,\n \"week_9_oct_20\" text,\n \"week_10_oct_27\" text,\n \"week_11_nov_3\" text,\n \"week_12_nov_10\" text,\n \"week_13_nov_17\" text,\n \"week_14_nov_24\" text,\n \"week_15_dec_1\" text,\n \"week_16_dec_8\" text,\n \"week_17_final_jan_4\" text\n);\n\nQuestion: What is listed for the Week 1 Aug 26 that has a Week 7 Oct 6 of USC (3-2)?"
},
{
"role": "assistant",
"content": "SELECT \"week_1_aug_26\" FROM \"ap_poll\" WHERE \"week_7_oct_6\"='usc (3-2)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ap_poll\" (\n \"preseason\" text,\n \"week_1_aug_26\" text,\n \"week_2_sept_2\" text,\n \"week_3_sept_8\" text,\n \"week_4_sept_15\" text,\n \"week_5_sept_22\" text,\n \"week_6_sept_29\" text,\n \"week_7_oct_6\" text,\n \"week_8_oct_13\" text,\n \"week_9_oct_20\" text,\n \"week_10_oct_27\" text,\n \"week_11_nov_3\" text,\n \"week_12_nov_10\" text,\n \"week_13_nov_17\" text,\n \"week_14_nov_24\" text,\n \"week_15_dec_1\" text,\n \"week_16_dec_8\" text,\n \"week_17_final_jan_4\" text\n);\n\nQuestion: What is listed for the Week 3 Sept 8 that has a Week 2 Sept 2 of Florida State (2-0) (4)?"
},
{
"role": "assistant",
"content": "SELECT \"week_3_sept_8\" FROM \"ap_poll\" WHERE \"week_2_sept_2\"='florida state (2-0) (4)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How much December has a Score of 5\u20132, and a Game smaller than 27?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"december\") FROM \"regular_season\" WHERE \"score\"='5\u20132' AND \"game\"<27;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Game has an Opponent of @ pittsburgh penguins?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"game\") FROM \"regular_season\" WHERE \"opponent\"='@ pittsburgh penguins';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which December has a Record of 21\u20137\u20132, and a Game larger than 30?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"december\") FROM \"regular_season\" WHERE \"record\"='21\u20137\u20132' AND \"game\">30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which December has Points of 38, and a Record of 18\u20136\u20132?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"december\") FROM \"regular_season\" WHERE \"points\"=38 AND \"record\"='18\u20136\u20132';"
}
] |
[
{
"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 Score that has a Result of 2\u20131 on 5 july 2007?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"result\"='2\u20131' AND \"date\"='5 july 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 has a Venue of hong kong?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"venue\"='hong kong';"
}
] |
[
{
"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: When is the Competition of friendly match with a Result of 2\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"competition\"='friendly match' AND \"result\"='2\u20131';"
}
] |
[
{
"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 Venue has a Result of 2\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"result\"='2\u20130';"
}
] |
[
{
"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 Score of 2007 afc asian cup qualification with a Result of 8\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='2007 afc asian cup qualification' AND \"result\"='8\u20130';"
}
] |
[
{
"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 has a Result of 3\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"result\"='3\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the Indians' record during the game that had 31,467 in attendance?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"attendance\"='31,467';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: what year is 4:00 long"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"official_versions\" WHERE \"length\"='4:00';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What round on average was a defensive tackle selected?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"position\"='defensive tackle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"points_system\" (\n \"distance\" text,\n \"10th\" real,\n \"11th\" real,\n \"12th\" real,\n \"13th\" real,\n \"14th\" real,\n \"15th\" real,\n \"16th\" real,\n \"17th\" real,\n \"18th\" real,\n \"19th\" real,\n \"20th\" real,\n \"21st\" real,\n \"22nd\" real,\n \"23rd\" real,\n \"24th\" real,\n \"25th\" real,\n \"26th\" real,\n \"27th\" real,\n \"28th\" real,\n \"29th\" real,\n \"30th\" real,\n \"31st\" real,\n \"32nd\" real\n);\n\nQuestion: 11th of 26, and a 17th larger than 16 has what highest 30th?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"30th\") FROM \"points_system\" WHERE \"11th\"=26 AND \"17th\">16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest total for the silver less than 1, and a rank more than 5, more than 1 bronze?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"silver\"<1 AND \"rank\">5 AND \"bronze\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Who ha the gold and 1 bronze, and more than 0 silver?"
},
{
"role": "assistant",
"content": "SELECT \"gold\" FROM \"medal_table\" WHERE \"bronze\"=1 AND \"silver\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Who has a total of the Bronze less than 4, gold more than 0, and no silver?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"bronze\") FROM \"medal_table\" WHERE \"total\"<4 AND \"gold\">0 AND \"silver\"=0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What's the Points average with a Lost of 21, and Position of 22?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"lost\"=21 AND \"position\"=22;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_a\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What's the total Lost that has a Played that's larger than 42?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lost\") FROM \"campeonato_brasileiro_s_rie_a\" WHERE \"played\">42;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_of_chinese_mass_units_in_hong_kong\" (\n \"jyutping\" text,\n \"character\" text,\n \"portuguese\" text,\n \"relative_value\" text,\n \"metric_value\" text,\n \"imperial_value\" text\n);\n\nQuestion: what's the relative value that contains a jyutping of daam3?"
},
{
"role": "assistant",
"content": "SELECT \"relative_value\" FROM \"table_of_chinese_mass_units_in_hong_kong\" WHERE \"jyutping\"='daam3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_of_chinese_mass_units_in_hong_kong\" (\n \"jyutping\" text,\n \"character\" text,\n \"portuguese\" text,\n \"relative_value\" text,\n \"metric_value\" text,\n \"imperial_value\" text\n);\n\nQuestion: What metric value has a jyutping of lei4?"
},
{
"role": "assistant",
"content": "SELECT \"metric_value\" FROM \"table_of_chinese_mass_units_in_hong_kong\" WHERE \"jyutping\"='lei4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_of_chinese_mass_units_in_hong_kong\" (\n \"jyutping\" text,\n \"character\" text,\n \"portuguese\" text,\n \"relative_value\" text,\n \"metric_value\" text,\n \"imperial_value\" text\n);\n\nQuestion: what's the imperial that contains a jyutping of cin4?"
},
{
"role": "assistant",
"content": "SELECT \"imperial_value\" FROM \"table_of_chinese_mass_units_in_hong_kong\" WHERE \"jyutping\"='cin4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"boxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"rd_time\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: What was the location that led to a record of 9-0-0?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"boxing_record\" WHERE \"record\"='9-0-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"boxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"rd_time\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: What was the record after the bout against Nikki Eplion, which resulted in a win in round 3?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"boxing_record\" WHERE \"result\"='win' AND \"rd_time\"='3' AND \"opponent\"='nikki eplion';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest number of bronze medals with less than 2 silver medals and more than 1 medal in total for Uzbekistan?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"silver\"<2 AND \"total\">1 AND \"nation\"='uzbekistan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text\n);\n\nQuestion: What is the highest round with a pick# of 11, a position of offensive tackle, and overall less than 414?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\"=11 AND \"overall\"<414 AND \"position\"='offensive tackle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text\n);\n\nQuestion: What is the highest round with a pick# of 9, overll less than 468, and position of defensive back?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\"=9 AND \"position\"='defensive back' AND \"overall\"<468;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text\n);\n\nQuestion: What is the highest round with a guard position and an overall greater than 71?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"position\"='guard' AND \"overall\">71;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text\n);\n\nQuestion: Who has an overall greater than 414 with a pick# bigger than 9?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"atlanta_falcons_draft_history\" WHERE \"overall\">414 AND \"pick_num\">9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"islands\" (\n \"island\" text,\n \"gaelic_name\" text,\n \"location\" text,\n \"area_ha\" real,\n \"population\" real,\n \"last_inhabited\" text,\n \"height_m\" real\n);\n\nQuestion: What is the Gaelic name for an area less than 127 in Kintyre?"
},
{
"role": "assistant",
"content": "SELECT \"gaelic_name\" FROM \"islands\" WHERE \"area_ha\"<127 AND \"location\"='kintyre';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_35_23_12\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the score on 7 february 2008?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_35_23_12\" WHERE \"date\"='7 february 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_35_23_12\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome on 13 may 2007?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles_35_23_12\" WHERE \"date\"='13 may 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_35_23_12\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the score on 3 may 2009?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_35_23_12\" WHERE \"date\"='3 may 2009';"
}
] |
[
{
"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: Name the score for venue of jalan besar, singapore"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"venue\"='jalan besar, singapore';"
}
] |
[
{
"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: Name the score for 2 june 2008"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"date\"='2 june 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Opponent has a Game of 63?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"game\"=63;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: which Record has a Score of 1\u20134?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"score\"='1\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Record has a Points smaller than 62 and a February larger than 16, and a Score of 8\u20137?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"points\"<62 AND \"february\">16 AND \"score\"='8\u20137';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_bibliographic_details\" (\n \"start_month\" text,\n \"end_month\" text,\n \"cover\" text,\n \"spine\" text,\n \"indicia\" text,\n \"masthead\" text,\n \"number_of_issues\" real\n);\n\nQuestion: What is the total number of Issues has a End month of oct-80?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"number_of_issues\") FROM \"other_bibliographic_details\" WHERE \"end_month\"='oct-80';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_bibliographic_details\" (\n \"start_month\" text,\n \"end_month\" text,\n \"cover\" text,\n \"spine\" text,\n \"indicia\" text,\n \"masthead\" text,\n \"number_of_issues\" real\n);\n\nQuestion: What is the Spine that has fantastic stories science fiction & fantasy with and end month in aug-72?"
},
{
"role": "assistant",
"content": "SELECT \"spine\" FROM \"other_bibliographic_details\" WHERE \"indicia\"='fantastic' AND \"cover\"='fantastic stories science fiction & fantasy' AND \"end_month\"='aug-72';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_bibliographic_details\" (\n \"start_month\" text,\n \"end_month\" text,\n \"cover\" text,\n \"spine\" text,\n \"indicia\" text,\n \"masthead\" text,\n \"number_of_issues\" real\n);\n\nQuestion: Which Indicia has anEnd month in feb-75?"
},
{
"role": "assistant",
"content": "SELECT \"indicia\" FROM \"other_bibliographic_details\" WHERE \"end_month\"='feb-75';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"station\" text,\n \"city_of_license\" text,\n \"channels_tv_rf\" text,\n \"first_air_date\" text,\n \"haat\" text,\n \"facility_id\" real,\n \"public_license_information\" text\n);\n\nQuestion: Which HAAT has a Channels TV / RF of 31 (psip) 44 (uhf)"
},
{
"role": "assistant",
"content": "SELECT \"haat\" FROM \"stations\" WHERE \"channels_tv_rf\"='31 (psip) 44 (uhf)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"station\" text,\n \"city_of_license\" text,\n \"channels_tv_rf\" text,\n \"first_air_date\" text,\n \"haat\" text,\n \"facility_id\" real,\n \"public_license_information\" text\n);\n\nQuestion: Which City of license has a Channels TV / RF of 67 ( psip ) 29 ( uhf )"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"stations\" WHERE \"channels_tv_rf\"='67 ( psip ) 29 ( uhf )';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"station\" text,\n \"city_of_license\" text,\n \"channels_tv_rf\" text,\n \"first_air_date\" text,\n \"haat\" text,\n \"facility_id\" real,\n \"public_license_information\" text\n);\n\nQuestion: Which Station has hagerstown?"
},
{
"role": "assistant",
"content": "SELECT \"station\" FROM \"stations\" WHERE \"city_of_license\"='hagerstown';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.