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 \"round_19\" (\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 date for home team Collingwood?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_19\" 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_19\" (\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 for St Kilda?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_19\" WHERE \"home_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"c\" (\n \"name\" text,\n \"latitude\" real,\n \"longitude\" real,\n \"diameter_km\" real,\n \"named_after\" text\n);\n\nQuestion: Tell me the named after for diameter less than 19.2 and latitude more than -37.5 with longitude less than 67.3"
},
{
"role": "assistant",
"content": "SELECT \"named_after\" FROM \"c\" WHERE \"diameter_km\"<19.2 AND \"latitude\">-37.5 AND \"longitude\"<67.3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"c\" (\n \"name\" text,\n \"latitude\" real,\n \"longitude\" real,\n \"diameter_km\" real,\n \"named_after\" text\n);\n\nQuestion: Tell me the named for latitude of 6.4"
},
{
"role": "assistant",
"content": "SELECT \"named_after\" FROM \"c\" WHERE \"latitude\"=6.4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"c\" (\n \"name\" text,\n \"latitude\" real,\n \"longitude\" real,\n \"diameter_km\" real,\n \"named_after\" text\n);\n\nQuestion: Tell me the name for longitude more than 103.8 and latitude of -11.4"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"c\" WHERE \"longitude\">103.8 AND \"latitude\"=-11.4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"c\" (\n \"name\" text,\n \"latitude\" real,\n \"longitude\" real,\n \"diameter_km\" real,\n \"named_after\" text\n);\n\nQuestion: Tell me the sum of longitude for diameter being 22.6 and latitude less than -12.4"
},
{
"role": "assistant",
"content": "SELECT SUM(\"longitude\") FROM \"c\" WHERE \"diameter_km\"=22.6 AND \"latitude\"<-12.4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1994_draft_picks\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What was the overall pick for Doug Sproule of the United States?"
},
{
"role": "assistant",
"content": "SELECT \"overall\" FROM \"1994_draft_picks\" WHERE \"nationality\"='united states' AND \"player\"='doug sproule';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"rating\" real,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" real,\n \"rank_timeslot\" text\n);\n\nQuestion: what is the lowest viewers (m) when the share is more than 13?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"viewers_m\") FROM \"weekly_ratings\" WHERE \"share\">13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"rating\" real,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" real,\n \"rank_timeslot\" text\n);\n\nQuestion: what is the average rating when the air date is november 23, 2007?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rating\") FROM \"weekly_ratings\" WHERE \"air_date\"='november 23, 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"rating\" real,\n \"share\" real,\n \"18_49_rating_share\" text,\n \"viewers_m\" real,\n \"rank_timeslot\" text\n);\n\nQuestion: what is the total viewers (m) when the rating is 6.4 and the share is more than 11?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"viewers_m\") FROM \"weekly_ratings\" WHERE \"rating\"=6.4 AND \"share\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_5_2001\" (\n \"episode_num\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text\n);\n\nQuestion: Who wrote the episode that was directed by Terry Ingram?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"season_5_2001\" WHERE \"directed_by\"='terry ingram';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_5_2001\" (\n \"episode_num\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text\n);\n\nQuestion: Which is the episode # of the episode titled \"The Man Behind the Curtain\"?"
},
{
"role": "assistant",
"content": "SELECT \"episode_num\" FROM \"season_5_2001\" WHERE \"title\"='\\\"the man behind the curtain\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_5_2001\" (\n \"episode_num\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text\n);\n\nQuestion: What is the title of the episode that was directed by Roy Dupuis?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"season_5_2001\" WHERE \"directed_by\"='roy dupuis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_5_2001\" (\n \"episode_num\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text\n);\n\nQuestion: Who directed the episode that originally aired on February 25, 2001?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"season_5_2001\" WHERE \"original_airdate\"='february 25, 2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_5_2001\" (\n \"episode_num\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text\n);\n\nQuestion: What is the episode # of the episode that originally aired on January 21, 2001?"
},
{
"role": "assistant",
"content": "SELECT \"episode_num\" FROM \"season_5_2001\" WHERE \"original_airdate\"='january 21, 2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_5_2001\" (\n \"episode_num\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_airdate\" text\n);\n\nQuestion: Who directed episode # 92 (4)?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"season_5_2001\" WHERE \"episode_num\"='92 (4)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_pennsylvania_state_parks\" (\n \"park_name\" text,\n \"county_or_counties\" text,\n \"area_in_acres_ha\" text,\n \"date_founded\" real,\n \"stream_s_and_or_lake_s\" text\n);\n\nQuestion: what is the stream(s) and / or lake(s) when the date founded is 1959?"
},
{
"role": "assistant",
"content": "SELECT \"stream_s_and_or_lake_s\" FROM \"current_pennsylvania_state_parks\" WHERE \"date_founded\"=1959;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_pennsylvania_state_parks\" (\n \"park_name\" text,\n \"county_or_counties\" text,\n \"area_in_acres_ha\" text,\n \"date_founded\" real,\n \"stream_s_and_or_lake_s\" text\n);\n\nQuestion: What is the area in acres (ha) for the park bald eagle state park?"
},
{
"role": "assistant",
"content": "SELECT \"area_in_acres_ha\" FROM \"current_pennsylvania_state_parks\" WHERE \"park_name\"='bald eagle state park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_pennsylvania_state_parks\" (\n \"park_name\" text,\n \"county_or_counties\" text,\n \"area_in_acres_ha\" text,\n \"date_founded\" real,\n \"stream_s_and_or_lake_s\" text\n);\n\nQuestion: what is the most recent date founded in elk county?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"date_founded\") FROM \"current_pennsylvania_state_parks\" WHERE \"county_or_counties\"='elk county';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_pennsylvania_state_parks\" (\n \"park_name\" text,\n \"county_or_counties\" text,\n \"area_in_acres_ha\" text,\n \"date_founded\" real,\n \"stream_s_and_or_lake_s\" text\n);\n\nQuestion: how many parks are name beltzville state park?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"date_founded\") FROM \"current_pennsylvania_state_parks\" WHERE \"park_name\"='beltzville state park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_countries_ranked_by_the_number_o\" (\n \"rank\" real,\n \"country\" text,\n \"continent\" text,\n \"summer_olympics\" text,\n \"winter_olympics\" text,\n \"total\" real\n);\n\nQuestion: Which rank has a total smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"list_of_countries_ranked_by_the_number_o\" WHERE \"total\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_winners\" (\n \"year\" real,\n \"author\" text,\n \"english_title\" text,\n \"original_title\" text,\n \"representing\" text\n);\n\nQuestion: What is the year for the ocean?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"list_of_winners\" WHERE \"english_title\"='the ocean';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_winners\" (\n \"year\" real,\n \"author\" text,\n \"english_title\" text,\n \"original_title\" text,\n \"representing\" text\n);\n\nQuestion: Name the representation for om fjorten dage"
},
{
"role": "assistant",
"content": "SELECT \"representing\" FROM \"list_of_winners\" WHERE \"original_title\"='om fjorten dage';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_winners\" (\n \"year\" real,\n \"author\" text,\n \"english_title\" text,\n \"original_title\" text,\n \"representing\" text\n);\n\nQuestion: Name the representing for englar alheimsins"
},
{
"role": "assistant",
"content": "SELECT \"representing\" FROM \"list_of_winners\" WHERE \"original_title\"='englar alheimsins';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_winners\" (\n \"year\" real,\n \"author\" text,\n \"english_title\" text,\n \"original_title\" text,\n \"representing\" text\n);\n\nQuestion: Name the original title for years before 1977 and author of lagercrantz olof lagercrantz"
},
{
"role": "assistant",
"content": "SELECT \"original_title\" FROM \"list_of_winners\" WHERE \"year\"<1977 AND \"author\"='lagercrantz olof lagercrantz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_winners\" (\n \"year\" real,\n \"author\" text,\n \"english_title\" text,\n \"original_title\" text,\n \"representing\" text\n);\n\nQuestion: Name the representating for ingenj\u00f6r andr\u00e9es luftf\u00e4rd"
},
{
"role": "assistant",
"content": "SELECT \"representing\" FROM \"list_of_winners\" WHERE \"original_title\"='ingenj\u00f6r andr\u00e9es luftf\u00e4rd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: What is the distance for the team time trial?"
},
{
"role": "assistant",
"content": "SELECT \"distance\" FROM \"stage_results\" WHERE \"type\"='team time trial';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: What was the course on 13 may?"
},
{
"role": "assistant",
"content": "SELECT \"course\" FROM \"stage_results\" WHERE \"date\"='13 may';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text\n);\n\nQuestion: What type has rest day as a course and was on 21 may?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"stage_results\" WHERE \"course\"='rest day' AND \"date\"='21 may';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What's the race name that the driver Innes Ireland won?"
},
{
"role": "assistant",
"content": "SELECT \"race_name\" FROM \"non_championship_race_results\" WHERE \"winning_driver\"='innes ireland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What's the score in the home game against the Charlotte Bobcats?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"february\" WHERE \"visitor\"='charlotte bobcats';"
}
] |
[
{
"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: What was the date of the game played at Victoria Park?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_16\" 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_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: What was the home team's score when the away team scored 15.9 (99)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_16\" WHERE \"away_team_score\"='15.9 (99)';"
}
] |
[
{
"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: Who was the home team when the crowd was larger than 13,557?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_16\" WHERE \"crowd\">'13,557';"
}
] |
[
{
"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: Where did Richmond play as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_16\" WHERE \"away_team\"='richmond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_clubs\" (\n \"club\" text,\n \"nickname\" text,\n \"years_competed\" text,\n \"home_ground\" text,\n \"premierships\" text\n);\n\nQuestion: Tell me the years competed for panthers"
},
{
"role": "assistant",
"content": "SELECT \"years_competed\" FROM \"former_clubs\" WHERE \"nickname\"='panthers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"versions\" (\n \"country\" text,\n \"release_date\" real,\n \"music_label\" text,\n \"media\" text,\n \"catalogue_number\" text\n);\n\nQuestion: What is the release date of the CD by EG Records in the UK?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"release_date\") FROM \"versions\" WHERE \"media\"='cd' AND \"country\"='uk' AND \"music_label\"='eg records';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"versions\" (\n \"country\" text,\n \"release_date\" real,\n \"music_label\" text,\n \"media\" text,\n \"catalogue_number\" text\n);\n\nQuestion: What is the release date by Editions EG in the Netherlands?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"release_date\") FROM \"versions\" WHERE \"music_label\"='editions eg' AND \"country\"='netherlands';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"versions\" (\n \"country\" text,\n \"release_date\" real,\n \"music_label\" text,\n \"media\" text,\n \"catalogue_number\" text\n);\n\nQuestion: What is the music label with the catalogue number enocd 10?"
},
{
"role": "assistant",
"content": "SELECT \"music_label\" FROM \"versions\" WHERE \"catalogue_number\"='enocd 10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"versions\" (\n \"country\" text,\n \"release_date\" real,\n \"music_label\" text,\n \"media\" text,\n \"catalogue_number\" text\n);\n\nQuestion: What is the release date by Virgin?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"release_date\") FROM \"versions\" WHERE \"music_label\"='virgin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_organization\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"league_and_position_in_1991\" text,\n \"coach\" text\n);\n\nQuestion: Which team has Yuriy Hruznov as coach?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"pre_season_organization\" WHERE \"coach\"='yuriy hruznov';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_organization\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"league_and_position_in_1991\" text,\n \"coach\" text\n);\n\nQuestion: Where is Dynamo-2 located?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"pre_season_organization\" WHERE \"team\"='dynamo-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pre_season_organization\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"league_and_position_in_1991\" text,\n \"coach\" text\n);\n\nQuestion: Where is Shakhtar-2 located?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"pre_season_organization\" WHERE \"team\"='shakhtar-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"purse\" real,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" real\n);\n\nQuestion: For the gte northwest classic with the score of 207 (-9), what is the average 1st prize ($)"
},
{
"role": "assistant",
"content": "SELECT AVG(\"1st_prize\") FROM \"tournament_results\" WHERE \"score\"='207 (-9)' AND \"tournament\"='gte northwest classic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"purse\" real,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" real\n);\n\nQuestion: For sep 18 what is the total number of 1 prize ($)"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"1st_prize\") FROM \"tournament_results\" WHERE \"date\"='sep 18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"purse\" real,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" real\n);\n\nQuestion: What is the winner for Virginia?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"tournament_results\" WHERE \"location\"='virginia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"purse\" real,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" real\n);\n\nQuestion: On what date was the gte north classic tournament?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"tournament_results\" WHERE \"tournament\"='gte north classic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_21\" (\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 an away team score 14.19 (103)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_21\" WHERE \"away_team_score\"='14.19 (103)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_21\" (\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 plays at princes park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_21\" 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_21\" (\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 an away team score 17.8 (110)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_21\" WHERE \"away_team_score\"='17.8 (110)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_21\" (\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: Where does the home team fitzroy play?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_21\" WHERE \"home_team\"='fitzroy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: Which extra resulted in 2nd before 2005?"
},
{
"role": "assistant",
"content": "SELECT \"extra\" FROM \"achievements\" WHERE \"result\"='2nd' AND \"year\"<2005;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: Which venue resulted in 2nd before 2005?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"result\"='2nd' AND \"year\"<2005;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the attendance at the Red Sox game that had a loss of Wakefield (7\u201310)?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"loss\"='wakefield (7\u201310)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the loss of the Red Sox game when they had a record of 77\u201367?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='77\u201367';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: Which Tournament has Pat Cash as a runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"2000\" WHERE \"runner_up\"='pat cash';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000\" (\n \"tournament\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text,\n \"third_place\" text\n);\n\nQuestion: Who is the winner for the Tournament in Hong Kong with a third place winner named Mikael Pernfors?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"2000\" WHERE \"third_place\"='mikael pernfors' AND \"tournament\"='hong kong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"record\" text,\n \"athlete\" text,\n \"nationality\" text,\n \"date\" text\n);\n\nQuestion: What was the nationality of the athlete that ran the 10000 m event?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"women\" WHERE \"event\"='10000 m';"
}
] |
[
{
"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 number of points of palam\u00f3s cf, which has less than 21 wins and less than 40 goals?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"final_table\" WHERE \"wins\"<21 AND \"club\"='palam\u00f3s cf' AND \"goals_for\"<40;"
}
] |
[
{
"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: Which club has more than 46 goals, 10 wins, and a goal difference of -24?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"final_table\" WHERE \"goals_against\">46 AND \"wins\"=10 AND \"goal_difference\"=-24;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\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 Richmond score as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_17\" WHERE \"away_team\"='richmond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"grand_prix\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Tell me the pole position with round less than 2"
},
{
"role": "assistant",
"content": "SELECT \"pole_position\" FROM \"grands_prix\" WHERE \"round\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grands_prix\" (\n \"round\" real,\n \"grand_prix\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: I want the fastest lap for round of 16"
},
{
"role": "assistant",
"content": "SELECT \"fastest_lap\" FROM \"grands_prix\" WHERE \"round\"=16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which Record has a home of Nashville?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"january\" WHERE \"home\"='nashville';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which Visitor played on January 17?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"january\" WHERE \"date\"='january 17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"game\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which game later than number 32 had both Ellis for the decision and Nashville as the visiting team?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"december\" WHERE \"visitor\"='nashville' AND \"decision\"='ellis' AND \"game\">32;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"game\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the visiting team in the game sometime after number 29 that had 18,584 atttendees?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"december\" WHERE \"game\">29 AND \"attendance\">'18,584';"
}
] |
[
{
"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: Which Crowd has an Away team score of 9.21 (75)?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_6\" WHERE \"away_team_score\"='9.21 (75)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tam_variants\" (\n \"vctp\" text,\n \"vca_155\" text,\n \"vctm\" text,\n \"vcpc\" text,\n \"vclc\" text,\n \"vcrt\" text\n);\n\nQuestion: If there is a VCPC of 75km/h (47mph) what is the VCA?"
},
{
"role": "assistant",
"content": "SELECT \"vca_155\" FROM \"tam_variants\" WHERE \"vcpc\"='75km/h (47mph)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tam_variants\" (\n \"vctp\" text,\n \"vca_155\" text,\n \"vctm\" text,\n \"vcpc\" text,\n \"vclc\" text,\n \"vcrt\" text\n);\n\nQuestion: If there is a VCRT of 7.62mm (0.3in) fn mag 60-20 machine gun, what is the VCTP of that?"
},
{
"role": "assistant",
"content": "SELECT \"vctp\" FROM \"tam_variants\" WHERE \"vcrt\"='7.62mm (0.3in) fn mag 60-20 machine gun';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_line_series\" (\n \"airing_date\" text,\n \"english_title_chinese_title\" text,\n \"number_of_episodes\" real,\n \"genre\" text,\n \"official_website\" text\n);\n\nQuestion: What is the airing date for a modern drama with more than 21 episodes?"
},
{
"role": "assistant",
"content": "SELECT \"airing_date\" FROM \"second_line_series\" WHERE \"genre\"='modern drama' AND \"number_of_episodes\">21;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the Constructor for the German Grand Prix Race?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"season_review\" WHERE \"race\"='german grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What Race did Michele Alboreto win?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"season_review\" WHERE \"race_winner\"='michele alboreto';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the Constructor for the race that had Derek Warwick as its Fastest Lap?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"season_review\" WHERE \"fastest_lap\"='derek warwick';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What Brands Hatch race had Niki Lauda as its Fastest Lap?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"season_review\" WHERE \"fastest_lap\"='niki lauda' AND \"location\"='brands hatch';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What was the Report for the Monaco race?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"season_review\" WHERE \"location\"='monaco';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What was the nation that had 59 totals?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"all_time_medal_table\" WHERE \"total\"=59;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"grand_prix\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: On what date did Ayrton Senna win at Imola?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"season_review\" WHERE \"winning_driver\"='ayrton senna' AND \"location\"='imola';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"grand_prix\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who had the fastest lap of the race that Ayrton Senna won on 23 April?"
},
{
"role": "assistant",
"content": "SELECT \"fastest_lap\" FROM \"season_review\" WHERE \"winning_driver\"='ayrton senna' AND \"date\"='23 april';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"grand_prix\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Which Grand Prix is located in Jerez?"
},
{
"role": "assistant",
"content": "SELECT \"grand_prix\" FROM \"season_review\" WHERE \"location\"='jerez';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"grand_prix\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who had the pole position in Jerez?"
},
{
"role": "assistant",
"content": "SELECT \"pole_position\" FROM \"season_review\" WHERE \"location\"='jerez';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"grand_prix\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What is the report for the race that Ayrton Senna won on 27 August?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"season_review\" WHERE \"winning_driver\"='ayrton senna' AND \"date\"='27 august';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\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 gold medals for the United States with silver medal count greater than 3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"gold\") FROM \"medal_count\" WHERE \"nation\"='united states' AND \"silver\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of medals of Norway with a silver medal count greater than 6 and a gold medal count greater than 10?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"medal_count\" WHERE \"silver\">6 AND \"nation\"='norway' AND \"gold\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest bronze medal count for Italy with fewer than 6 gold medals and greater than 10 total medals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medal_count\" WHERE \"gold\"<6 AND \"nation\"='italy' AND \"total\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: On average, what is the number of silver medals for nations ranking higher than 7, with a total of 6 medals and fewer than 2 bronze medals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"silver\") FROM \"medal_count\" WHERE \"rank\">7 AND \"total\"=6 AND \"bronze\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: For the United States, with greater than 2 bronze metals, greater than 3 silver medals, and a rank higher than 3, what is the highest total number of medals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"medal_count\" WHERE \"bronze\">2 AND \"rank\">3 AND \"nation\"='united states' AND \"silver\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which player was active in Jazz in 1975-79?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"m\" WHERE \"years_for_jazz\"='1975-79';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the nationality for the guard position from Bowling Green?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"m\" WHERE \"position\"='guard' AND \"school_club_team\"='bowling green';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: Who is the player from Auburn?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"m\" WHERE \"school_club_team\"='auburn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which player is a shooting guard?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"m\" WHERE \"position\"='shooting guard';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which position was active in Jazz in 2002-03?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"m\" WHERE \"years_for_jazz\"='2002-03';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_competition\" (\n \"state\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: Name the total number of swimsuits when evening gown is 8.329 and average is less than 8.497"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"swimsuit\") FROM \"preliminary_competition\" WHERE \"evening_gown\"=8.329 AND \"average\"<8.497;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_competition\" (\n \"state\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: Name the sum of swimsuit when the evening gown is less than 6.983 and the average is less than 7.362"
},
{
"role": "assistant",
"content": "SELECT SUM(\"swimsuit\") FROM \"preliminary_competition\" WHERE \"average\"<7.362 AND \"evening_gown\"<6.983;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_competition\" (\n \"state\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: Name the most interview for minnesota and average more than 7.901"
},
{
"role": "assistant",
"content": "SELECT MAX(\"interview\") FROM \"preliminary_competition\" WHERE \"state\"='minnesota' AND \"average\">7.901;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rodney_local_board\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Name the highest Decile for roll more than 325 and area of warkworth"
},
{
"role": "assistant",
"content": "SELECT MAX(\"decile\") FROM \"rodney_local_board\" WHERE \"roll\">325 AND \"area\"='warkworth';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rodney_local_board\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Name the authority for roll of 54"
},
{
"role": "assistant",
"content": "SELECT \"authority\" FROM \"rodney_local_board\" WHERE \"roll\"=54;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friendly\" (\n \"match\" real,\n \"date\" text,\n \"competition_or_tour\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score1\" text\n);\n\nQuestion: What was the score of Match 2?"
},
{
"role": "assistant",
"content": "SELECT \"score1\" FROM \"friendly\" WHERE \"match\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\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 away team had a score of 11.11 (77)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_8\" WHERE \"away_team_score\"='11.11 (77)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\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 Essendon play at home?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_8\" WHERE \"home_team\"='essendon';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.