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 \"hibiscus_and_bays_local_board\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text,\n \"roll\" real\n);\n\nQuestion: What area is the school with a decile of 8 in?"
},
{
"role": "assistant",
"content": "SELECT \"area\" FROM \"hibiscus_and_bays_local_board\" WHERE \"decile\"='8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hibiscus_and_bays_local_board\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text,\n \"roll\" real\n);\n\nQuestion: Which school has a state authority and a roll of 318?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"hibiscus_and_bays_local_board\" WHERE \"authority\"='state' AND \"roll\"=318;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hibiscus_and_bays_local_board\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text,\n \"roll\" real\n);\n\nQuestion: In what area is torbay school with a state authority?"
},
{
"role": "assistant",
"content": "SELECT \"area\" FROM \"hibiscus_and_bays_local_board\" WHERE \"authority\"='state' AND \"name\"='torbay school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"baseball_titles_by_school\" (\n \"team\" text,\n \"season\" text,\n \"regular_season\" real,\n \"tournament\" real,\n \"total\" real\n);\n\nQuestion: How many regular season titles did Kansas receive when they received fewer than 2 tournament titles and more than 0 total titles?"
},
{
"role": "assistant",
"content": "SELECT \"regular_season\" FROM \"baseball_titles_by_school\" WHERE \"tournament\"<2 AND \"total\">0 AND \"team\"='kansas';"
}
] |
[
{
"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 of retirement with Laps smaller than 66, a grid less than 10, and a Driver of heinz-harald frentzen?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"laps\"<66 AND \"grid\"<10 AND \"driver\"='heinz-harald frentzen';"
}
] |
[
{
"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: How many laps does olivier panis have?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"race\" WHERE \"driver\"='olivier panis';"
}
] |
[
{
"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: Which home team played against Geelong?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_1\" WHERE \"away_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 did the home team score when the away team scored 18.20 (128)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_1\" WHERE \"away_team_score\"='18.20 (128)';"
}
] |
[
{
"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: How large was the crowd when North Melbourne played as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_1\" WHERE \"away_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\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 is the away team that played home team Hawthorn?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_20\" 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_20\" (\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 name of the home team that played away team Footscray?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_20\" 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_20\" (\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 is the home team that played at venue MCG?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_20\" WHERE \"venue\"='mcg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_villains\" (\n \"character\" text,\n \"portrayed_by\" text,\n \"crime\" text,\n \"first_appearance\" text,\n \"last_appearance\" text\n);\n\nQuestion: What is the name of the first appearance when Chad Williams is a portrayal?"
},
{
"role": "assistant",
"content": "SELECT \"first_appearance\" FROM \"notable_villains\" WHERE \"portrayed_by\"='chad williams';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_villains\" (\n \"character\" text,\n \"portrayed_by\" text,\n \"crime\" text,\n \"first_appearance\" text,\n \"last_appearance\" text\n);\n\nQuestion: Which character is portrayed by Elias Koteas?"
},
{
"role": "assistant",
"content": "SELECT \"character\" FROM \"notable_villains\" WHERE \"portrayed_by\"='elias koteas';"
}
] |
[
{
"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 Home Team Score at VFL Park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_10\" WHERE \"venue\"='vfl 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 Home Team Score at Windy Hill?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_10\" WHERE \"venue\"='windy hill';"
}
] |
[
{
"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: On what Date is Carlton the Away Team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_10\" WHERE \"away_team\"='carlton';"
}
] |
[
{
"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 Crowd had the least people with a Home Team Score of 9.13 (67)?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_10\" WHERE \"home_team_score\"='9.13 (67)';"
}
] |
[
{
"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: On what Date was the Home Team Score 9.13 (67)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_10\" WHERE \"home_team_score\"='9.13 (67)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which competition with a result of 3-1?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"result\"='3-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members_for_2013_14\" (\n \"club\" text,\n \"position_in_2012_13\" text,\n \"first_season_in_top_division\" text,\n \"number_of_seasons_in_ligue_1\" real,\n \"first_season_of_current_spell_in_top_division\" text,\n \"ligue_1_titles\" real,\n \"last_ligue_1_title\" text\n);\n\nQuestion: I want to know the lowest ligue 1 titles for position in 2012-13 of 010 12th and number of seasons in ligue 1 more than 56"
},
{
"role": "assistant",
"content": "SELECT MIN(\"ligue_1_titles\") FROM \"members_for_2013_14\" WHERE \"position_in_2012_13\"='010 12th' AND \"number_of_seasons_in_ligue_1\">56;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"members_for_2013_14\" (\n \"club\" text,\n \"position_in_2012_13\" text,\n \"first_season_in_top_division\" text,\n \"number_of_seasons_in_ligue_1\" real,\n \"first_season_of_current_spell_in_top_division\" text,\n \"ligue_1_titles\" real,\n \"last_ligue_1_title\" text\n);\n\nQuestion: Tell me the position in 2012-13 and number of seasons in leigue 1 of 30 with ligue 1 titles of 1"
},
{
"role": "assistant",
"content": "SELECT \"position_in_2012_13\" FROM \"members_for_2013_14\" WHERE \"number_of_seasons_in_ligue_1\"=30 AND \"ligue_1_titles\"=1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1983_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What is the NBA draft result of the player from Kingston, PA?"
},
{
"role": "assistant",
"content": "SELECT \"nba_draft\" FROM \"1983_boys_team\" WHERE \"hometown\"='kingston, pa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1983_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What is the NBA draft result of the player with a height of 6-7?"
},
{
"role": "assistant",
"content": "SELECT \"nba_draft\" FROM \"1983_boys_team\" WHERE \"height\"='6-7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1983_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What is the NBA draft result of Dwayne Washington?"
},
{
"role": "assistant",
"content": "SELECT \"nba_draft\" FROM \"1983_boys_team\" WHERE \"player\"='dwayne washington';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1983_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What is the NBA draft result of the player from Dunbar High School?"
},
{
"role": "assistant",
"content": "SELECT \"nba_draft\" FROM \"1983_boys_team\" WHERE \"school\"='dunbar high school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1983_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What is the school of the player from the College of Michigan?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"1983_boys_team\" WHERE \"college\"='michigan';"
}
] |
[
{
"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 away team score for the game where the home team scored 19.16 (130)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_1\" WHERE \"home_team_score\"='19.16 (130)';"
}
] |
[
{
"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 was the away team score for the game played at MCG?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_1\" 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_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 was the home team's score at Victoria Park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_1\" 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 \"2002_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: What is the score at shay stadium?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"2002_fixtures_and_results\" WHERE \"venue\"='shay stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2002_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: What is the result at valley parade on 4/7/02?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"2002_fixtures_and_results\" WHERE \"venue\"='valley parade' AND \"date\"='4/7/02';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2002_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: Which competition has a Goal of deacon 8/8 and a Score of 32-14?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"2002_fixtures_and_results\" WHERE \"goals\"='deacon 8/8' AND \"score\"='32-14';"
}
] |
[
{
"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 top grid that is driven by martin brundle?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"grid\") FROM \"race\" WHERE \"driver\"='martin brundle';"
}
] |
[
{
"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 grid 13 time score?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"grid\"=13;"
}
] |
[
{
"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: Which grid is lower for thierry boutsen which laps less than 44?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"race\" WHERE \"driver\"='thierry boutsen' AND \"laps\"<44;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2002_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: Which player is 6-2?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"2002_boys_team\" WHERE \"height\"='6-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"h_class\" (\n \"ship\" text,\n \"pennant_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"completed\" text\n);\n\nQuestion: What is the Laid down for the Hyperion ship?"
},
{
"role": "assistant",
"content": "SELECT \"laid_down\" FROM \"h_class\" WHERE \"ship\"='hyperion';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"h_class\" (\n \"ship\" text,\n \"pennant_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"completed\" text\n);\n\nQuestion: What is the name of the ship that had a Pennant number of h55?"
},
{
"role": "assistant",
"content": "SELECT \"ship\" FROM \"h_class\" WHERE \"pennant_number\"='h55';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_bollywood_films_worldwi\" (\n \"rank\" real,\n \"movie\" text,\n \"year\" real,\n \"worldwide_gross\" text,\n \"director\" text,\n \"verdict\" text\n);\n\nQuestion: How did the jab tak hai jaan movie gross worldwide?"
},
{
"role": "assistant",
"content": "SELECT \"worldwide_gross\" FROM \"highest_grossing_bollywood_films_worldwi\" WHERE \"movie\"='jab tak hai jaan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_bollywood_films_worldwi\" (\n \"rank\" real,\n \"movie\" text,\n \"year\" real,\n \"worldwide_gross\" text,\n \"director\" text,\n \"verdict\" text\n);\n\nQuestion: What is average year for ayan mukerji?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"highest_grossing_bollywood_films_worldwi\" WHERE \"director\"='ayan mukerji';"
}
] |
[
{
"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: When melbourne was the home team what was their score?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_4\" WHERE \"home_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_a\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"total\" text,\n \"report\" text\n);\n\nQuestion: What date had a time of 20:10?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"pool_a\" WHERE \"time\"='20:10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2\" (\n \"production_no\" real,\n \"episode_no\" real,\n \"original_airdate\" text,\n \"episode_title\" text,\n \"host\" text\n);\n\nQuestion: What is the title of the episode that originally aired on March 31, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"episode_title\" FROM \"season_2\" WHERE \"original_airdate\"='march 31, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_2\" (\n \"production_no\" real,\n \"episode_no\" real,\n \"original_airdate\" text,\n \"episode_title\" text,\n \"host\" text\n);\n\nQuestion: What is the episode number of the episode that originally aired on February 4, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"episode_no\" FROM \"season_2\" WHERE \"original_airdate\"='february 4, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\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 the away team score was 21.11 (137) what was the home team score?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_6\" WHERE \"away_team_score\"='21.11 (137)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\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 kardinia park, what was the away team's score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_6\" WHERE \"venue\"='kardinia park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\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 largest attendance at kardinia park?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_6\" WHERE \"venue\"='kardinia park';"
}
] |
[
{
"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: Who was the Home team at the Western Oval location?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_3\" 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 \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What's the average of the amount of laps for the driver patrick tambay?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"race\" WHERE \"driver\"='patrick tambay';"
}
] |
[
{
"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: When renault is the constructor, the grid is over 6, and the time was labeled ignition, what's the largest amount of laps on record?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"grid\">6 AND \"constructor\"='renault' AND \"time_retired\"='ignition';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table\" (\n \"index_year\" text,\n \"author_editor_source\" text,\n \"year_of_publication\" text,\n \"countries_sampled\" real,\n \"world_ranking_1\" text,\n \"ranking_l_a_2\" text\n);\n\nQuestion: In 2008, what was the world ranking that ranked 5th in L.A.?"
},
{
"role": "assistant",
"content": "SELECT \"world_ranking_1\" FROM \"table\" WHERE \"ranking_l_a_2\"='5th' AND \"year_of_publication\"='2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: what is the total number of played when the goals for is more than 34 and goals against is more than 63?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"played\") FROM \"final_table\" WHERE \"goals_for\">34 AND \"goals_against\">63;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: what is the total number of goal different when the club is cf extremadura and the played is less than 38?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goal_difference\") FROM \"final_table\" WHERE \"club\"='cf extremadura' AND \"played\"<38;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: what is the average points when the goal difference is less than 17, the club is getafe cf and the goals for is more than 30?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"final_table\" WHERE \"goal_difference\"<17 AND \"club\"='getafe cf' AND \"goals_for\">30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: what is the sum of goals for when the position is less than 8, the losses is less than 10 the goals against is less than 35 and played is less than 38?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"goals_for\") FROM \"final_table\" WHERE \"position\"<8 AND \"losses\"<10 AND \"goals_against\"<35 AND \"played\"<38;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the highest gold when the rank is 12 for the nation vietnam?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"rank\"='12' AND \"nation\"='vietnam';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the total when the rank is 4?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"medal_table\" WHERE \"rank\"='4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the nation when the gold is 1 and bronze is larger than 0?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"medal_table\" WHERE \"gold\"=1 AND \"bronze\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Which entrant has Ferrari 038 3.5 v12 engine?"
},
{
"role": "assistant",
"content": "SELECT \"entrant\" FROM \"drivers_and_constructors\" WHERE \"engine\"='ferrari 038 3.5 v12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"nickname\" text,\n \"joined\" real\n);\n\nQuestion: What is the date that the Institution of Lynn University was founded on?"
},
{
"role": "assistant",
"content": "SELECT \"founded\" FROM \"current_members\" WHERE \"institution\"='lynn university';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What's the Loss listed with a Score of 5-1?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"score\"='5-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Date has a record of 3-5?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='3-5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Date has a Record of 6-9?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='6-9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What's the Loss listed for the Opponent of California Angels and has an Attendance of 57,762?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"opponent\"='california angels' AND \"attendance\"='57,762';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Date has an Attendance of 9,535?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"attendance\"='9,535';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the Score for the Date of April 23?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='april 23';"
}
] |
[
{
"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 was the average crowd size at Victoria Park?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_1\" 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_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 crowd size of the match featuring North Melbourne as the away team?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_1\" WHERE \"away_team\"='north melbourne';"
}
] |
[
{
"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: Name the team which has high rebounds of smith (10)"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"high_rebounds\"='smith (10)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\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 was the home team against Melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_18\" WHERE \"away_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\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 score when the away team scored 13.17 (95)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_18\" WHERE \"away_team_score\"='13.17 (95)';"
}
] |
[
{
"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: Which team is Lake Oval home to?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_3\" WHERE \"venue\"='lake oval';"
}
] |
[
{
"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 did the home team score when Carlton played as the Away team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_3\" WHERE \"away_team\"='carlton';"
}
] |
[
{
"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: How many people attended the home game for South Melbourne?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_3\" WHERE \"home_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_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 home team score at VFL Park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_3\" WHERE \"venue\"='vfl park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many grids have a Time/Retired of gearbox, and Laps smaller than 3?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"classification\" WHERE \"time_retired\"='gearbox' AND \"laps\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is masten gregory's average lap?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"classification\" WHERE \"driver\"='masten gregory';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which Time/Retired has a Grid of 2?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"grid\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"championship_teams_and_drivers\" (\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: When the engine Ford Cosworth DFV 3.0 v8 has a chassis of m23 and in rounds 14-15, what is its Tyre?"
},
{
"role": "assistant",
"content": "SELECT \"tyre\" FROM \"championship_teams_and_drivers\" WHERE \"rounds\"='14-15' AND \"engine\"='ford cosworth dfv 3.0 v8' AND \"chassis\"='m23';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"championship_teams_and_drivers\" (\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Which driver uses the ts16 chassis?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"championship_teams_and_drivers\" WHERE \"chassis\"='ts16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"series\" text\n);\n\nQuestion: What is the home team of the game on April 20?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"playoffs\" WHERE \"date\"='april 20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"series\" text\n);\n\nQuestion: What is the series score of the game with Vancouver as the visiting team on April 16?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"playoffs\" WHERE \"visitor\"='vancouver' AND \"date\"='april 16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"series\" text\n);\n\nQuestion: What is the series score of the game on April 16?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"playoffs\" WHERE \"date\"='april 16';"
}
] |
[
{
"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: Tell me the away team for venue of western oval"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_4\" 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 \"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: Tell me the away team score for 27 april 1974 and veue of mcg"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_4\" WHERE \"date\"='27 april 1974' AND \"venue\"='mcg';"
}
] |
[
{
"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: I want to see the away team the has a home team of richmond"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_4\" WHERE \"home_team\"='richmond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_competitions\" (\n \"competition\" text,\n \"stage\" text,\n \"venue\" text,\n \"date\" text,\n \"result\" text\n);\n\nQuestion: What venue did group g play at on Mar 8, 1998?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"official_competitions\" WHERE \"stage\"='group g' AND \"date\"='mar 8, 1998';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_competitions\" (\n \"competition\" text,\n \"stage\" text,\n \"venue\" text,\n \"date\" text,\n \"result\" text\n);\n\nQuestion: Which stage was being played in Romania?"
},
{
"role": "assistant",
"content": "SELECT \"stage\" FROM \"official_competitions\" WHERE \"venue\"='romania';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_competitions\" (\n \"competition\" text,\n \"stage\" text,\n \"venue\" text,\n \"date\" text,\n \"result\" text\n);\n\nQuestion: What was the score of the 1999 fifa world cup qualification (uefa) on Nov 23, 1997?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"official_competitions\" WHERE \"competition\"='1999 fifa world cup qualification (uefa)' AND \"date\"='nov 23, 1997';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_competitions\" (\n \"competition\" text,\n \"stage\" text,\n \"venue\" text,\n \"date\" text,\n \"result\" text\n);\n\nQuestion: What was being played on Nov 23, 2006?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"official_competitions\" WHERE \"date\"='nov 23, 2006';"
}
] |
[
{
"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 lowest crowd at windy hill?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_13\" WHERE \"venue\"='windy hill';"
}
] |
[
{
"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 crowd with a Home team score of 8.17 (65)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_13\" WHERE \"home_team_score\"='8.17 (65)';"
}
] |
[
{
"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 home team has an Away team score of 11.12 (78)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_13\" WHERE \"away_team_score\"='11.12 (78)';"
}
] |
[
{
"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 date has a Crowd larger than 12,000, and an Away team score of 9.16 (70)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_13\" WHERE \"crowd\">'12,000' AND \"away_team_score\"='9.16 (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 is the lowest crowd with home team richmond?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_13\" WHERE \"home_team\"='richmond';"
}
] |
[
{
"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: Which home team has an Away team score of 6.9 (45)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_13\" WHERE \"away_team_score\"='6.9 (45)';"
}
] |
[
{
"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: When there are more than 12 total medals and less than 5 gold medals, how many bronze medals are there?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"bronze\") FROM \"medal_table\" WHERE \"total\">12 AND \"gold\"<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: When the united states won a total number of medals larger than 25, what was the lowest amount of Bronze medals won?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"nation\"='united states' AND \"total\">25;"
}
] |
[
{
"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: When the nation of poland had less than 17 medals but more than 1 gold medal, what's the Highest number of bronze medals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"total\"<17 AND \"nation\"='poland' AND \"gold\">1;"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.