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 \"stations\" (\n \"station\" text,\n \"city_of_license\" text,\n \"channels_tv_rf\" text,\n \"first_air_date\" text,\n \"haat\" text,\n \"facility_id\" real,\n \"public_license_information\" text\n);\n\nQuestion: Which HAAT has 65944?"
},
{
"role": "assistant",
"content": "SELECT \"haat\" FROM \"stations\" WHERE \"facility_id\"=65944;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"station\" text,\n \"city_of_license\" text,\n \"channels_tv_rf\" text,\n \"first_air_date\" text,\n \"haat\" text,\n \"facility_id\" real,\n \"public_license_information\" text\n);\n\nQuestion: Which City of license has a Channels TV / RF of 36 (psip) 36 (uhf)? Question 5"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"stations\" WHERE \"channels_tv_rf\"='36 (psip) 36 (uhf)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_num\" text\n);\n\nQuestion: What format is dated October 29, 2004?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"date\"='october 29, 2004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_num\" text\n);\n\nQuestion: What is the date with the catalogue number ptcd-1015-6?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalogue_num\"='ptcd-1015-6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_num\" text\n);\n\nQuestion: What is the label for December 2004?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"date\"='december 2004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_num\" text\n);\n\nQuestion: What is the date for Hydra Head Records with a CD format?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"label\"='hydra head records' AND \"format\"='cd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_num\" text\n);\n\nQuestion: Which country has Hydra Head Records on February 2005?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"release_history\" WHERE \"label\"='hydra head records' AND \"date\"='february 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_num\" text\n);\n\nQuestion: Which country has Hydra Head Records with a 2lp format?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"release_history\" WHERE \"format\"='2lp' AND \"label\"='hydra head records';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_starters\" (\n \"saddle_cloth\" real,\n \"horse\" text,\n \"trainer\" text,\n \"jockey\" text,\n \"weight_kg\" real,\n \"barrier_b\" text,\n \"placing\" text\n);\n\nQuestion: Who rode mad rush?"
},
{
"role": "assistant",
"content": "SELECT \"jockey\" FROM \"race_starters\" WHERE \"horse\"='mad rush';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_starters\" (\n \"saddle_cloth\" real,\n \"horse\" text,\n \"trainer\" text,\n \"jockey\" text,\n \"weight_kg\" real,\n \"barrier_b\" text,\n \"placing\" text\n);\n\nQuestion: What place was the horse with a barrier of 20 and weighing less than 54 kg"
},
{
"role": "assistant",
"content": "SELECT \"placing\" FROM \"race_starters\" WHERE \"weight_kg\"<54 AND \"barrier_b\"='20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_starters\" (\n \"saddle_cloth\" real,\n \"horse\" text,\n \"trainer\" text,\n \"jockey\" text,\n \"weight_kg\" real,\n \"barrier_b\" text,\n \"placing\" text\n);\n\nQuestion: What place was the viewed horse?"
},
{
"role": "assistant",
"content": "SELECT \"placing\" FROM \"race_starters\" WHERE \"horse\"='viewed';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text\n);\n\nQuestion: What is the average number of wins of the year with less than 5 top 10s, a winning of $39,190 and less than 2 starts?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"nascar_nationwide_series\" WHERE \"top_10\"<5 AND \"winnings\"='$39,190' AND \"starts\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text\n);\n\nQuestion: What is the highest number of poles of the year before 1992 with more than 18 starts and winnings of $125,102?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"poles\") FROM \"nascar_nationwide_series\" WHERE \"starts\">18 AND \"winnings\"='$125,102' AND \"year\"<1992;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_works\" (\n \"year\" real,\n \"play\" text,\n \"author\" text,\n \"theatre\" text,\n \"type\" text,\n \"role\" text\n);\n\nQuestion: Author of stanis\u0142aw wyspia\u0144ski, and a Year of 1969 happened in what theatre?"
},
{
"role": "assistant",
"content": "SELECT \"theatre\" FROM \"notable_works\" WHERE \"author\"='stanis\u0142aw wyspia\u0144ski' AND \"year\"=1969;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Which game did New Jersey Devils played in?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"schedule_and_results\" WHERE \"opponent\"='new jersey devils';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What score has a record of 21-25-7-4?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"record\"='21-25-7-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What score has a record of 22-28-7-4?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"record\"='22-28-7-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_01_season_as_a_two_year_old\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"group\" text,\n \"distance\" text,\n \"weight_kg\" real,\n \"time\" text,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: What group has 1200 m as the distance?"
},
{
"role": "assistant",
"content": "SELECT \"group\" FROM \"2000_01_season_as_a_two_year_old\" WHERE \"distance\"='1200 m';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_01_season_as_a_two_year_old\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"group\" text,\n \"distance\" text,\n \"weight_kg\" real,\n \"time\" text,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: What venue has g1 as the group?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"2000_01_season_as_a_two_year_old\" WHERE \"group\"='g1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What's the highest Points with the Team of Tacuary, and has Losses that's smaller than 4?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"torneo_apertura\" WHERE \"team\"='tacuary' AND \"losses\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What's the sum of Losses that Scored larger than 15, has Points that's larger than 16, and Played that's larger than 9?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"losses\") FROM \"torneo_apertura\" WHERE \"scored\">15 AND \"points\">16 AND \"played\">9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What's the highest Played with a Scored of 15, and Draws that's less than 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"played\") FROM \"torneo_apertura\" WHERE \"scored\"=15 AND \"draws\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What's the sum of WIns with Draws that's larger than 1, Losses that's smaller than 4, and Conceded of 20?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"wins\") FROM \"torneo_apertura\" WHERE \"draws\">1 AND \"losses\"<4 AND \"conceded\"=20;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What's the lowest Position with a Conceded that's larger than 16, Draws of 3, and Losses that's larger than 3?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"position\") FROM \"torneo_apertura\" WHERE \"conceded\">16 AND \"draws\"=3 AND \"losses\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series\" (\n \"model\" text,\n \"processors_supported\" text,\n \"fsb_ht_frequency_m_hz\" text,\n \"memory\" text,\n \"pci_express\" text,\n \"sata\" text,\n \"pata\" text,\n \"sound\" text\n);\n\nQuestion: Which processors are supported with a PCI-express of x16: 1 slot x1: 4 slots and the nforce 550 model?"
},
{
"role": "assistant",
"content": "SELECT \"processors_supported\" FROM \"series\" WHERE \"pci_express\"='x16: 1 slot x1: 4 slots' AND \"model\"='nforce 550';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series\" (\n \"model\" text,\n \"processors_supported\" text,\n \"fsb_ht_frequency_m_hz\" text,\n \"memory\" text,\n \"pci_express\" text,\n \"sata\" text,\n \"pata\" text,\n \"sound\" text\n);\n\nQuestion: What are the processors supported by a ddr2 memory and the nforce 550 model?"
},
{
"role": "assistant",
"content": "SELECT \"processors_supported\" FROM \"series\" WHERE \"memory\"='ddr2' AND \"model\"='nforce 550';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series\" (\n \"model\" text,\n \"processors_supported\" text,\n \"fsb_ht_frequency_m_hz\" text,\n \"memory\" text,\n \"pci_express\" text,\n \"sata\" text,\n \"pata\" text,\n \"sound\" text\n);\n\nQuestion: What is the PCI-express with a ddr2 memory and a nforce 520 model?"
},
{
"role": "assistant",
"content": "SELECT \"pci_express\" FROM \"series\" WHERE \"memory\"='ddr2' AND \"model\"='nforce 520';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"liquid_measures\" (\n \"unit\" text,\n \"russian\" text,\n \"translation\" text,\n \"ratio\" text,\n \"cubic_inches_exact\" text,\n \"metric_value\" text,\n \"imperial\" text,\n \"us_customary\" text\n);\n\nQuestion: What is the Russian word for wine glass that contains 4.16 fl. oz.?"
},
{
"role": "assistant",
"content": "SELECT \"russian\" FROM \"liquid_measures\" WHERE \"us_customary\"='4.16 fl. oz.';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"liquid_measures\" (\n \"unit\" text,\n \"russian\" text,\n \"translation\" text,\n \"ratio\" text,\n \"cubic_inches_exact\" text,\n \"metric_value\" text,\n \"imperial\" text,\n \"us_customary\" text\n);\n\nQuestion: What are the imperial size for the unit that has a ratio of 1/20?"
},
{
"role": "assistant",
"content": "SELECT \"imperial\" FROM \"liquid_measures\" WHERE \"ratio\"='1/20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"liquid_measures\" (\n \"unit\" text,\n \"russian\" text,\n \"translation\" text,\n \"ratio\" text,\n \"cubic_inches_exact\" text,\n \"metric_value\" text,\n \"imperial\" text,\n \"us_customary\" text\n);\n\nQuestion: How big in metric terms is the unit that has a ratio of 1/20?"
},
{
"role": "assistant",
"content": "SELECT \"metric_value\" FROM \"liquid_measures\" WHERE \"ratio\"='1/20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"liquid_measures\" (\n \"unit\" text,\n \"russian\" text,\n \"translation\" text,\n \"ratio\" text,\n \"cubic_inches_exact\" text,\n \"metric_value\" text,\n \"imperial\" text,\n \"us_customary\" text\n);\n\nQuestion: How large in US customary terms is the unit called butylka (vodochnaya)?"
},
{
"role": "assistant",
"content": "SELECT \"us_customary\" FROM \"liquid_measures\" WHERE \"unit\"='butylka (vodochnaya)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"liquid_measures\" (\n \"unit\" text,\n \"russian\" text,\n \"translation\" text,\n \"ratio\" text,\n \"cubic_inches_exact\" text,\n \"metric_value\" text,\n \"imperial\" text,\n \"us_customary\" text\n);\n\nQuestion: What is the translation of chetvert?"
},
{
"role": "assistant",
"content": "SELECT \"translation\" FROM \"liquid_measures\" WHERE \"unit\"='chetvert';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"liquid_measures\" (\n \"unit\" text,\n \"russian\" text,\n \"translation\" text,\n \"ratio\" text,\n \"cubic_inches_exact\" text,\n \"metric_value\" text,\n \"imperial\" text,\n \"us_customary\" text\n);\n\nQuestion: What Russian word translates to bucket?"
},
{
"role": "assistant",
"content": "SELECT \"russian\" FROM \"liquid_measures\" WHERE \"translation\"='bucket';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"pos\" real,\n \"matches\" real,\n \"wins\" real,\n \"loses\" real,\n \"results\" text,\n \"points\" real,\n \"diff\" text\n);\n\nQuestion: Points larger than 6, and a Results of 522:443 had what lowest matches?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"matches\") FROM \"results\" WHERE \"points\">6 AND \"results\"='522:443';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"pos\" real,\n \"matches\" real,\n \"wins\" real,\n \"loses\" real,\n \"results\" text,\n \"points\" real,\n \"diff\" text\n);\n\nQuestion: Loses of 2, and a Pos. smaller than 2 had how many highest matches?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"matches\") FROM \"results\" WHERE \"loses\"=2 AND \"pos\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_6_5_titles_1_runner_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome when the game was played on clay and on 2 May 2009?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles_6_5_titles_1_runner_up\" WHERE \"surface\"='clay' AND \"date\"='2 may 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_6_5_titles_1_runner_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What person was played against when the playing surface was hard?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"doubles_6_5_titles_1_runner_up\" WHERE \"surface\"='hard';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_6_5_titles_1_runner_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: With the score of 6\u20133, 2\u20136, [10\u20138] and played on clay who was the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"doubles_6_5_titles_1_runner_up\" WHERE \"surface\"='clay' AND \"score\"='6\u20133, 2\u20136, [10\u20138]';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1900_1912\" (\n \"average_population_x_1_000\" real,\n \"live_births\" real,\n \"deaths\" real,\n \"natural_change\" real,\n \"crude_birth_rate_per_1_000\" real,\n \"crude_death_rate_per_1_000\" real,\n \"natural_change_per_1_000\" real\n);\n\nQuestion: What is the lowest number of live births of Syria when the natural change was 9.4 and the crude death rate was greater than 29.3?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"live_births\") FROM \"1900_1912\" WHERE \"natural_change_per_1_000\"=9.4 AND \"crude_death_rate_per_1_000\">29.3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1900_1912\" (\n \"average_population_x_1_000\" real,\n \"live_births\" real,\n \"deaths\" real,\n \"natural_change\" real,\n \"crude_birth_rate_per_1_000\" real,\n \"crude_death_rate_per_1_000\" real,\n \"natural_change_per_1_000\" real\n);\n\nQuestion: What is the natural change number of Syria when there were 67,000 deaths and an average population greater than 2,820?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"natural_change\") FROM \"1900_1912\" WHERE \"deaths\"='67,000' AND \"average_population_x_1_000\">'2,820';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013_winners\" (\n \"category\" text,\n \"rank\" real,\n \"2013_recipient\" text,\n \"location\" text,\n \"vote\" text\n);\n\nQuestion: What is the rank of the park in pigeon forge, tennessee in the best food category?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"2013_winners\" WHERE \"location\"='pigeon forge, tennessee' AND \"category\"='best food';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"under_construction\" (\n \"name\" text,\n \"pinnacle_height\" text,\n \"floors\" real,\n \"completion\" real,\n \"city\" text\n);\n\nQuestion: What building is in Shenzhen, have less than 115 floors, and was completed before 2017?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"under_construction\" WHERE \"city\"='shenzhen' AND \"completion\"<2017 AND \"floors\"<115;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: What is the earliest year having a length of 11:25?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"official_versions\" WHERE \"length\"='11:25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_versions\" (\n \"version\" text,\n \"length\" text,\n \"album\" text,\n \"remixed_by\" text,\n \"year\" real\n);\n\nQuestion: What year had a version called Wolf Mix?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"official_versions\" WHERE \"version\"='wolf mix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cowboys_drafted_into_the_nfl\" (\n \"draft_year\" real,\n \"player\" text,\n \"position\" text,\n \"round\" real,\n \"overall\" real,\n \"nfl_team\" text\n);\n\nQuestion: In 1978 what is the NFL team?"
},
{
"role": "assistant",
"content": "SELECT \"nfl_team\" FROM \"cowboys_drafted_into_the_nfl\" WHERE \"draft_year\"=1978;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the opponent with attendance at 64,002?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\"='64,002';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What was the highest week with 84,856 in attendance?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"attendance\"='84,856';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What was the record in a week less than 13 on November 9, 2003?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule\" WHERE \"week\"<13 AND \"date\"='november 9, 2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: On what date was the result w 20-17?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"result\"='w 20-17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance for record 2-0?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"record\"='2-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: On what date was the game at Lincoln Financial Field?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"game_site\"='lincoln financial field';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which player has a pick of 175?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"nfl_draft\" WHERE \"pick\"=175;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Zack Jordan has the lowest pick and a round of less than 28?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick\") FROM \"nfl_draft\" WHERE \"player\"='zack jordan' AND \"round\"<28;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the sum of the pick for player roger zatkoff?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pick\") FROM \"nfl_draft\" WHERE \"player\"='roger zatkoff';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"aluminium_series\" (\n \"denomination\" text,\n \"metal\" text,\n \"weight\" text,\n \"shape\" text,\n \"size\" text\n);\n\nQuestion: Which metal has a size that is 26mm (across scallops)?"
},
{
"role": "assistant",
"content": "SELECT \"metal\" FROM \"aluminium_series\" WHERE \"size\"='26mm (across scallops)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"aluminium_series\" (\n \"denomination\" text,\n \"metal\" text,\n \"weight\" text,\n \"shape\" text,\n \"size\" text\n);\n\nQuestion: What is the weight with the shape of scalloped, and that is a size of 20mm (across scallops)?"
},
{
"role": "assistant",
"content": "SELECT \"weight\" FROM \"aluminium_series\" WHERE \"shape\"='scalloped' AND \"size\"='20mm (across scallops)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"aluminium_series\" (\n \"denomination\" text,\n \"metal\" text,\n \"weight\" text,\n \"shape\" text,\n \"size\" text\n);\n\nQuestion: What is the weight with a denomination that is three paise?"
},
{
"role": "assistant",
"content": "SELECT \"weight\" FROM \"aluminium_series\" WHERE \"denomination\"='three paise';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"aluminium_series\" (\n \"denomination\" text,\n \"metal\" text,\n \"weight\" text,\n \"shape\" text,\n \"size\" text\n);\n\nQuestion: What is the weight with a denomination that is ten paise?"
},
{
"role": "assistant",
"content": "SELECT \"weight\" FROM \"aluminium_series\" WHERE \"denomination\"='ten paise';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_c_hungary\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the highest number of games drawn, where the games played was less than 7?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"drawn\") FROM \"world_championship_group_c_hungary\" WHERE \"games\"<7;"
}
] |
[
{
"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 \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which October is the lowest one that has an Opponent of washington capitals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"october\") FROM \"game_log\" WHERE \"opponent\"='washington capitals';"
}
] |
[
{
"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 \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Score has a Game larger than 7, and Points smaller than 14?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\">7 AND \"points\"<14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many Points have an Opponent of @ calgary flames?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"game_log\" WHERE \"opponent\"='@ calgary flames';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: What is the mean number of events where the rank is 1 and there are more than 3 wins?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"events\") FROM \"leaders\" WHERE \"rank\"=1 AND \"wins\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"argentine_clubs_in_international_competi\" (\n \"team\" text,\n \"recopa_1994\" text,\n \"supercopa_1994\" text,\n \"conmebol_1994\" text,\n \"copa_libertadores_1995\" text\n);\n\nQuestion: Which Supercopa 1994 has a Team of estudiantes?"
},
{
"role": "assistant",
"content": "SELECT \"supercopa_1994\" FROM \"argentine_clubs_in_international_competi\" WHERE \"team\"='estudiantes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"argentine_clubs_in_international_competi\" (\n \"team\" text,\n \"recopa_1994\" text,\n \"supercopa_1994\" text,\n \"conmebol_1994\" text,\n \"copa_libertadores_1995\" text\n);\n\nQuestion: Which CONMEBOL 1994 has a Supercopa 1994 of n/a, and a Recopa 1994 of n/a, and a Team of san lorenzo?"
},
{
"role": "assistant",
"content": "SELECT \"conmebol_1994\" FROM \"argentine_clubs_in_international_competi\" WHERE \"supercopa_1994\"='n/a' AND \"recopa_1994\"='n/a' AND \"team\"='san lorenzo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"argentine_clubs_in_international_competi\" (\n \"team\" text,\n \"recopa_1994\" text,\n \"supercopa_1994\" text,\n \"conmebol_1994\" text,\n \"copa_libertadores_1995\" text\n);\n\nQuestion: Which Recopa 1994 has a Supercopa 1994 of 1st round, and a Team of argentinos juniors?"
},
{
"role": "assistant",
"content": "SELECT \"recopa_1994\" FROM \"argentine_clubs_in_international_competi\" WHERE \"supercopa_1994\"='1st round' AND \"team\"='argentinos juniors';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"argentine_clubs_in_international_competi\" (\n \"team\" text,\n \"recopa_1994\" text,\n \"supercopa_1994\" text,\n \"conmebol_1994\" text,\n \"copa_libertadores_1995\" text\n);\n\nQuestion: Which Team has a Recopa 1994 of n/a and a CONMEBOL 1994 of 1st round?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"argentine_clubs_in_international_competi\" WHERE \"recopa_1994\"='n/a' AND \"conmebol_1994\"='1st round';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary_of_election_results_1973_2003\" (\n \"election\" real,\n \"labour\" real,\n \"conservative\" real,\n \"liberal\" real,\n \"social_democratic_party\" real,\n \"social_and_liberal_democrats_liberal_democrats\" real,\n \"independent\" real,\n \"green\" real,\n \"other\" text,\n \"control\" text\n);\n\nQuestion: Which Social and Liberal Democrats/ Liberal Democrats has a Control of labour hold, and a Liberal larger than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"social_and_liberal_democrats_liberal_democrats\") FROM \"summary_of_election_results_1973_2003\" WHERE \"control\"='labour hold' AND \"liberal\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary_of_election_results_1973_2003\" (\n \"election\" real,\n \"labour\" real,\n \"conservative\" real,\n \"liberal\" real,\n \"social_democratic_party\" real,\n \"social_and_liberal_democrats_liberal_democrats\" real,\n \"independent\" real,\n \"green\" real,\n \"other\" text,\n \"control\" text\n);\n\nQuestion: Which Social and Liberal Democrats/ Liberal Democrats has an Independent of 1, and an Election larger than 1988, and a Green smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT \"social_and_liberal_democrats_liberal_democrats\" FROM \"summary_of_election_results_1973_2003\" WHERE \"independent\"=1 AND \"election\">1988 AND \"green\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary_of_election_results_1973_2003\" (\n \"election\" real,\n \"labour\" real,\n \"conservative\" real,\n \"liberal\" real,\n \"social_democratic_party\" real,\n \"social_and_liberal_democrats_liberal_democrats\" real,\n \"independent\" real,\n \"green\" real,\n \"other\" text,\n \"control\" text\n);\n\nQuestion: Which Other has a Green of 0, and an Independent of 1, and a Labour smaller than 45, and a Control of labour lose to no overall control?"
},
{
"role": "assistant",
"content": "SELECT \"other\" FROM \"summary_of_election_results_1973_2003\" WHERE \"green\"=0 AND \"independent\"=1 AND \"labour\"<45 AND \"control\"='labour lose to no overall control';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary_of_election_results_1973_2003\" (\n \"election\" real,\n \"labour\" real,\n \"conservative\" real,\n \"liberal\" real,\n \"social_democratic_party\" real,\n \"social_and_liberal_democrats_liberal_democrats\" real,\n \"independent\" real,\n \"green\" real,\n \"other\" text,\n \"control\" text\n);\n\nQuestion: Which Social Democratic Party has a Green smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"social_democratic_party\") FROM \"summary_of_election_results_1973_2003\" WHERE \"green\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: When the try bonus was 10 what was the losing bonus?"
},
{
"role": "assistant",
"content": "SELECT \"losing_bonus\" FROM \"2009_2010_table\" WHERE \"try_bonus\"='10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: When the losing bonus was 2 what was drawn score?"
},
{
"role": "assistant",
"content": "SELECT \"drawn\" FROM \"2009_2010_table\" WHERE \"losing_bonus\"='2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: If the try bonus was 5 what was the try against score?"
},
{
"role": "assistant",
"content": "SELECT \"tries_against\" FROM \"2009_2010_table\" WHERE \"try_bonus\"='5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: When the tries against is 90 how many points are there?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"2009_2010_table\" WHERE \"tries_against\"='90';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What club has tries against of 75?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"2009_2010_table\" WHERE \"tries_against\"='75';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the total number of overall figures when duke was the college and the round was higher than 7?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"college\"='duke' AND \"round\">7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which of the highest pick numbers had a round of less than 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick_num\") FROM \"atlanta_falcons_draft_history\" WHERE \"round\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which pick number had a round of less than 7, an overall of less than 127, and where the name was Robert Alford?"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"atlanta_falcons_draft_history\" WHERE \"round\"<7 AND \"overall\"<127 AND \"name\"='robert alford';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which highest overall figure had Robert Alford as a name and a round of more than 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"name\"='robert alford' AND \"round\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What Game site has an Opponent of Miami Dolphins?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"schedule\" WHERE \"opponent\"='miami dolphins';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What's the Lowest Attendance with a Game site of Riverfront Stadium?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"schedule\" WHERE \"game_site\"='riverfront stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What's the lowest Attendance for a Week of 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"schedule\" WHERE \"week\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronze medals does South Korea have?"
},
{
"role": "assistant",
"content": "SELECT \"bronze\" FROM \"medal_table\" WHERE \"nation\"='south korea';"
}
] |
[
{
"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 smallest number of total medals for Georgia with 0 silver and 1 bronze?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"silver\">0 AND \"nation\"='georgia' AND \"bronze\"<1;"
}
] |
[
{
"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 \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What is the lowest year that had foil team as the event at Melbourne?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"achievements\" WHERE \"event\"='foil team' AND \"venue\"='melbourne';"
}
] |
[
{
"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 \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What is the number of years that the event was foil team and took place in Los Angeles?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"achievements\" WHERE \"venue\"='los angeles' AND \"event\"='foil team';"
}
] |
[
{
"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 \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What was the position at the venue of lyon?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"achievements\" WHERE \"venue\"='lyon';"
}
] |
[
{
"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 \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What was the position for mauro at the world championships in 1985 during the foil individual event?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"achievements\" WHERE \"event\"='foil individual' AND \"competition\"='world championships' AND \"year\"=1985;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season_record\" (\n \"season\" text,\n \"points\" text,\n \"finish\" text,\n \"playoffs\" text,\n \"head_coach\" text\n);\n\nQuestion: What was the playoff status when the head coach was Brent Sutter, the finish was 4th central, and the points were 82?"
},
{
"role": "assistant",
"content": "SELECT \"playoffs\" FROM \"season_by_season_record\" WHERE \"head_coach\"='brent sutter' AND \"finish\"='4th central' AND \"points\"='82';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_tournaments\" (\n \"tournament\" text,\n \"1998\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: 2001 of 2\u20134 was in which tournament?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"grand_slam_tournaments\" WHERE \"2001\"='2\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_tournaments\" (\n \"tournament\" text,\n \"1998\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: 2013 of 4\u20134 is involved in what 2006?"
},
{
"role": "assistant",
"content": "SELECT \"2006\" FROM \"grand_slam_tournaments\" WHERE \"2013\"='4\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_tournaments\" (\n \"tournament\" text,\n \"1998\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: 2007 of 1r is involved in what 2001?"
},
{
"role": "assistant",
"content": "SELECT \"2001\" FROM \"grand_slam_tournaments\" WHERE \"2007\"='1r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_tournaments\" (\n \"tournament\" text,\n \"1998\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: 2007 of 8\u20134 is involved in what 2002?"
},
{
"role": "assistant",
"content": "SELECT \"2002\" FROM \"grand_slam_tournaments\" WHERE \"2007\"='8\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_tournaments\" (\n \"tournament\" text,\n \"1998\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: 2005 of 3r, and a 2000 of lq, and a 2002 of 3r is in what 2004?"
},
{
"role": "assistant",
"content": "SELECT \"2004\" FROM \"grand_slam_tournaments\" WHERE \"2005\"='3r' AND \"2000\"='lq' AND \"2002\"='3r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_tournaments\" (\n \"tournament\" text,\n \"1998\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: 2006 of 10\u20134 is in which 2000?"
},
{
"role": "assistant",
"content": "SELECT \"2000\" FROM \"grand_slam_tournaments\" WHERE \"2006\"='10\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_c_poland\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the smallest number of drawn games when there are fewer than 4 points and more than 4 lost games?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"drawn\") FROM \"world_championship_group_c_poland\" WHERE \"points\"<4 AND \"lost\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_c_poland\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the sum of the points when there are fewer than 4 games?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"world_championship_group_c_poland\" WHERE \"games\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"country\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who holds the lead role when Aanders Brorson is third?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"teams\" WHERE \"third\"='aanders brorson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"country\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who has the role of skip when the lead is Dominik Greindl?"
},
{
"role": "assistant",
"content": "SELECT \"skip\" FROM \"teams\" WHERE \"lead\"='dominik greindl';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.