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 \"names_in_national_languages\" (\n \"abbr\" text,\n \"common_english\" text,\n \"french\" text,\n \"italian\" text,\n \"romansh\" text\n);\n\nQuestion: What is the french word for fribourg?"
},
{
"role": "assistant",
"content": "SELECT \"french\" FROM \"names_in_national_languages\" WHERE \"common_english\"='fribourg';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"names_in_national_languages\" (\n \"abbr\" text,\n \"common_english\" text,\n \"french\" text,\n \"italian\" text,\n \"romansh\" text\n);\n\nQuestion: What is the abbr for zug?"
},
{
"role": "assistant",
"content": "SELECT \"abbr\" FROM \"names_in_national_languages\" WHERE \"common_english\"='zug';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"date\" text,\n \"race\" text,\n \"track\" text,\n \"location\" text,\n \"distance\" text,\n \"surface\" text,\n \"purse\" text,\n \"finish\" text\n);\n\nQuestion: What is the Finish on June 1, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"race_record\" WHERE \"date\"='june 1, 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"date\" text,\n \"race\" text,\n \"track\" text,\n \"location\" text,\n \"distance\" text,\n \"surface\" text,\n \"purse\" text,\n \"finish\" text\n);\n\nQuestion: What is the Track in Louisville, Kentucky?"
},
{
"role": "assistant",
"content": "SELECT \"track\" FROM \"race_record\" WHERE \"location\"='louisville, kentucky';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"date\" text,\n \"race\" text,\n \"track\" text,\n \"location\" text,\n \"distance\" text,\n \"surface\" text,\n \"purse\" text,\n \"finish\" text\n);\n\nQuestion: What is the Location of the Event on March 30, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"race_record\" WHERE \"date\"='march 30, 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"date\" text,\n \"race\" text,\n \"track\" text,\n \"location\" text,\n \"distance\" text,\n \"surface\" text,\n \"purse\" text,\n \"finish\" text\n);\n\nQuestion: What Race has a Purse of $300,000?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"race_record\" WHERE \"purse\"='$300,000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"date\" text,\n \"race\" text,\n \"track\" text,\n \"location\" text,\n \"distance\" text,\n \"surface\" text,\n \"purse\" text,\n \"finish\" text\n);\n\nQuestion: What is the Purse on January 3, 2010?"
},
{
"role": "assistant",
"content": "SELECT \"purse\" FROM \"race_record\" WHERE \"date\"='january 3, 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What did United States place when the score was 71-70-72-68=281?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_leaderboard\" WHERE \"country\"='united states' AND \"score\"='71-70-72-68=281';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What was the average money for United States when Lanny Wadkins played?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"money\") FROM \"final_leaderboard\" WHERE \"country\"='united states' AND \"player\"='lanny wadkins';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What was the to par when the score was 71-70-72-68=281?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_leaderboard\" WHERE \"score\"='71-70-72-68=281';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: What is the away team of the game with an attendance of 117?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"ties\" WHERE \"attendance\"=117;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: Madrid (Stuttgart) tournament with a 1996 of A has this for a Career SR?"
},
{
"role": "assistant",
"content": "SELECT \"career_sr\" FROM \"doubles_performance_timeline\" WHERE \"1996\"='a' AND \"tournament\"='madrid (stuttgart)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885\" (\n \"election\" text,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text\n);\n\nQuestion: Which election has a conservative first party, Rowland Smith as first member, and Sir Henry Wilmot, Bt as second member?"
},
{
"role": "assistant",
"content": "SELECT \"election\" FROM \"m_ps_1832_1885\" WHERE \"first_party\"='conservative' AND \"first_member\"='rowland smith' AND \"second_member\"='sir henry wilmot, bt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885\" (\n \"election\" text,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text\n);\n\nQuestion: Which of the first parties has second member as Charles Robert Colvile, and a liberal second party?"
},
{
"role": "assistant",
"content": "SELECT \"first_party\" FROM \"m_ps_1832_1885\" WHERE \"second_member\"='charles robert colvile' AND \"second_party\"='liberal';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885\" (\n \"election\" text,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text\n);\n\nQuestion: Which election has second member Charles Robert Colvile, a conservative first party, and first member William Mundy?"
},
{
"role": "assistant",
"content": "SELECT \"election\" FROM \"m_ps_1832_1885\" WHERE \"second_member\"='charles robert colvile' AND \"first_party\"='conservative' AND \"first_member\"='william mundy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885\" (\n \"election\" text,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text\n);\n\nQuestion: Which of the second parties has second member Charles Robert Colvile, a conservative first party, and first member William Mundy?"
},
{
"role": "assistant",
"content": "SELECT \"second_party\" FROM \"m_ps_1832_1885\" WHERE \"second_member\"='charles robert colvile' AND \"first_party\"='conservative' AND \"first_member\"='william mundy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885\" (\n \"election\" text,\n \"first_member\" text,\n \"first_party\" text,\n \"second_member\" text,\n \"second_party\" text\n);\n\nQuestion: Who is the first member in the 1868 election?"
},
{
"role": "assistant",
"content": "SELECT \"first_member\" FROM \"m_ps_1832_1885\" WHERE \"election\"='1868';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: WHAT IS THE SOURCE WITH A TYPE OF TRANSFER AND MEX?"
},
{
"role": "assistant",
"content": "SELECT \"source\" FROM \"out\" WHERE \"type\"='transfer' AND \"nat\"='mex';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: WHAT IS THE NAME WITH BAYER LEVERKUSEN?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"out\" WHERE \"moving_to\"='bayer leverkusen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: WHAT NAME HAS A FREE TRANSFER FREE AND RETIRED?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"out\" WHERE \"transfer_fee\"='free' AND \"moving_to\"='retired';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"out\" (\n \"nat\" text,\n \"name\" text,\n \"moving_to\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: WHAT TRANSFER FEE HAS A TYPE OF TRANSFER FOR DOS SANTOS?"
},
{
"role": "assistant",
"content": "SELECT \"transfer_fee\" FROM \"out\" WHERE \"type\"='transfer' AND \"name\"='dos santos';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals_6_balls\" (\n \"place\" real,\n \"nation\" text,\n \"all_around\" real,\n \"final\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of the all around with a 37.75 total?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"all_around\") FROM \"finals_6_balls\" WHERE \"total\"=37.75;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals_6_balls\" (\n \"place\" real,\n \"nation\" text,\n \"all_around\" real,\n \"final\" real,\n \"total\" real\n);\n\nQuestion: What is the average final with an all around larger than 19.4 and total more than 39.9?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"final\") FROM \"finals_6_balls\" WHERE \"all_around\">19.4 AND \"total\">39.9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_effects\" (\n \"name\" text,\n \"dates_active\" text,\n \"windspeeds\" text,\n \"pressure\" text,\n \"deaths\" text\n);\n\nQuestion: What is the name of the storm active during season aggregates?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"season_effects\" WHERE \"dates_active\"='season aggregates';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text,\n \"report\" text\n);\n\nQuestion: What report has tour match as the status, with an against less than 22?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"matches\" WHERE \"status\"='tour match' AND \"against\"<22;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text,\n \"report\" text\n);\n\nQuestion: How many againsts have asba park, kimberley as the venue?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"against\") FROM \"matches\" WHERE \"venue\"='asba park, kimberley';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text,\n \"report\" text\n);\n\nQuestion: What status has gauteng falcons as the opposing team?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"matches\" WHERE \"opposing_team\"='gauteng falcons';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text,\n \"report\" text\n);\n\nQuestion: What opposing team has second test as the status?"
},
{
"role": "assistant",
"content": "SELECT \"opposing_team\" FROM \"matches\" WHERE \"status\"='second test';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text,\n \"report\" text\n);\n\nQuestion: What report has gauteng falcons as the opposing team?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"matches\" WHERE \"opposing_team\"='gauteng falcons';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text,\n \"report\" text\n);\n\nQuestion: What status has 18 as the against?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"matches\" WHERE \"against\"=18;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparative_performance_in_the_latin_ame\" (\n \"selected_caribbean_and_n_latin_america_countries\" text,\n \"internl_tourist_arrivals_2011_x1000\" real,\n \"internl_tourism_receipts_2011_million_usd\" text,\n \"receipts_per_arrival_2010_col_2_col_1_usd\" text,\n \"receipts_per_capita_2005_usd\" real,\n \"revenues_as_pct_of_exports_goods_and_services_2011\" text\n);\n\nQuestion: What is the number of recepits per arrival in 2010 (col 2)/(col 1) USD with colombia (1) as the selected carribean and latin american country?"
},
{
"role": "assistant",
"content": "SELECT \"receipts_per_arrival_2010_col_2_col_1_usd\" FROM \"comparative_performance_in_the_latin_ame\" WHERE \"selected_caribbean_and_n_latin_america_countries\"='colombia (1)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"initial_unstressed_syllables\" (\n \"initial_syllable_open_semi_open_unstressed_vowels\" text,\n \"17th_c\" text,\n \"american\" text,\n \"british\" text,\n \"australian\" text,\n \"examples\" text\n);\n\nQuestion: What is 17th c., when Initial-Syllable Open/Semi-Open Unstressed Vowels is \"o /\u0275/\"?"
},
{
"role": "assistant",
"content": "SELECT \"17th_c\" FROM \"initial_unstressed_syllables\" WHERE \"initial_syllable_open_semi_open_unstressed_vowels\"='o /\u0275/';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"initial_unstressed_syllables\" (\n \"initial_syllable_open_semi_open_unstressed_vowels\" text,\n \"17th_c\" text,\n \"american\" text,\n \"british\" text,\n \"australian\" text,\n \"examples\" text\n);\n\nQuestion: What is British, when Examples is \"November, rotunda, colossus, proscenium\"?"
},
{
"role": "assistant",
"content": "SELECT \"british\" FROM \"initial_unstressed_syllables\" WHERE \"examples\"='november, rotunda, colossus, proscenium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"initial_unstressed_syllables\" (\n \"initial_syllable_open_semi_open_unstressed_vowels\" text,\n \"17th_c\" text,\n \"american\" text,\n \"british\" text,\n \"australian\" text,\n \"examples\" text\n);\n\nQuestion: What is American, when British is \"\u026a, \u0259\", and when Initial-Syllable Open/Semi-Open Unstressed Vowels is \"\u00e6 /\u0268/\"?"
},
{
"role": "assistant",
"content": "SELECT \"american\" FROM \"initial_unstressed_syllables\" WHERE \"british\"='\u026a, \u0259' AND \"initial_syllable_open_semi_open_unstressed_vowels\"='\u00e6 /\u0268/';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"initial_unstressed_syllables\" (\n \"initial_syllable_open_semi_open_unstressed_vowels\" text,\n \"17th_c\" text,\n \"american\" text,\n \"british\" text,\n \"australian\" text,\n \"examples\" text\n);\n\nQuestion: What is Initial-Syllable Open/Semi-Open Unstresses Vowels, when Australian is \"\u0259\"?"
},
{
"role": "assistant",
"content": "SELECT \"initial_syllable_open_semi_open_unstressed_vowels\" FROM \"initial_unstressed_syllables\" WHERE \"australian\"='\u0259';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"initial_unstressed_syllables\" (\n \"initial_syllable_open_semi_open_unstressed_vowels\" text,\n \"17th_c\" text,\n \"american\" text,\n \"british\" text,\n \"australian\" text,\n \"examples\" text\n);\n\nQuestion: What is Australian, when British is \"a\u026a, \u026a, \u0259\"?"
},
{
"role": "assistant",
"content": "SELECT \"australian\" FROM \"initial_unstressed_syllables\" WHERE \"british\"='a\u026a, \u026a, \u0259';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"initial_unstressed_syllables\" (\n \"initial_syllable_open_semi_open_unstressed_vowels\" text,\n \"17th_c\" text,\n \"american\" text,\n \"british\" text,\n \"australian\" text,\n \"examples\" text\n);\n\nQuestion: What is American, when Initial-Syllable Open/Semi-Open Unstressed Vowels is \"y /a\u026a, \u0268/\"?"
},
{
"role": "assistant",
"content": "SELECT \"american\" FROM \"initial_unstressed_syllables\" WHERE \"initial_syllable_open_semi_open_unstressed_vowels\"='y /a\u026a, \u0268/';"
}
]
|
[
{
"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 \"catalog\" text\n);\n\nQuestion: What is the date for catalog RCD 10160?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalog\"='rcd 10160';"
}
]
|
[
{
"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 \"catalog\" text\n);\n\nQuestion: What country has CD format and catalog RCD 10523?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"release_history\" WHERE \"format\"='cd' AND \"catalog\"='rcd 10523';"
}
]
|
[
{
"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 \"catalog\" text\n);\n\nQuestion: Which country is dated October 20, 1976?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"release_history\" WHERE \"date\"='october 20, 1976';"
}
]
|
[
{
"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 \"catalog\" text\n);\n\nQuestion: Which label has the catalog CDZAP22?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"catalog\"='cdzap22';"
}
]
|
[
{
"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 \"catalog\" text\n);\n\nQuestion: What is the date for the catalog CDZAP22 in the United Kingdom?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"country\"='united kingdom' AND \"catalog\"='cdzap22';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is Place, when Score is \"66\", when Country is \"United States\", and when Player is \"Dudley Hart\"?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"first_round\" WHERE \"score\"=66 AND \"country\"='united states' AND \"player\"='dudley hart';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is the lowest Score, when Place is \"1\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"score\") FROM \"first_round\" WHERE \"place\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is To Par, when Score is \"66\", and when Player is \"Brad Faxon\"?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"score\"=66 AND \"player\"='brad faxon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pro_am_event_finals_5_4_titles_1_runner_\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the Opponent in the final after 2008 at the Paul Hunter Classic?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"pro_am_event_finals_5_4_titles_1_runner_\" WHERE \"year\">2008 AND \"championship\"='paul hunter classic';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is the latest year for first elected with john hostettler as incumbent and a result of lost re-election democratic gain?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"first_elected\") FROM \"indiana\" WHERE \"results\"='lost re-election democratic gain' AND \"incumbent\"='john hostettler';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"onshore_pipelines\" (\n \"name_year_commissioned\" text,\n \"owner_operator\" text,\n \"length\" text,\n \"maximum_diameter\" text,\n \"from_to\" text,\n \"licence_number\" text\n);\n\nQuestion: Who is the owner/operator of the line from Kambalda to Esperance?"
},
{
"role": "assistant",
"content": "SELECT \"owner_operator\" FROM \"onshore_pipelines\" WHERE \"from_to\"='kambalda to esperance';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"onshore_pipelines\" (\n \"name_year_commissioned\" text,\n \"owner_operator\" text,\n \"length\" text,\n \"maximum_diameter\" text,\n \"from_to\" text,\n \"licence_number\" text\n);\n\nQuestion: What is the name of the line from Karratha to Port Hedland?"
},
{
"role": "assistant",
"content": "SELECT \"name_year_commissioned\" FROM \"onshore_pipelines\" WHERE \"from_to\"='karratha to port hedland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"onshore_pipelines\" (\n \"name_year_commissioned\" text,\n \"owner_operator\" text,\n \"length\" text,\n \"maximum_diameter\" text,\n \"from_to\" text,\n \"licence_number\" text\n);\n\nQuestion: What is the maximum diameter of the Mid West Gas Pipeline (1999)?"
},
{
"role": "assistant",
"content": "SELECT \"maximum_diameter\" FROM \"onshore_pipelines\" WHERE \"name_year_commissioned\"='mid west gas pipeline (1999)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"onshore_pipelines\" (\n \"name_year_commissioned\" text,\n \"owner_operator\" text,\n \"length\" text,\n \"maximum_diameter\" text,\n \"from_to\" text,\n \"licence_number\" text\n);\n\nQuestion: Who is the owner operator who has license number PL 59?"
},
{
"role": "assistant",
"content": "SELECT \"owner_operator\" FROM \"onshore_pipelines\" WHERE \"licence_number\"='pl 59';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"onshore_pipelines\" (\n \"name_year_commissioned\" text,\n \"owner_operator\" text,\n \"length\" text,\n \"maximum_diameter\" text,\n \"from_to\" text,\n \"licence_number\" text\n);\n\nQuestion: What is the license number where the maximum diameter is 400 mm?"
},
{
"role": "assistant",
"content": "SELECT \"licence_number\" FROM \"onshore_pipelines\" WHERE \"maximum_diameter\"='400 mm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"onshore_pipelines\" (\n \"name_year_commissioned\" text,\n \"owner_operator\" text,\n \"length\" text,\n \"maximum_diameter\" text,\n \"from_to\" text,\n \"licence_number\" text\n);\n\nQuestion: What is the name where the license number is PL 22?"
},
{
"role": "assistant",
"content": "SELECT \"name_year_commissioned\" FROM \"onshore_pipelines\" WHERE \"licence_number\"='pl 22';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1978\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Which venue has 16 against?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"1978\" WHERE \"against\"=16;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1978\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the against for the opposing team of Wales with the status of Five Nations?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"against\") FROM \"1978\" WHERE \"status\"='five nations' AND \"opposing_teams\"='wales';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"one_day_internationals\" (\n \"rank\" real,\n \"player\" text,\n \"runs\" real,\n \"average\" real,\n \"career\" text\n);\n\nQuestion: Can you tell me the average Average that has the Rank larger than 4, and the Player of dean minors?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"average\") FROM \"one_day_internationals\" WHERE \"rank\">4 AND \"player\"='dean minors';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"venue\" text,\n \"location\" text\n);\n\nQuestion: What is the venue where john zibnack was the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"winners\" WHERE \"runner_up\"='john zibnack';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"venue\" text,\n \"location\" text\n);\n\nQuestion: Who is the winner in des moines, iowa where p.h. finkbank was the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"winners\" WHERE \"location\"='des moines, iowa' AND \"runner_up\"='p.h. finkbank';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"venue\" text,\n \"location\" text\n);\n\nQuestion: What is the location where ed c. kingsley was the runner-up in 1939?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"winners\" WHERE \"runner_up\"='ed c. kingsley' AND \"year\"='1939';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"venue\" text,\n \"location\" text\n);\n\nQuestion: Who is the winner when mark fuller was the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"winners\" WHERE \"runner_up\"='mark fuller';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"venue\" text,\n \"location\" text\n);\n\nQuestion: What is the venue in 2002?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"winners\" WHERE \"year\"='2002';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"venue\" text,\n \"location\" text\n);\n\nQuestion: Who is the runner-up in 1901?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"winners\" WHERE \"year\"='1901';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"short_vowels\" (\n \"short_vowels\" text,\n \"17th_c\" text,\n \"american\" text,\n \"british\" text,\n \"australian\" text\n);\n\nQuestion: What Australian sound is equivalent to e /\u025b/?"
},
{
"role": "assistant",
"content": "SELECT \"australian\" FROM \"short_vowels\" WHERE \"short_vowels\"='e /\u025b/';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game when they played at new york islanders?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"regular_season\" WHERE \"home\"='new york islanders';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"spelling\" (\n \"a_dyck\" text,\n \"h_rempel\" text,\n \"r_epp\" text,\n \"j_thiessen\" text,\n \"j_j_neufeld\" text,\n \"ed_zacharias\" text,\n \"word_meaning\" text\n);\n\nQuestion: Which of the R. Epp, has J Thiessen of Tjoatj?"
},
{
"role": "assistant",
"content": "SELECT \"r_epp\" FROM \"spelling\" WHERE \"j_thiessen\"='tjoatj';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"spelling\" (\n \"a_dyck\" text,\n \"h_rempel\" text,\n \"r_epp\" text,\n \"j_thiessen\" text,\n \"j_j_neufeld\" text,\n \"ed_zacharias\" text,\n \"word_meaning\" text\n);\n\nQuestion: Which of the R. Epp, has Ed Zacharias from Rollen, Jerolt, Golt?"
},
{
"role": "assistant",
"content": "SELECT \"r_epp\" FROM \"spelling\" WHERE \"ed_zacharias\"='rollen, jerolt, golt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"spelling\" (\n \"a_dyck\" text,\n \"h_rempel\" text,\n \"r_epp\" text,\n \"j_thiessen\" text,\n \"j_j_neufeld\" text,\n \"ed_zacharias\" text,\n \"word_meaning\" text\n);\n\nQuestion: Which of the A. Dyck has J. Thiessen of Du?"
},
{
"role": "assistant",
"content": "SELECT \"a_dyck\" FROM \"spelling\" WHERE \"j_thiessen\"='du';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"spelling\" (\n \"a_dyck\" text,\n \"h_rempel\" text,\n \"r_epp\" text,\n \"j_thiessen\" text,\n \"j_j_neufeld\" text,\n \"ed_zacharias\" text,\n \"word_meaning\" text\n);\n\nQuestion: Which of the H. Rempel has J. J. Neufeld of Sajen?"
},
{
"role": "assistant",
"content": "SELECT \"h_rempel\" FROM \"spelling\" WHERE \"j_j_neufeld\"='sajen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2003\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the sum of Against, when Status is \"Six Nations\", and when Date is \"30/03/2003\"?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"against\") FROM \"2003\" WHERE \"status\"='six nations' AND \"date\"='30/03/2003';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2003\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is Opposing Teams, when Against is less than 6?"
},
{
"role": "assistant",
"content": "SELECT \"opposing_teams\" FROM \"2003\" WHERE \"against\"<6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2003\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is Date, when Against is \"22\"?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2003\" WHERE \"against\"=22;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What shows for money (\u00a3) when South Africa is the country?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"money\") FROM \"final_round\" WHERE \"country\"='south africa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the To par when Lanny Wadkins is the player?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"player\"='lanny wadkins';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_9_6_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the score of the marco island tournament match when Kathleen Horvath won runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_9_6_3\" WHERE \"outcome\"='runner-up' AND \"tournament\"='marco island';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_9_6_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the tournament that was on july 6, 1987?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_9_6_3\" WHERE \"date\"='july 6, 1987';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1962_pro_draftees\" (\n \"player\" text,\n \"draft\" text,\n \"round\" real,\n \"pick\" real,\n \"position\" text,\n \"nfl_club\" text\n);\n\nQuestion: What is pick 246's position?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"1962_pro_draftees\" WHERE \"pick\"=246;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1962_pro_draftees\" (\n \"player\" text,\n \"draft\" text,\n \"round\" real,\n \"pick\" real,\n \"position\" text,\n \"nfl_club\" text\n);\n\nQuestion: Which Pick has a Player of chuck bryant, and an NFL Club of san diego chargers?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"1962_pro_draftees\" WHERE \"player\"='chuck bryant' AND \"nfl_club\"='san diego chargers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1962_pro_draftees\" (\n \"player\" text,\n \"draft\" text,\n \"round\" real,\n \"pick\" real,\n \"position\" text,\n \"nfl_club\" text\n);\n\nQuestion: What is the position of the pittsburgh steelers?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"1962_pro_draftees\" WHERE \"nfl_club\"='pittsburgh steelers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1962_pro_draftees\" (\n \"player\" text,\n \"draft\" text,\n \"round\" real,\n \"pick\" real,\n \"position\" text,\n \"nfl_club\" text\n);\n\nQuestion: Which NFL Club has a Player of sam tidmore, and a Pick of 81?"
},
{
"role": "assistant",
"content": "SELECT \"nfl_club\" FROM \"1962_pro_draftees\" WHERE \"player\"='sam tidmore' AND \"pick\"=81;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_history\" (\n \"round\" text,\n \"club\" text,\n \"home\" text,\n \"away\" text,\n \"aggregate\" text\n);\n\nQuestion: Which club had round of group stage round 1 and 5?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"european_history\" WHERE \"round\"='group stage round 1 and 5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_history\" (\n \"round\" text,\n \"club\" text,\n \"home\" text,\n \"away\" text,\n \"aggregate\" text\n);\n\nQuestion: What is the aggregate for the first round for K.S.V. Waregem?"
},
{
"role": "assistant",
"content": "SELECT \"aggregate\" FROM \"european_history\" WHERE \"round\"='first round' AND \"club\"='k.s.v. waregem';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_history\" (\n \"round\" text,\n \"club\" text,\n \"home\" text,\n \"away\" text,\n \"aggregate\" text\n);\n\nQuestion: What is the away where the round is the second round?"
},
{
"role": "assistant",
"content": "SELECT \"away\" FROM \"european_history\" WHERE \"round\"='second round';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16_matches\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which Team 1 has a 2nd leg of 1-3?"
},
{
"role": "assistant",
"content": "SELECT \"team_1\" FROM \"round_16_matches\" WHERE \"2nd_leg\"='1-3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16_matches\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the Agg for 1st Leg 1-2 and 2nd leg of Withdrew?"
},
{
"role": "assistant",
"content": "SELECT \"agg\" FROM \"round_16_matches\" WHERE \"1st_leg\"='1-2' AND \"2nd_leg\"='withdrew';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16_matches\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 2nd leg if the 1st leg is 3-1 and the Team 2 is union sportive de la m\u00e9dina d'alger?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"round_16_matches\" WHERE \"1st_leg\"='3-1' AND \"team_2\"='union sportive de la m\u00e9dina d''alger';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16_matches\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is Team 2 if the 1st Leg is 3-1 and the 2nd Leg is 4-1?"
},
{
"role": "assistant",
"content": "SELECT \"team_2\" FROM \"round_16_matches\" WHERE \"1st_leg\"='3-1' AND \"2nd_leg\"='4-1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"serial_details_by_episode\" (\n \"episode\" text,\n \"broadcast_date\" text,\n \"run_time\" text,\n \"viewers_in_millions\" text,\n \"archive\" text\n);\n\nQuestion: What was the broadcaste date for the episode with a run time of 24:44?"
},
{
"role": "assistant",
"content": "SELECT \"broadcast_date\" FROM \"serial_details_by_episode\" WHERE \"run_time\"='24:44';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"serial_details_by_episode\" (\n \"episode\" text,\n \"broadcast_date\" text,\n \"run_time\" text,\n \"viewers_in_millions\" text,\n \"archive\" text\n);\n\nQuestion: Which Episode had 9.1 million viewers?"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"serial_details_by_episode\" WHERE \"viewers_in_millions\"='9.1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_history\" (\n \"year\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"country\" text,\n \"previous_team_league\" text\n);\n\nQuestion: What is Country, when Previous Team (League) is \"Kingston Frontenacs ( OHL )\", and when Player is \"Anthony Stewart Category:Articles with hCards\"?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"first_round_history\" WHERE \"previous_team_league\"='kingston frontenacs ( ohl )' AND \"player\"='anthony stewart category:articles with hcards';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_history\" (\n \"year\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"country\" text,\n \"previous_team_league\" text\n);\n\nQuestion: What is Player, when Pick is \"3\", when Position is \"Defense\", and when Year is less than 2010?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"first_round_history\" WHERE \"pick\"='3' AND \"position\"='defense' AND \"year\"<2010;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_history\" (\n \"year\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"country\" text,\n \"previous_team_league\" text\n);\n\nQuestion: What is Position, when Year is less than 2000, and when Player is \"Radek Dvorak Category:Articles with hCards\"?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"first_round_history\" WHERE \"year\"<2000 AND \"player\"='radek dvorak category:articles with hcards';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_history\" (\n \"year\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"country\" text,\n \"previous_team_league\" text\n);\n\nQuestion: What is Player, when Previous Team (League) is \"Medicine Hat Tigers ( WHL )\", and when Year is less than 2002?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"first_round_history\" WHERE \"previous_team_league\"='medicine hat tigers ( whl )' AND \"year\"<2002;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_history\" (\n \"year\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"country\" text,\n \"previous_team_league\" text\n);\n\nQuestion: What is Country, when Year is \"1994\"?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"first_round_history\" WHERE \"year\"=1994;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"serial_details_by_episode\" (\n \"episode\" text,\n \"broadcast_date\" text,\n \"run_time\" text,\n \"viewers_in_millions\" text,\n \"archive\" text\n);\n\nQuestion: What episode has 7.8 million viewers?"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"serial_details_by_episode\" WHERE \"viewers_in_millions\"='7.8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"serial_details_by_episode\" (\n \"episode\" text,\n \"broadcast_date\" text,\n \"run_time\" text,\n \"viewers_in_millions\" text,\n \"archive\" text\n);\n\nQuestion: What episode has a run time of 25:12?"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"serial_details_by_episode\" WHERE \"run_time\"='25:12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"serial_details_by_episode\" (\n \"episode\" text,\n \"broadcast_date\" text,\n \"run_time\" text,\n \"viewers_in_millions\" text,\n \"archive\" text\n);\n\nQuestion: What is the broadcast date with 7.0 million viewers?"
},
{
"role": "assistant",
"content": "SELECT \"broadcast_date\" FROM \"serial_details_by_episode\" WHERE \"viewers_in_millions\"='7.0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the average total for Dave Stockton?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"missed_the_cut\" WHERE \"player\"='dave stockton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the sum of the to par for the United States in the winning year of 1967, and has a total of more than 146?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"to_par\") FROM \"missed_the_cut\" WHERE \"country\"='united states' AND \"year_s_won\"='1967' AND \"total\">146;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: What is the score for the game in which Arsenal was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"away_team\"='arsenal';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: What is the score for the tie number 15?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='15';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.