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 \"doubles_finals\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: In the match played with partner Andres Molteni, with the outcome of winner, who was the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"doubles_finals\" WHERE \"outcome\"='winner' AND \"partner\"='andres molteni';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_caps\" (\n \"player\" text,\n \"span\" text,\n \"start\" text,\n \"tries\" text,\n \"conv\" text,\n \"pens\" text,\n \"drop\" text,\n \"lost\" text,\n \"draw\" text\n);\n\nQuestion: What is the player with a Span of 1998-2009?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"most_caps\" WHERE \"span\"='1998-2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_caps\" (\n \"player\" text,\n \"span\" text,\n \"start\" text,\n \"tries\" text,\n \"conv\" text,\n \"pens\" text,\n \"drop\" text,\n \"lost\" text,\n \"draw\" text\n);\n\nQuestion: What draw has a Span of 1987-1999?"
},
{
"role": "assistant",
"content": "SELECT \"draw\" FROM \"most_caps\" WHERE \"span\"='1987-1999';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_caps\" (\n \"player\" text,\n \"span\" text,\n \"start\" text,\n \"tries\" text,\n \"conv\" text,\n \"pens\" text,\n \"drop\" text,\n \"lost\" text,\n \"draw\" text\n);\n\nQuestion: What player has a span of 1997-2009?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"most_caps\" WHERE \"span\"='1997-2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_caps\" (\n \"player\" text,\n \"span\" text,\n \"start\" text,\n \"tries\" text,\n \"conv\" text,\n \"pens\" text,\n \"drop\" text,\n \"lost\" text,\n \"draw\" text\n);\n\nQuestion: What drop has a 0 conv and Tries of 6?"
},
{
"role": "assistant",
"content": "SELECT \"drop\" FROM \"most_caps\" WHERE \"conv\"='0' AND \"tries\"='6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_caps\" (\n \"player\" text,\n \"span\" text,\n \"start\" text,\n \"tries\" text,\n \"conv\" text,\n \"pens\" text,\n \"drop\" text,\n \"lost\" text,\n \"draw\" text\n);\n\nQuestion: What drop had a start of 40?"
},
{
"role": "assistant",
"content": "SELECT \"drop\" FROM \"most_caps\" WHERE \"start\"='40';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_caps\" (\n \"player\" text,\n \"span\" text,\n \"start\" text,\n \"tries\" text,\n \"conv\" text,\n \"pens\" text,\n \"drop\" text,\n \"lost\" text,\n \"draw\" text\n);\n\nQuestion: What drop had 0 pens, 1 draw, and 8 tries?"
},
{
"role": "assistant",
"content": "SELECT \"drop\" FROM \"most_caps\" WHERE \"pens\"='0' AND \"draw\"='1' AND \"tries\"='8';"
}
] |
[
{
"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 \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What round did Takayo Hashi face Yoko Hattori?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='yoko hattori';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away team that played at Princes Park?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_2\" WHERE \"venue\"='princes park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the date when Footscray was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_2\" WHERE \"away_team\"='footscray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team's score in the match at Victoria Park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_2\" WHERE \"venue\"='victoria park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: On what date was South Melbourne the away team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_2\" WHERE \"away_team\"='south melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: At what venue did the home team score 12.19 (91)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_2\" WHERE \"home_team_score\"='12.19 (91)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What away team did Carlton play?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_2\" WHERE \"home_team\"='carlton';"
}
] |
[
{
"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 is the sum of bronze when silver is greater than 3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"bronze\") FROM \"medals_table\" WHERE \"silver\">3;"
}
] |
[
{
"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 is the average total when gold is 0, bronze is 0, and silver is smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"medals_table\" WHERE \"gold\"=0 AND \"bronze\"=0 AND \"silver\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_by_game_results\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"stadium\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What was the total attendance in week 8?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"game_by_game_results\" WHERE \"week\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_international_matches\" (\n \"date\" real,\n \"sport\" text,\n \"winner\" text,\n \"score\" text,\n \"loser\" text\n);\n\nQuestion: Who was the winner in 2007?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"list_of_international_matches\" WHERE \"date\"=2007;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_international_matches\" (\n \"date\" real,\n \"sport\" text,\n \"winner\" text,\n \"score\" text,\n \"loser\" text\n);\n\nQuestion: What sport was played before 2006 with a loser of france b?"
},
{
"role": "assistant",
"content": "SELECT \"sport\" FROM \"list_of_international_matches\" WHERE \"date\"<2006 AND \"loser\"='france b';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_international_matches\" (\n \"date\" real,\n \"sport\" text,\n \"winner\" text,\n \"score\" text,\n \"loser\" text\n);\n\nQuestion: Who was the winner with the loser being russia-2?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"list_of_international_matches\" WHERE \"loser\"='russia-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_international_matches\" (\n \"date\" real,\n \"sport\" text,\n \"winner\" text,\n \"score\" text,\n \"loser\" text\n);\n\nQuestion: Who was the loser playing football with england b as a winner after 1992?"
},
{
"role": "assistant",
"content": "SELECT \"loser\" FROM \"list_of_international_matches\" WHERE \"sport\"='football' AND \"winner\"='england b' AND \"date\">1992;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"sanctioning\" text,\n \"race_name\" text,\n \"circuit\" text,\n \"city_location\" text,\n \"date\" text\n);\n\nQuestion: What was the name of the race that occurred in Brooklyn, Michigan with a sanctioning of cart?"
},
{
"role": "assistant",
"content": "SELECT \"race_name\" FROM \"calendar\" WHERE \"sanctioning\"='cart' AND \"city_location\"='brooklyn, michigan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"sanctioning\" text,\n \"race_name\" text,\n \"circuit\" text,\n \"city_location\" text,\n \"date\" text\n);\n\nQuestion: Where did the Gould Rex Mays Classic 150 occur?"
},
{
"role": "assistant",
"content": "SELECT \"city_location\" FROM \"calendar\" WHERE \"race_name\"='gould rex mays classic 150';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"sanctioning\" text,\n \"race_name\" text,\n \"circuit\" text,\n \"city_location\" text,\n \"date\" text\n);\n\nQuestion: What is the date for the race that has a circuit of Milwaukee Mile and the sanctioning of cart?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"calendar\" WHERE \"circuit\"='milwaukee mile' AND \"sanctioning\"='cart';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"albums\" (\n \"year\" text,\n \"us_200\" text,\n \"uk_albums\" text,\n \"riaa_certification\" text,\n \"bpi_certification\" text\n);\n\nQuestion: 15 albums were released in the UK during which year?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"albums\" WHERE \"uk_albums\"='15';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the venue where Collingwood played as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_13\" WHERE \"home_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team for the game where the home team scored 13.11 (89)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_13\" WHERE \"home_team_score\"='13.11 (89)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the size of the crowd for the game with Footscray as the home team?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_13\" WHERE \"home_team\"='footscray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the largest crowd for any game where Footscray is the home team?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_13\" WHERE \"home_team\"='footscray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"australasia_pool_a\" (\n \"club\" text,\n \"played\" real,\n \"lost\" real,\n \"drawn\" real,\n \"against\" real,\n \"diff\" real,\n \"points\" real\n);\n\nQuestion: What is the maximum number of draws when the diff is smaller than 186, points are fewer than 12 and games played fewer than 6?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"drawn\") FROM \"australasia_pool_a\" WHERE \"diff\"<186 AND \"points\"<12 AND \"played\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"australasia_pool_a\" (\n \"club\" text,\n \"played\" real,\n \"lost\" real,\n \"drawn\" real,\n \"against\" real,\n \"diff\" real,\n \"points\" real\n);\n\nQuestion: What is the average diff when games played are more than 6?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"diff\") FROM \"australasia_pool_a\" WHERE \"played\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"australasia_pool_a\" (\n \"club\" text,\n \"played\" real,\n \"lost\" real,\n \"drawn\" real,\n \"against\" real,\n \"diff\" real,\n \"points\" real\n);\n\nQuestion: What is the highest draws when more than 6 are played and the points against are 54?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"drawn\") FROM \"australasia_pool_a\" WHERE \"against\"=54 AND \"played\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"australasia_pool_a\" (\n \"club\" text,\n \"played\" real,\n \"lost\" real,\n \"drawn\" real,\n \"against\" real,\n \"diff\" real,\n \"points\" real\n);\n\nQuestion: What is the maximum number of points against when the team has more than 0 losses and plays fewer than 6 games?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"against\") FROM \"australasia_pool_a\" WHERE \"lost\">0 AND \"played\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"australasia_pool_a\" (\n \"club\" text,\n \"played\" real,\n \"lost\" real,\n \"drawn\" real,\n \"against\" real,\n \"diff\" real,\n \"points\" real\n);\n\nQuestion: What is the number of games played for the team with 12 points and an against smaller than 52?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"played\") FROM \"australasia_pool_a\" WHERE \"points\"=12 AND \"against\"<52;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the crowd size when the home team scored 10.10 (70)?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_13\" WHERE \"home_team_score\"='10.10 (70)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away team when the home team scored 10.10 (70)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_13\" WHERE \"home_team_score\"='10.10 (70)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away team's score when the crowd was larger than 16,500 and the home team scored 15.15 (105)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_13\" WHERE \"crowd\">'16,500' AND \"home_team_score\"='15.15 (105)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_jurisdiction_in_the_usa\" (\n \"adherents\" real,\n \"regular_attendees\" real,\n \"pct_of_adherents\" text,\n \"monasteries\" real,\n \"parishes\" real,\n \"average_parish_size\" real\n);\n\nQuestion: What is the lowest average parish size with 47.2% of adherents and 4,936 regular attendees?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"average_parish_size\") FROM \"by_jurisdiction_in_the_usa\" WHERE \"pct_of_adherents\"='47.2%' AND \"regular_attendees\">'4,936';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_jurisdiction_in_the_usa\" (\n \"adherents\" real,\n \"regular_attendees\" real,\n \"pct_of_adherents\" text,\n \"monasteries\" real,\n \"parishes\" real,\n \"average_parish_size\" real\n);\n\nQuestion: What is the average regular number of attendees that has 79 parishes?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"regular_attendees\") FROM \"by_jurisdiction_in_the_usa\" WHERE \"parishes\"=79;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_jurisdiction_in_the_usa\" (\n \"adherents\" real,\n \"regular_attendees\" real,\n \"pct_of_adherents\" text,\n \"monasteries\" real,\n \"parishes\" real,\n \"average_parish_size\" real\n);\n\nQuestion: What is the lowest number of monasteries with over 20 parishes, 210,864 regular attendeeds, and over 799,776 adherents?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"monasteries\") FROM \"by_jurisdiction_in_the_usa\" WHERE \"parishes\">20 AND \"regular_attendees\"='210,864' AND \"adherents\">'799,776';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Which Grand Prix has the Circuit of Lille?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"other_grands_prix\" WHERE \"circuit\"='lille';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Which winning driver of the Roussillon Grand Prix had an Alfa Romeo?"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"other_grands_prix\" WHERE \"winning_constructor\"='alfa romeo' AND \"name\"='roussillon grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Which Constructor won the Roussillon Grand Prix?"
},
{
"role": "assistant",
"content": "SELECT \"winning_constructor\" FROM \"other_grands_prix\" WHERE \"name\"='roussillon grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Which Driver won the Circuit of Rio de Janeiro?"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"other_grands_prix\" WHERE \"circuit\"='rio de janeiro';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the home team for the Essendon away team with attendance over 13,500?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_4\" WHERE \"crowd\">'13,500' AND \"away_team\"='essendon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What day did the VFL pay MCG?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_4\" WHERE \"venue\"='mcg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was November 4, 1973 attendance?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"regular_season_schedule\" WHERE \"date\"='november 4, 1973';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the number of laps with a Constructor of renault, and a driver of jacques villeneuve?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"race\" WHERE \"constructor\"='renault' AND \"driver\"='jacques villeneuve';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the time/retired for grid 3?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"grid\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the time/retired for grid 8?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"grid\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the time/retired for a grid larger than 11, laps larger than 41, and nick heidfeld?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"grid\">11 AND \"laps\">41 AND \"driver\"='nick heidfeld';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who was the driver with less than 53 laps, Grid larger than 17, and a Time/Retired of spin?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"laps\"<53 AND \"grid\">17 AND \"time_retired\"='spin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"car_num\" real,\n \"make\" text,\n \"points\" text,\n \"laps\" real,\n \"winnings\" text\n);\n\nQuestion: Who has won $98,860?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race_results\" WHERE \"winnings\"='$98,860';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What team is travelling to play Hawthorn?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_10\" WHERE \"home_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the smallest crowd at the Victoria Park Venue?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_10\" WHERE \"venue\"='victoria park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the score given by the Home team Geelong?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_10\" WHERE \"home_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the largest crowd at arden street oval?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_1\" WHERE \"venue\"='arden street oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the home side's score at western oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_1\" WHERE \"venue\"='western oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: What venue is in the state of Connecticut?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"first_and_second_rounds\" WHERE \"state\"='connecticut';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: What venue is in the city of Durham?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"first_and_second_rounds\" WHERE \"city\"='durham';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: In what state is the Thomas Assembly Center located?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"first_and_second_rounds\" WHERE \"venue\"='thomas assembly center';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: What venue is located in Indiana and hosted at Purdue University?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"first_and_second_rounds\" WHERE \"state\"='indiana' AND \"host\"='purdue university';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: What city is located in Oklahoma?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"first_and_second_rounds\" WHERE \"state\"='oklahoma';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_and_second_rounds\" (\n \"region\" text,\n \"host\" text,\n \"venue\" text,\n \"city\" text,\n \"state\" text\n);\n\nQuestion: In what city is the United Spirit Arena located?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"first_and_second_rounds\" WHERE \"venue\"='united spirit arena';"
}
] |
[
{
"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 \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result when they had their bye week?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='bye';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"exhibition_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the attendance of the Browns' September 7, 1953 game?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"exhibition_schedule\" WHERE \"date\"='september 7, 1953';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"exhibition_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: When was the Browns' game that over 36,796 attended?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"exhibition_schedule\" WHERE \"attendance\">'36,796';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"young_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What Young rider classification has a Stage of 18?"
},
{
"role": "assistant",
"content": "SELECT \"young_rider_classification\" FROM \"classification_leadership\" WHERE \"stage\"='18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"young_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Who has a Team classification of la vie claire, a stage of 20, a General classification of greg lemond?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"classification_leadership\" WHERE \"team_classification\"='la vie claire' AND \"general_classification\"='greg lemond' AND \"stage\"='20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"young_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What is the classification with a Team classification of la vie claire and a Stage of 12?"
},
{
"role": "assistant",
"content": "SELECT \"general_classification\" FROM \"classification_leadership\" WHERE \"team_classification\"='la vie claire' AND \"stage\"='12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"young_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What is guido bontempi's general classification when he has a stage of 6?"
},
{
"role": "assistant",
"content": "SELECT \"general_classification\" FROM \"classification_leadership\" WHERE \"winner\"='guido bontempi' AND \"stage\"='6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"young_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What is Ludo Peeters' team classification?"
},
{
"role": "assistant",
"content": "SELECT \"team_classification\" FROM \"classification_leadership\" WHERE \"winner\"='ludo peeters';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the date of the game where the home team scored 17.14 (116)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_11\" WHERE \"home_team_score\"='17.14 (116)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team at the game where Footscray was the home team and the crowd was larger than 20,200?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_11\" WHERE \"crowd\">'20,200' AND \"home_team\"='footscray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"england_career\" (\n \"date\" text,\n \"venue\" text,\n \"opposition\" text,\n \"att\" real,\n \"result\" text,\n \"goals\" real\n);\n\nQuestion: Which date had less than 3 goals and a result of (w) 2-0?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"england_career\" WHERE \"goals\"<3 AND \"result\"='(w) 2-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which home team scored 13.11 (89)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_16\" WHERE \"home_team_score\"='13.11 (89)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When an away team scored 11.17 (83), at which venue were they playing?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_16\" WHERE \"away_team_score\"='11.17 (83)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: On what date was a match held at MCG?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_16\" WHERE \"venue\"='mcg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When Fitzroy are the away team, what is the average crowd size?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_16\" WHERE \"away_team\"='fitzroy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8_national_day_round\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is footscray's away team score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_8_national_day_round\" WHERE \"home_team\"='footscray';"
}
] |
[
{
"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 is the record of Jeremija Sanders' opponent?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='jeremija sanders';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_points\" (\n \"player\" text,\n \"span\" text,\n \"start\" real,\n \"tries\" real,\n \"conv\" real,\n \"pens\" real,\n \"drop\" real\n);\n\nQuestion: What is the average number of tries that has a start larger than 32, is a player of seremaia bai that also has a conversion score larger than 47?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"tries\") FROM \"most_points\" WHERE \"start\">32 AND \"player\"='seremaia bai' AND \"conv\">47;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_points\" (\n \"player\" text,\n \"span\" text,\n \"start\" real,\n \"tries\" real,\n \"conv\" real,\n \"pens\" real,\n \"drop\" real\n);\n\nQuestion: For the player fero lasagavibau who has the lowest start?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"start\") FROM \"most_points\" WHERE \"player\"='fero lasagavibau';"
}
] |
[
{
"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 \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Who was the opponent when Raphael was 4-0?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='4-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 \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the average round when he had a 3-0 record?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"record\"='3-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 \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the location when he had a 2-0 record?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='2-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 \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the result when he went 1 round against jeremy beck?"
},
{
"role": "assistant",
"content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=1 AND \"opponent\"='jeremy beck';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"date\" text,\n \"result\" text,\n \"score\" text,\n \"stadium\" text,\n \"city\" text,\n \"crowd\" real\n);\n\nQuestion: What was the result of the game in halifax?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"round_5\" WHERE \"city\"='halifax';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"date\" text,\n \"result\" text,\n \"score\" text,\n \"stadium\" text,\n \"city\" text,\n \"crowd\" real\n);\n\nQuestion: What stadium is located in Halifax?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"round_5\" WHERE \"city\"='halifax';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"date\" text,\n \"result\" text,\n \"score\" text,\n \"stadium\" text,\n \"city\" text,\n \"crowd\" real\n);\n\nQuestion: What day did they play in salford?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_5\" WHERE \"city\"='salford';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the earliest week the team played the chicago cardinals in front of less than 25,312?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"regular_season_schedule\" WHERE \"opponent\"='chicago cardinals' AND \"attendance\"<'25,312';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What day did they play on week 4?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"regular_season_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 \"regular_season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What team did the Brows play against on October 20, 1963 to a crowd larger than 55,096?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"regular_season_schedule\" WHERE \"attendance\">'55,096' AND \"date\"='october 20, 1963';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the attendance during the week 1 match?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"regular_season_schedule\" WHERE \"week\"=1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: During what week was the match on November 10, 1963?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"week\") FROM \"regular_season_schedule\" WHERE \"date\"='november 10, 1963';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_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 match on December 1, 1963?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"regular_season_schedule\" WHERE \"date\"='december 1, 1963';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When did a crowd larger than 23,135 watch an away team score 3.8 (26)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_3\" WHERE \"crowd\">'23,135' AND \"away_team_score\"='3.8 (26)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the Away team score against a home team with 5.12 (42)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_3\" WHERE \"home_team_score\"='5.12 (42)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What day is hawthorn the away side?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_3\" WHERE \"away_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the average crowd size for games with north melbourne as the away side?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_3\" WHERE \"away_team\"='north melbourne';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.