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 \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many Laps have Rider of olivier jacque, and a Grid larger than 7?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"moto_gp_classification\" WHERE \"rider\"='olivier jacque' AND \"grid\">7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which Laps have a Manufacturer of suzuki, and a Grid smaller than 16?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"moto_gp_classification\" WHERE \"manufacturer\"='suzuki' AND \"grid\"<16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many Laps have a Grid larger than 9, and a Time/Retired of +32.354?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"moto_gp_classification\" WHERE \"grid\">9 AND \"time_retired\"='+32.354';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Record, when Date is Oct 19?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"season_schedule\" WHERE \"date\"='oct 19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Attendance, when Opponent is Montreal Alouettes, and when Date is Oct 4?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"season_schedule\" WHERE \"opponent\"='montreal alouettes' AND \"date\"='oct 4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Opponent, when Result is Win, and when Date is Aug 7?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"season_schedule\" WHERE \"result\"='win' AND \"date\"='aug 7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" real,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: what is the date when the score is 115-93?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_9\" WHERE \"score\"='115-93';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" real,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: what is the average crowd when the away team is new zealand breakers and the venue is cairns convention centre?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_9\" WHERE \"away_team\"='new zealand breakers' AND \"venue\"='cairns convention centre';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" real,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: how many times is the home team wollongong hawks?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_9\" WHERE \"home_team\"='wollongong hawks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" real,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: what is the date when the venue is gold coast convention centre?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_9\" WHERE \"venue\"='gold coast convention centre';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Score has Points smaller than 67, and a Home of calgary flames?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"points\"<67 AND \"home\"='calgary flames';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Whic Date has a Score of 4\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"score\"='4\u20132';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Decision has a Record of 29\u201318\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"decision\" FROM \"game_log\" WHERE \"record\"='29\u201318\u20136';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Date has a Score of 4\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"score\"='4\u20132';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_coaches\" (\n \"name\" text,\n \"years\" text,\n \"seasons\" real,\n \"lost\" real,\n \"pct\" real\n);\n\nQuestion: How many losses did the coach who served under 1 season and in 1975 have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lost\") FROM \"head_coaches\" WHERE \"years\"='1975' AND \"seasons\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_coaches\" (\n \"name\" text,\n \"years\" text,\n \"seasons\" real,\n \"lost\" real,\n \"pct\" real\n);\n\nQuestion: What is the number of seasons coached by Kathy Graham?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"seasons\") FROM \"head_coaches\" WHERE \"name\"='kathy graham';"
}
] |
[
{
"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\" text\n);\n\nQuestion: What is the result on September 25, 1966?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='september 25, 1966';"
}
] |
[
{
"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\" text\n);\n\nQuestion: What is the attendance of the game on November 20, 1966 after week 10?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\">10 AND \"date\"='november 20, 1966';"
}
] |
[
{
"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\" text\n);\n\nQuestion: Who is the opponent on week 2?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"=2;"
}
] |
[
{
"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\" text\n);\n\nQuestion: Who is the opponent on November 20, 1966?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='november 20, 1966';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the attendance of the game with the NY Islanders as home team?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"regular_season\" WHERE \"home\"='ny islanders';"
}
] |
[
{
"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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the game against seattle?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"regular_season\" WHERE \"opponent\"='seattle';"
}
] |
[
{
"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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who were the opponents during game 30?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the record during the game with a score of 78-59?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"score\"='78-59';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"city\" text,\n \"state_province\" text,\n \"league\" text,\n \"est\" text\n);\n\nQuestion: Which mlb team is located in maryland?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"teams\" WHERE \"state_province\"='maryland' AND \"league\"='mlb';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"city\" text,\n \"state_province\" text,\n \"league\" text,\n \"est\" text\n);\n\nQuestion: What team is located in brooklyn?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"teams\" WHERE \"city\"='brooklyn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"city\" text,\n \"state_province\" text,\n \"league\" text,\n \"est\" text\n);\n\nQuestion: In what year was the cfl team in edmonton, alberta established?"
},
{
"role": "assistant",
"content": "SELECT \"est\" FROM \"teams\" WHERE \"state_province\"='alberta' AND \"league\"='cfl' AND \"city\"='edmonton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"city\" text,\n \"state_province\" text,\n \"league\" text,\n \"est\" text\n);\n\nQuestion: In what year was the NFL team in chicago illinois established?"
},
{
"role": "assistant",
"content": "SELECT \"est\" FROM \"teams\" WHERE \"state_province\"='illinois' AND \"city\"='chicago' AND \"league\"='nfl';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"city\" text,\n \"state_province\" text,\n \"league\" text,\n \"est\" text\n);\n\nQuestion: Which team is located in missouri and was established in 1963?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"teams\" WHERE \"state_province\"='missouri' AND \"est\"='1963';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"date\" text,\n \"round\" text,\n \"name\" text,\n \"nationality\" text,\n \"time\" text,\n \"record\" text\n);\n\nQuestion: Which event was Ye Shiwen in?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"women\" WHERE \"name\"='ye shiwen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"date\" text,\n \"round\" text,\n \"name\" text,\n \"nationality\" text,\n \"time\" text,\n \"record\" text\n);\n\nQuestion: Who had a time of 26.11?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"women\" WHERE \"time\"='26.11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"date\" text,\n \"round\" text,\n \"name\" text,\n \"nationality\" text,\n \"time\" text,\n \"record\" text\n);\n\nQuestion: What was the date in which the time was 2:16.08?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"women\" WHERE \"time\"='2:16.08';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"date\" text,\n \"round\" text,\n \"name\" text,\n \"nationality\" text,\n \"time\" text,\n \"record\" text\n);\n\nQuestion: Who was in the women's 200m medley?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"women\" WHERE \"event\"='women''s 200m medley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"date\" text,\n \"round\" text,\n \"name\" text,\n \"nationality\" text,\n \"time\" text,\n \"record\" text\n);\n\nQuestion: What was the nationality of the swimmer in the semifinal with a time of 29.51?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"women\" WHERE \"round\"='semifinal' AND \"time\"='29.51';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What country scored 67?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"first_round\" WHERE \"score\"=67;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What was the to par for Tino Schuster?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"player\"='tino schuster';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What country has player Scott Verplank?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"first_round\" WHERE \"player\"='scott verplank';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"glycosylases_in_bacteria_yeast_and_human\" (\n \"e_coli\" text,\n \"yeast_s_cerevisiae\" text,\n \"human\" text,\n \"type\" text,\n \"substrates\" text\n);\n\nQuestion: What is the type of glycosylase that has an E. coli of Muty?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"glycosylases_in_bacteria_yeast_and_human\" WHERE \"e_coli\"='muty';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"glycosylases_in_bacteria_yeast_and_human\" (\n \"e_coli\" text,\n \"yeast_s_cerevisiae\" text,\n \"human\" text,\n \"type\" text,\n \"substrates\" text\n);\n\nQuestion: Which E. coli has a human value of HNEIL1?"
},
{
"role": "assistant",
"content": "SELECT \"e_coli\" FROM \"glycosylases_in_bacteria_yeast_and_human\" WHERE \"human\"='hneil1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"glycosylases_in_bacteria_yeast_and_human\" (\n \"e_coli\" text,\n \"yeast_s_cerevisiae\" text,\n \"human\" text,\n \"type\" text,\n \"substrates\" text\n);\n\nQuestion: Which E. coli has a substrate of uracil?"
},
{
"role": "assistant",
"content": "SELECT \"e_coli\" FROM \"glycosylases_in_bacteria_yeast_and_human\" WHERE \"substrates\"='uracil';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: The tko (doctor stoppage) method was used in a loss against which opponent?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='tko (doctor stoppage)' AND \"res\"='loss';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: How many total rounds used the submission (choke) method?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"method\"='submission (choke)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the time of the match with a record of 9-0 and used the tko (doctor stoppage) method?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='tko (doctor stoppage)' AND \"record\"='9-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the lowest round number at the UFC 16 event with a record of 19-1-1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"event\"='ufc 16' AND \"record\"='19-1-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"eagles_points\" real,\n \"opponents\" real,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What was the highest number of oppenents points recorded for game 9 when the attendance was less than 60,091?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"opponents\") FROM \"schedule\" WHERE \"game\"=9 AND \"attendance\"<'60,091';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text\n);\n\nQuestion: What event did tedd williams fight bill parker?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='bill parker';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text\n);\n\nQuestion: What round did the fight against travis fulton last?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='travis fulton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many times is the player scott deibert?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick_num\") FROM \"round_three\" WHERE \"player\"='scott deibert';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: what is the pick # for william loftus?"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"round_three\" WHERE \"player\"='william loftus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: what is the cfl team for position d?"
},
{
"role": "assistant",
"content": "SELECT \"cfl_team\" FROM \"round_three\" WHERE \"position\"='d';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_division\" (\n \"scorer\" text,\n \"club\" text,\n \"league_goals\" text,\n \"fa_cup_goals\" real,\n \"league_cup_goals\" real,\n \"euro_competitions\" text,\n \"total\" real\n);\n\nQuestion: what was the total for the Wolverhampton Wanderers?"
},
{
"role": "assistant",
"content": "SELECT \"league_goals\" FROM \"first_division\" WHERE \"club\"='wolverhampton wanderers';"
}
] |
[
{
"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: How many were in attendance when the result was l 20-17?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"result\"='l 20-17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s\" (\n \"skip\" text,\n \"third_vice_skip\" text,\n \"second\" text,\n \"lead\" text,\n \"city\" text\n);\n\nQuestion: Which Third/Vice skip has a Second of \u00e9ric sylvain?"
},
{
"role": "assistant",
"content": "SELECT \"third_vice_skip\" FROM \"men_s\" WHERE \"second\"='\u00e9ric sylvain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s\" (\n \"skip\" text,\n \"third_vice_skip\" text,\n \"second\" text,\n \"lead\" text,\n \"city\" text\n);\n\nQuestion: Which Lead has a Skip of mike mcewen?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"men_s\" WHERE \"skip\"='mike mcewen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s\" (\n \"skip\" text,\n \"third_vice_skip\" text,\n \"second\" text,\n \"lead\" text,\n \"city\" text\n);\n\nQuestion: Which City has a Lead of steve gould?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"men_s\" WHERE \"lead\"='steve gould';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s\" (\n \"skip\" text,\n \"third_vice_skip\" text,\n \"second\" text,\n \"lead\" text,\n \"city\" text\n);\n\nQuestion: Which Lead has a City of winnipeg, and a Third/Vice skip of kevin park?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"men_s\" WHERE \"city\"='winnipeg' AND \"third_vice_skip\"='kevin park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s\" (\n \"skip\" text,\n \"third_vice_skip\" text,\n \"second\" text,\n \"lead\" text,\n \"city\" text\n);\n\nQuestion: Which City has a Lead of tyler forrest?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"men_s\" WHERE \"lead\"='tyler forrest';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s\" (\n \"skip\" text,\n \"third_vice_skip\" text,\n \"second\" text,\n \"lead\" text,\n \"city\" text\n);\n\nQuestion: Which Lead has a Skip of ted appelman?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"men_s\" WHERE \"skip\"='ted appelman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_first_week_sales\" (\n \"number\" real,\n \"artist\" text,\n \"album\" text,\n \"1st_week_sales\" real,\n \"1st_week_position\" text\n);\n\nQuestion: Which album is #10?"
},
{
"role": "assistant",
"content": "SELECT \"album\" FROM \"highest_first_week_sales\" WHERE \"number\"=10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Ben Hogan's Place?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"third_round\" WHERE \"player\"='ben hogan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Jerry Barber's To par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"player\"='jerry barber';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the Score of T2 Place Player Dow Finsterwald?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"third_round\" WHERE \"place\"='t2' AND \"player\"='dow finsterwald';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What's the to par of the United States with the score of 71-71=142?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"country\"='united states' AND \"score\"='71-71=142';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What place had a score of 71-70=141?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"score\"='71-70=141';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which player had a score of 72-69=141?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"score\"='72-69=141';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the score of T7 place?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"place\"='t7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What place is Ben Hogan?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"player\"='ben hogan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What place has a to par of E?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"to_par\"='e';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What pick was J.D. Hill?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick\") FROM \"nfl_draft\" WHERE \"player\"='j.d. hill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What pick was used to select a Defensive End in round 8?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pick\") FROM \"nfl_draft\" WHERE \"position\"='defensive end' AND \"round\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kentucky_derby_winners\" (\n \"year\" text,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: which winner has a jockery containing jerry bailey and the owner of overbrook farm?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"kentucky_derby_winners\" WHERE \"jockey\"='jerry bailey' AND \"owner\"='overbrook farm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kentucky_derby_winners\" (\n \"year\" text,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: What time contains the owner of maine chance farm?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"kentucky_derby_winners\" WHERE \"owner\"='maine chance farm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kentucky_derby_winners\" (\n \"year\" text,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: Which time contains the jockery of isaac murphy as well as the winner of kingman?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"kentucky_derby_winners\" WHERE \"jockey\"='isaac murphy' AND \"winner\"='kingman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kentucky_derby_winners\" (\n \"year\" text,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: Which owner has the time of 2:02.20 and the year of 1957?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"kentucky_derby_winners\" WHERE \"time\"='2:02.20' AND \"year\"='1957';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kentucky_derby_winners\" (\n \"year\" text,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: Which owner has the time 2:03.00 and the year of 1991 kd?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"kentucky_derby_winners\" WHERE \"time\"='2:03.00' AND \"year\"='1991 kd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the sum of the number played with more than 5 losses, more than 1 draw, and a position under 8?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"played\") FROM \"main_round\" WHERE \"lost\">5 AND \"position\"<8 AND \"drawn\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the average number of points with less than 1 draw and more than 11 losses for Ev Aich?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"main_round\" WHERE \"drawn\"<1 AND \"name\"='ev aich' AND \"lost\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: What is the sum of points for a position over 5 with more than 2 draws?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"main_round\" WHERE \"drawn\">2 AND \"position\">5;"
}
] |
[
{
"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: Which nation won no bronze medals and a 1 medal total?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"medal_table\" WHERE \"total\"=1 AND \"bronze\"<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 was the result of the game in week 4?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"municipalities\" (\n \"municipality\" text,\n \"inhabitants\" real,\n \"mayor\" text,\n \"party\" text,\n \"election\" real\n);\n\nQuestion: What party has more than 241,310 inhabitants after 2012?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"municipalities\" WHERE \"election\">2012 AND \"inhabitants\">'241,310';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"municipalities\" (\n \"municipality\" text,\n \"inhabitants\" real,\n \"mayor\" text,\n \"party\" text,\n \"election\" real\n);\n\nQuestion: Highest inhabitants from gela?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"inhabitants\") FROM \"municipalities\" WHERE \"municipality\"='gela';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tables\" (\n \"date\" text,\n \"number\" text,\n \"type\" text,\n \"captain\" text,\n \"casualties\" real\n);\n\nQuestion: What is the average number of casualties for the convoy with a number of U-844?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"casualties\") FROM \"tables\" WHERE \"number\"='u-844';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"runners_up\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: On what Surface was the match against Ilija Bozoljac played?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"runners_up\" WHERE \"opponent\"='ilija bozoljac';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"runners_up\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What Tournament was against Daniel Elsner?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"runners_up\" WHERE \"opponent\"='daniel elsner';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"runners_up\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the Date of the Tournament with a Score of 3\u20136, 7\u20136(6), 5\u20137?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"runners_up\" WHERE \"score\"='3\u20136, 7\u20136(6), 5\u20137';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"runners_up\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the Opponent of the Banja Luka Tournament with a Score of 4\u20136, 4\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"runners_up\" WHERE \"score\"='4\u20136, 4\u20136' AND \"tournament\"='banja luka';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_records\" (\n \"event\" text,\n \"time\" text,\n \"name\" text,\n \"nation\" text,\n \"games\" text,\n \"date\" text\n);\n\nQuestion: On what date was the record set with a time of 1:07.18?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"men_s_records\" WHERE \"time\"='1:07.18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_records\" (\n \"event\" text,\n \"time\" text,\n \"name\" text,\n \"nation\" text,\n \"games\" text,\n \"date\" text\n);\n\nQuestion: On what date was a record set in the team pursuit (8 laps) event?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"men_s_records\" WHERE \"event\"='team pursuit (8 laps)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_records\" (\n \"event\" text,\n \"time\" text,\n \"name\" text,\n \"nation\" text,\n \"games\" text,\n \"date\" text\n);\n\nQuestion: What nation did the speed skater that set a record in the 1000 metres event represent?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"men_s_records\" WHERE \"event\"='1000 metres';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_records\" (\n \"event\" text,\n \"time\" text,\n \"name\" text,\n \"nation\" text,\n \"games\" text,\n \"date\" text\n);\n\nQuestion: What was the record setting time in the team pursuit (8 laps) event?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"men_s_records\" WHERE \"event\"='team pursuit (8 laps)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_league\" (\n \"team\" text,\n \"match\" real,\n \"points\" real,\n \"draw\" real,\n \"lost\" real\n);\n\nQuestion: What is the total for the draw with 0 points, and less than 14 lost?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"draw\") FROM \"second_league\" WHERE \"points\"=0 AND \"lost\"<14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What date has @ new orleans as the team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"team\"='@ new orleans';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the sum of the game with the boston bruins as the opponent?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"game\") FROM \"game_log\" WHERE \"opponent\"='boston bruins';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the total number of games at Toronto with less than 31 points?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"game\") FROM \"game_log\" WHERE \"location\"='toronto' AND \"points\"<31;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the record of the game with a game number greater than 36 on January 20 at scotiabank place with an attendance greater than 19,029?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"game\">36 AND \"location\"='scotiabank place' AND \"attendance\">'19,029' AND \"date\"='january 20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"h\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What is the nationality of the PG position from VCU?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"h\" WHERE \"position\"='pg' AND \"from\"='vcu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"h\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What years did jersey number 55 play?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"h\" WHERE \"jersey_number_s\"='55';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"h\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What are the Jersey numbers for Notre Dame?"
},
{
"role": "assistant",
"content": "SELECT \"jersey_number_s\" FROM \"h\" WHERE \"from\"='notre dame';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text\n);\n\nQuestion: Before 2007, what was the avg start that had a pole of 0 and in 65th position?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"starts\") FROM \"nascar_sprint_cup_series\" WHERE \"poles\"=0 AND \"position\"='65th' AND \"year\"<2007;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.