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 \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the lowest number of losses for the club c\u00e1diz cf?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"losses\") FROM \"final_table\" WHERE \"club\"='c\u00e1diz cf';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"downloadable_content\" (\n \"year\" real,\n \"song_title\" text,\n \"artist\" text,\n \"master_recording\" text,\n \"release_date\" text,\n \"single_pack\" text\n);\n\nQuestion: What is the name of the artist with a Single / Pack of guitar hero track pack 1?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"downloadable_content\" WHERE \"single_pack\"='guitar hero track pack 1';"
}
]
|
[
{
"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 record at the game that had a loss of Lemanczyk (0\u20131)?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"loss\"='lemanczyk (0\u20131)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"game\" real,\n \"date\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: Game larger than 1, and a Location of comiskey park (i), and a Date of October 9 happened at what time?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"summary\" WHERE \"game\">1 AND \"location\"='comiskey park (i)' AND \"date\"='october 9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"game\" real,\n \"date\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: Date of october 8 happened at what time?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"summary\" WHERE \"date\"='october 8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"game\" real,\n \"date\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: Game 1's sum of attendance is?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"summary\" WHERE \"game\"=1;"
}
]
|
[
{
"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 of the winner of the 2000 Masters?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"made_the_cut\" WHERE \"year_s_won\"='2000';"
}
]
|
[
{
"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: For the player from Fiji, what was his finish?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"made_the_cut\" WHERE \"country\"='fiji';"
}
]
|
[
{
"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: For the player finishing at +8, what is his nationality?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"to_par\"='+8';"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: What was the score of the game that had a record of 52\u2013103?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='52\u2013103';"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: What was the date of the game when the record was 53\u2013104?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='53\u2013104';"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: What was the record at the game that had a loss of Huffman (6\u201318)?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"loss\"='huffman (6\u201318)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wednesday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: for the 8:00 of kid nation what is at 10:00?"
},
{
"role": "assistant",
"content": "SELECT \"10_00\" FROM \"wednesday\" WHERE \"8_00\"='kid nation';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wednesday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: for the 10:00 of the simple life what is the 9:00?"
},
{
"role": "assistant",
"content": "SELECT \"9_00\" FROM \"wednesday\" WHERE \"10_00\"='the simple life';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wednesday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: for the 10:00 of le journal du soir what is the 9:00?"
},
{
"role": "assistant",
"content": "SELECT \"9_00\" FROM \"wednesday\" WHERE \"10_00\"='le journal du soir';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wednesday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: for the 7:30 of access hollywood what is the 10:00?"
},
{
"role": "assistant",
"content": "SELECT \"10_00\" FROM \"wednesday\" WHERE \"7_30\"='access hollywood';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wednesday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"10_00\" text,\n \"10_30\" text\n);\n\nQuestion: for the 9:00 of bionic woman what is the 8:30?"
},
{
"role": "assistant",
"content": "SELECT \"8_30\" FROM \"wednesday\" WHERE \"9_00\"='bionic woman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Which format is released on August 29, 1998?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"date\"='august 29, 1998';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the catalog number for the January 25, 1987 release?"
},
{
"role": "assistant",
"content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"date\"='january 25, 1987';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Which format is released on May 27, 2009?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"date\"='may 27, 2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the catalog number of the May 27, 2009 release?"
},
{
"role": "assistant",
"content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"date\"='may 27, 2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the release date of a CD with the catalog number ALCA-9206?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"format\"='cd' AND \"catalog\"='alca-9206';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Which format is released on May 27, 2009?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"date\"='may 27, 2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"points\" (\n \"rank\" real,\n \"player\" text,\n \"years\" text,\n \"games\" real,\n \"ppg_avg\" real,\n \"total_points\" real\n);\n\nQuestion: What was the average of points with ranks smaller than 7 but with total point games of 113?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total_points\") FROM \"points\" WHERE \"games\"=113 AND \"rank\"<7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gore_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the sum of the roll with an area of Waikaka?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"roll\") FROM \"gore_district\" WHERE \"area\"='waikaka';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gore_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the roll number for East Gore School?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"roll\") FROM \"gore_district\" WHERE \"name\"='east gore school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gore_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the lowest decile with 1-6 years and area of Maitland?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"decile\") FROM \"gore_district\" WHERE \"years\"='1-6' AND \"area\"='maitland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gore_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which gender has 7-15 years?"
},
{
"role": "assistant",
"content": "SELECT \"gender\" FROM \"gore_district\" WHERE \"years\"='7-15';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gore_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the gender for Otama?"
},
{
"role": "assistant",
"content": "SELECT \"gender\" FROM \"gore_district\" WHERE \"area\"='otama';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"gore_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the authority for roll of 96?"
},
{
"role": "assistant",
"content": "SELECT \"authority\" FROM \"gore_district\" WHERE \"roll\"=96;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"southland_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: When is a Roll of 9?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"southland_district\" WHERE \"roll\"=9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"southland_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the Area with 26 in Roll"
},
{
"role": "assistant",
"content": "SELECT \"area\" FROM \"southland_district\" WHERE \"roll\"=26;"
}
]
|
[
{
"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: For nations with more than 6 silvers and more than 10 golds, what is the lowest total?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"silver\">6 AND \"gold\">10;"
}
]
|
[
{
"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 rank for nations with more than 3 bronze medals and more than 36 total medals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"medal_table\" WHERE \"bronze\">3 AND \"total\">36;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which country has the most bronze and has more than one silver, 1 gold, and less than 4 total medals."
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"medals_table\" WHERE \"silver\">1 AND \"gold\"=1 AND \"total\"<4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What nation has the most bronze medals with over 11 total medals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"medals_table\" WHERE \"total\">11;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many silver medals does Cuba have?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"silver\") FROM \"medals_table\" WHERE \"nation\"='cuba';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s_patriots_8_6\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: Where was the game that the Indianapolis Colts lost 24-14?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"2000s_patriots_8_6\" WHERE \"loser\"='indianapolis colts' AND \"result\"='24-14';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s_patriots_8_6\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: On what date was the game that the Indianapolis Colts lost in 2004?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2000s_patriots_8_6\" WHERE \"loser\"='indianapolis colts' AND \"year\"=2004;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s_patriots_8_6\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: Which team won against the New England Patriots 40-21?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"2000s_patriots_8_6\" WHERE \"loser\"='new england patriots' AND \"result\"='40-21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s_patriots_8_6\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: What was the date of the game played at Gillette Stadium with a score of 40-21?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2000s_patriots_8_6\" WHERE \"location\"='gillette stadium' AND \"result\"='40-21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s_patriots_8_6\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: What year was the game that ended with a score of 24-14?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"2000s_patriots_8_6\" WHERE \"result\"='24-14';"
}
]
|
[
{
"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 was the score of the 3-0 Win result?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"result\"='3-0 win';"
}
]
|
[
{
"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 was the result of the game from 10 October 2009?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"date\"='10 october 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: What is the name of the competition that has a score of 2-0?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"score\"='2-0';"
}
]
|
[
{
"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 \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Which Men's singles has a Mixed doubles of kai abraham petra michalowsky?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_singles\" FROM \"previous_winners\" WHERE \"mixed_doubles\"='kai abraham petra michalowsky';"
}
]
|
[
{
"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 \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Which women's doubles has a Year of 1992?"
},
{
"role": "assistant",
"content": "SELECT \"women_s_doubles\" FROM \"previous_winners\" WHERE \"year\"='1992';"
}
]
|
[
{
"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 \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Which year has a Men's doubles of marcus ellis peter mills?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"previous_winners\" WHERE \"men_s_doubles\"='marcus ellis peter mills';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the visitor for home of dallas"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"april\" WHERE \"home\"='dallas';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chart_performance\" (\n \"country\" text,\n \"chart\" text,\n \"period\" text,\n \"peak_position\" text,\n \"sales\" text\n);\n\nQuestion: Name the period for south korea with peak position of #1"
},
{
"role": "assistant",
"content": "SELECT \"period\" FROM \"chart_performance\" WHERE \"country\"='south korea' AND \"peak_position\"='#1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chart_performance\" (\n \"country\" text,\n \"chart\" text,\n \"period\" text,\n \"peak_position\" text,\n \"sales\" text\n);\n\nQuestion: Name the period for south korea with peak position of #24"
},
{
"role": "assistant",
"content": "SELECT \"period\" FROM \"chart_performance\" WHERE \"country\"='south korea' AND \"peak_position\"='#24';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chart_performance\" (\n \"country\" text,\n \"chart\" text,\n \"period\" text,\n \"peak_position\" text,\n \"sales\" text\n);\n\nQuestion: Name the period for Chart of g-music j-pop/k-pop chart"
},
{
"role": "assistant",
"content": "SELECT \"period\" FROM \"chart_performance\" WHERE \"chart\"='g-music j-pop/k-pop chart';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chart_performance\" (\n \"country\" text,\n \"chart\" text,\n \"period\" text,\n \"peak_position\" text,\n \"sales\" text\n);\n\nQuestion: Name the sales with peak position of #24"
},
{
"role": "assistant",
"content": "SELECT \"sales\" FROM \"chart_performance\" WHERE \"peak_position\"='#24';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_record\" (\n \"round\" text,\n \"club\" text,\n \"home\" text,\n \"away\" text,\n \"aggregate\" text\n);\n\nQuestion: Which aggregate has ajax as the club?"
},
{
"role": "assistant",
"content": "SELECT \"aggregate\" FROM \"european_record\" WHERE \"club\"='ajax';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: How many attended on march 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"march\" WHERE \"date\"='march 1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the visitor on march 21?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"march\" WHERE \"date\"='march 21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_standings\" (\n \"cyclist\" text,\n \"nation\" text,\n \"team\" text,\n \"time\" text,\n \"uci_points\" real\n);\n\nQuestion: Who was the cyclist from Belgium?"
},
{
"role": "assistant",
"content": "SELECT \"cyclist\" FROM \"general_standings\" WHERE \"nation\"='belgium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_standings\" (\n \"cyclist\" text,\n \"nation\" text,\n \"team\" text,\n \"time\" text,\n \"uci_points\" real\n);\n\nQuestion: What is the nation of the person who was from the CSC team?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"general_standings\" WHERE \"team\"='csc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_standings\" (\n \"cyclist\" text,\n \"nation\" text,\n \"team\" text,\n \"time\" text,\n \"uci_points\" real\n);\n\nQuestion: Who is the cyclist from the GCE team and had UCI points under 20?"
},
{
"role": "assistant",
"content": "SELECT \"cyclist\" FROM \"general_standings\" WHERE \"team\"='gce' AND \"uci_points\"<20;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_standings\" (\n \"cyclist\" text,\n \"nation\" text,\n \"team\" text,\n \"time\" text,\n \"uci_points\" real\n);\n\nQuestion: Which nation is Danilo di Luca from?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"general_standings\" WHERE \"cyclist\"='danilo di luca';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_standings\" (\n \"cyclist\" text,\n \"nation\" text,\n \"team\" text,\n \"time\" text,\n \"uci_points\" real\n);\n\nQuestion: Which nation is Robert Gesink from?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"general_standings\" WHERE \"cyclist\"='robert gesink';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_standings\" (\n \"cyclist\" text,\n \"nation\" text,\n \"team\" text,\n \"time\" text,\n \"uci_points\" real\n);\n\nQuestion: What is the sum of UCI points for Kim Kirchen?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"uci_points\") FROM \"general_standings\" WHERE \"cyclist\"='kim kirchen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"rank\" real,\n \"player\" text,\n \"years\" text,\n \"games\" real,\n \"ast_avg\" real,\n \"total_assists\" real\n);\n\nQuestion: How many games for the player that has an over 2.7 assist average and over 598 total assists?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"games\") FROM \"assists\" WHERE \"ast_avg\">2.7 AND \"total_assists\">598;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"rank\" real,\n \"player\" text,\n \"years\" text,\n \"games\" real,\n \"ast_avg\" real,\n \"total_assists\" real\n);\n\nQuestion: How many assists does cam long average in under 132 games?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"ast_avg\") FROM \"assists\" WHERE \"player\"='cam long' AND \"games\"<132;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stadiums\" (\n \"rank\" real,\n \"stadium\" text,\n \"total_capacity\" text,\n \"seating_capacity\" real,\n \"location\" text\n);\n\nQuestion: Where is the Stadium of Gortakeegan located?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"stadiums\" WHERE \"stadium\"='gortakeegan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stadiums\" (\n \"rank\" real,\n \"stadium\" text,\n \"total_capacity\" text,\n \"seating_capacity\" real,\n \"location\" text\n);\n\nQuestion: What is the lowest ranking seating capacity smaller than 7,485, and a stadium at St. Colman's Park?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"stadiums\" WHERE \"seating_capacity\"<'7,485' AND \"stadium\"='st. colman''s park';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: In 1972, how many points did the entrant with the March 721G Chassis have?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"complete_formula_one_results\" WHERE \"year\">1972 AND \"chassis\"='march 721g';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: In 1971, how many total points did the entrant stp march have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"complete_formula_one_results\" WHERE \"entrant\"='stp march' AND \"year\">1971;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which Chassis was featured in the year 1971?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_results\" WHERE \"year\"=1971;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which Chassis did the Entrant clarke-mordaunt-guthrie-durlacher carry?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_results\" WHERE \"entrant\"='clarke-mordaunt-guthrie-durlacher';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_stats\" (\n \"player\" text,\n \"l_apps\" real,\n \"c_apps\" real,\n \"total_apps\" real,\n \"total_g\" real\n);\n\nQuestion: What is Bartolo's Total G when his L Apps is 29 and his C Apps are larger than 5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total_g\") FROM \"squad_stats\" WHERE \"l_apps\"=29 AND \"player\"='bartolo' AND \"c_apps\">5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_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 is the lowest round for Southern College?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"indianapolis_colts_draft_history\" WHERE \"college\"='southern';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Who had the placekicker position with a round above 10?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"indianapolis_colts_draft_history\" WHERE \"round\">10 AND \"position\"='placekicker';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_10_5_5\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the partner of the team that faced the guillermo garc\u00eda-l\u00f3pez albert portas on clay?"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"doubles_10_5_5\" WHERE \"surface\"='clay' AND \"opponents\"='guillermo garc\u00eda-l\u00f3pez albert portas';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_10_5_5\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What are the dates where the opponent was guillermo garc\u00eda-l\u00f3pez albert portas?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"doubles_10_5_5\" WHERE \"opponents\"='guillermo garc\u00eda-l\u00f3pez albert portas';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What is the earliest year in the 125cc class with more than 102 points and a rank of 2nd?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"grand_prix_career_statistics\" WHERE \"class\"='125cc' AND \"points\">102 AND \"rank\"='2nd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: Which team had fewer than 167 points in the 250cc class?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"grand_prix_career_statistics\" WHERE \"points\"<167 AND \"class\"='250cc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: For years before 1996, having a rank of 3rd in the 125cc class, what is the sum of the points?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"grand_prix_career_statistics\" WHERE \"class\"='125cc' AND \"rank\"='3rd' AND \"year\"<1996;"
}
]
|
[
{
"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 \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: Who did the Raiders play in week 12?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"=12;"
}
]
|
[
{
"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 \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: How many people were at the game that took place at the Kingdome?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"game_site\"='the kingdome';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_championship\" (\n \"team\" text,\n \"car_no\" text,\n \"mnz_spr\" text,\n \"mnz_fea\" text,\n \"spa_spr\" text,\n \"spa_fea\" text,\n \"mon_fea\" text,\n \"sil_spr\" text,\n \"sil_fea\" text,\n \"hun_spr\" text,\n \"hun_fea\" text,\n \"lms_spr\" text,\n \"lms_fea\" text,\n \"cat_spr\" text,\n \"cat_fea\" text,\n \"points\" text\n);\n\nQuestion: Which is the LMS SPR when the car number was 15?"
},
{
"role": "assistant",
"content": "SELECT \"lms_spr\" FROM \"teams_championship\" WHERE \"car_no\"='15';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_championship\" (\n \"team\" text,\n \"car_no\" text,\n \"mnz_spr\" text,\n \"mnz_fea\" text,\n \"spa_spr\" text,\n \"spa_fea\" text,\n \"mon_fea\" text,\n \"sil_spr\" text,\n \"sil_fea\" text,\n \"hun_spr\" text,\n \"hun_fea\" text,\n \"lms_spr\" text,\n \"lms_fea\" text,\n \"cat_spr\" text,\n \"cat_fea\" text,\n \"points\" text\n);\n\nQuestion: When the CAT FEA is 3 how many points were scored?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"teams_championship\" WHERE \"cat_fea\"='3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_championship\" (\n \"team\" text,\n \"car_no\" text,\n \"mnz_spr\" text,\n \"mnz_fea\" text,\n \"spa_spr\" text,\n \"spa_fea\" text,\n \"mon_fea\" text,\n \"sil_spr\" text,\n \"sil_fea\" text,\n \"hun_spr\" text,\n \"hun_fea\" text,\n \"lms_spr\" text,\n \"lms_fea\" text,\n \"cat_spr\" text,\n \"cat_fea\" text,\n \"points\" text\n);\n\nQuestion: What was the SPA FEA when the LMS FEA was 5?"
},
{
"role": "assistant",
"content": "SELECT \"spa_fea\" FROM \"teams_championship\" WHERE \"lms_fea\"='5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_championship\" (\n \"team\" text,\n \"car_no\" text,\n \"mnz_spr\" text,\n \"mnz_fea\" text,\n \"spa_spr\" text,\n \"spa_fea\" text,\n \"mon_fea\" text,\n \"sil_spr\" text,\n \"sil_fea\" text,\n \"hun_spr\" text,\n \"hun_fea\" text,\n \"lms_spr\" text,\n \"lms_fea\" text,\n \"cat_spr\" text,\n \"cat_fea\" text,\n \"points\" text\n);\n\nQuestion: What was the MNZ FEA when the SIL SPR was 18?"
},
{
"role": "assistant",
"content": "SELECT \"mnz_fea\" FROM \"teams_championship\" WHERE \"sil_spr\"='18';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"major_sports_teams\" (\n \"club\" text,\n \"sport\" text,\n \"league\" text,\n \"venue\" text,\n \"championships_years\" text\n);\n\nQuestion: Which years did the Tampa Bay Storm win the Championships?"
},
{
"role": "assistant",
"content": "SELECT \"championships_years\" FROM \"major_sports_teams\" WHERE \"club\"='tampa bay storm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fiba_euro_basket_2007_squads\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born\" real,\n \"current_club\" text\n);\n\nQuestion: What is the height of the person born before 1975?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"fiba_euro_basket_2007_squads\" WHERE \"year_born\"<1975;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sources\" (\n \"name\" text,\n \"party\" text,\n \"province\" text,\n \"term_expires\" real,\n \"term_of_office\" text\n);\n\nQuestion: How many times did Ken Wright expired in North Western?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"term_expires\") FROM \"sources\" WHERE \"province\"='north western' AND \"name\"='ken wright';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"birds\" (\n \"species\" text,\n \"order\" text,\n \"family\" text,\n \"species_worldwide\" real,\n \"species_on_r_union\" real\n);\n\nQuestion: Which species on R\u00e9union island is part of the procellariiformes order and is part of the hydrobatidae family and has less than 21 species worldwide?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"species_on_r_union\") FROM \"birds\" WHERE \"order\"='procellariiformes' AND \"family\"='hydrobatidae' AND \"species_worldwide\"<21;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"birds\" (\n \"species\" text,\n \"order\" text,\n \"family\" text,\n \"species_worldwide\" real,\n \"species_on_r_union\" real\n);\n\nQuestion: How many species does the sternidae family have worldwide with less than 9 species on R\u00e9union?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"species_worldwide\") FROM \"birds\" WHERE \"family\"='sternidae' AND \"species_on_r_union\"<9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"birds\" (\n \"species\" text,\n \"order\" text,\n \"family\" text,\n \"species_worldwide\" real,\n \"species_on_r_union\" real\n);\n\nQuestion: How many species on R\u00e9union do the dromadidae family have with a worldwide speices larger than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"species_on_r_union\") FROM \"birds\" WHERE \"family\"='dromadidae' AND \"species_worldwide\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2008\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the 2010 with tournament of grand slam tournaments"
},
{
"role": "assistant",
"content": "SELECT \"2010\" FROM \"doubles_performance_timeline\" WHERE \"tournament\"='grand slam tournaments';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2008\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the 2008 with 2010 of 2r and wimbledon tournament"
},
{
"role": "assistant",
"content": "SELECT \"2008\" FROM \"doubles_performance_timeline\" WHERE \"2010\"='2r' AND \"tournament\"='wimbledon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2008\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the 2013 for 2010 of 1r"
},
{
"role": "assistant",
"content": "SELECT \"2013\" FROM \"doubles_performance_timeline\" WHERE \"2010\"='1r';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2008\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the 2010 for 2008 of 1r and tournament of us open"
},
{
"role": "assistant",
"content": "SELECT \"2010\" FROM \"doubles_performance_timeline\" WHERE \"2008\"='1r' AND \"2011\"='1r' AND \"tournament\"='us open';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"waitomo_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which years have a Decile of 4, an Authority of state, and a Name of mapiu school?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"waitomo_district\" WHERE \"decile\"=4 AND \"authority\"='state' AND \"name\"='mapiu school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"waitomo_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which years have a Decile smaller than 6, an Area of te kuiti, and an Authority of state integrated?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"waitomo_district\" WHERE \"decile\"<6 AND \"area\"='te kuiti' AND \"authority\"='state integrated';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"waitomo_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the average Decile with a state authority and a Name of mapiu school?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"decile\") FROM \"waitomo_district\" WHERE \"authority\"='state' AND \"name\"='mapiu school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"waitomo_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which years have an Area of rangitoto?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"waitomo_district\" WHERE \"area\"='rangitoto';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"waitomo_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which gender has a Name of rangitoto school?"
},
{
"role": "assistant",
"content": "SELECT \"gender\" FROM \"waitomo_district\" WHERE \"name\"='rangitoto school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the t o par for Ralph Guldahl?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_leaderboard\" WHERE \"player\"='ralph guldahl';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.