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 \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Which Points have a Grid larger than 7, and a Driver of alex tagliani, and a Lapse smaller than 85?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"race\" WHERE \"grid\">7 AND \"driver\"='alex tagliani' AND \"laps\"<85;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_country\" (\n \"country\" text,\n \"matches\" real,\n \"wins\" real,\n \"wins_pct\" text,\n \"draws\" real,\n \"draws_pct\" text,\n \"loses\" real,\n \"loses_pct\" text,\n \"against\" real,\n \"for_against_ratio\" text\n);\n\nQuestion: What is the total number of wins for a nation that played fewer than 8 matches and a Wins percentage of 62.5%?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"wins\") FROM \"by_country\" WHERE \"wins_pct\"='62.5%' AND \"matches\"<8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_country\" (\n \"country\" text,\n \"matches\" real,\n \"wins\" real,\n \"wins_pct\" text,\n \"draws\" real,\n \"draws_pct\" text,\n \"loses\" real,\n \"loses_pct\" text,\n \"against\" real,\n \"for_against_ratio\" text\n);\n\nQuestion: What is the highest number of matches for a nation with a Loses percentage of 26.67% and fewer than 90 draws?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"matches\") FROM \"by_country\" WHERE \"loses_pct\"='26.67%' AND \"draws\"<90;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What date has uefa euro 2008 qualification as the competition?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"competition\"='uefa euro 2008 qualification';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What date has friendly as the competition, with pretoria, South Africa as the venue?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"competition\"='friendly' AND \"venue\"='pretoria, south africa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior_career\" (\n \"year\" real,\n \"competition_description\" text,\n \"location\" text,\n \"apparatus\" text,\n \"rank_final\" real,\n \"score_final\" real\n);\n\nQuestion: What is the lowest final score of the American Cup competition before 2009?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"score_final\") FROM \"senior_career\" WHERE \"competition_description\"='american cup' AND \"year\"<2009;"
}
]
|
[
{
"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 \"attendance\" text\n);\n\nQuestion: What is the result for the game before week 7 against BYE?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"<7 AND \"opponent\"='bye';"
}
]
|
[
{
"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 \"attendance\" text\n);\n\nQuestion: What was the date for the game after week 16?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\">16;"
}
]
|
[
{
"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 \"attendance\" text\n);\n\nQuestion: What was the attendance for the game against tampa bay buccaneers?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"opponent\"='tampa bay buccaneers';"
}
]
|
[
{
"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 \"attendance\" text\n);\n\nQuestion: What was the date of the game after week 5 with 62,262 fans attending?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\">5 AND \"attendance\"='62,262';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Location has a Record of 5\u20132\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='5\u20132\u20131';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Record has an Event of inoki bom-ba-ye 2002?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='inoki bom-ba-ye 2002';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Opponent has a Record of 2\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='2\u20130';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Record has a Round larger than 2, and an Event of bellator 38?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"round\">2 AND \"event\"='bellator 38';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: What was John Jones's pick#?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pick\") FROM \"first_round_selections\" WHERE \"player\"='john jones';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: What was the pick # of the player who has a hometown/school of Atlanta, GA?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pick\") FROM \"first_round_selections\" WHERE \"hometown_school\"='atlanta, ga';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"broadcasters\" (\n \"mexico\" text,\n \"ma_ana_es_para_siempre\" text,\n \"el_canal_de_las_estrellas\" text,\n \"october_20_2008\" text,\n \"june_14_2009\" text,\n \"monday_to_friday\" text\n);\n\nQuestion: What is the El Canal de las Estrellas held from June 14, 2009 to February 23, 2010?"
},
{
"role": "assistant",
"content": "SELECT \"el_canal_de_las_estrellas\" FROM \"broadcasters\" WHERE \"june_14_2009\"='february 23, 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"broadcasters\" (\n \"mexico\" text,\n \"ma_ana_es_para_siempre\" text,\n \"el_canal_de_las_estrellas\" text,\n \"october_20_2008\" text,\n \"june_14_2009\" text,\n \"monday_to_friday\" text\n);\n\nQuestion: What is Ma\u00f1ana es para siempre of impreuna pentru totdeauna from Monday to Friday?"
},
{
"role": "assistant",
"content": "SELECT \"monday_to_friday\" FROM \"broadcasters\" WHERE \"ma_ana_es_para_siempre\"='impreuna pentru totdeauna';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"broadcasters\" (\n \"mexico\" text,\n \"ma_ana_es_para_siempre\" text,\n \"el_canal_de_las_estrellas\" text,\n \"october_20_2008\" text,\n \"june_14_2009\" text,\n \"monday_to_friday\" text\n);\n\nQuestion: When does the El Canal de las Estrellas of pop tv show from Monday to Friday?"
},
{
"role": "assistant",
"content": "SELECT \"monday_to_friday\" FROM \"broadcasters\" WHERE \"el_canal_de_las_estrellas\"='pop tv';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: What is the enrollment for the AAAA class in IHSAA?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"enrollment\") FROM \"indiana_high_school_athletics_conference\" WHERE \"ihsaa_football_class\"='aaaa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: What is the IHSAA Football class at Culver?"
},
{
"role": "assistant",
"content": "SELECT \"ihsaa_football_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"location\"='culver';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: What school has the Lancers as their mascot?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"indiana_high_school_athletics_conference\" WHERE \"mascot\"='lancers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: What is the total enrollment at Laville?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"enrollment\") FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='laville';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_ncaa_football_attendance_leaders\" (\n \"rank\" real,\n \"team\" text,\n \"games\" real,\n \"total\" real,\n \"avg\" real\n);\n\nQuestion: What is the highest average for teams ranked higher than 9?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"avg\") FROM \"2012_ncaa_football_attendance_leaders\" WHERE \"rank\">9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_w\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: What is the name of the 2008 club with Nadia Centoni Category:Articles with hCards?"
},
{
"role": "assistant",
"content": "SELECT \"2008_club\" FROM \"volleyball_at_the_2008_summer_olympics_w\" WHERE \"name\"='nadia centoni 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 \"volleyball_at_the_2008_summer_olympics_w\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: What is the name for the 2008 club Despar Sirio Perugia?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"volleyball_at_the_2008_summer_olympics_w\" WHERE \"2008_club\"='despar sirio perugia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_w\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: What is the spike for the 2008 club Despar Sirio Perugia?"
},
{
"role": "assistant",
"content": "SELECT \"spike\" FROM \"volleyball_at_the_2008_summer_olympics_w\" WHERE \"2008_club\"='despar sirio perugia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_w\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: What is the spike for 2008 club Yamamay Busto Arsizio?"
},
{
"role": "assistant",
"content": "SELECT \"spike\" FROM \"volleyball_at_the_2008_summer_olympics_w\" WHERE \"2008_club\"='yamamay busto arsizio';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_w\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: Which 2008 club has the name Francesca Piccinini Category:Articles with hCards?"
},
{
"role": "assistant",
"content": "SELECT \"2008_club\" FROM \"volleyball_at_the_2008_summer_olympics_w\" WHERE \"name\"='francesca piccinini 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 \"1933_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the least amount of wins when against is 1314?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"1933_ladder\" WHERE \"against\"=1314;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1933_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the number of against when the wins were 8, and a Club of South Warrnambool, with less than 0 draws?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"against\") FROM \"1933_ladder\" WHERE \"wins\"=8 AND \"club\"='south warrnambool' AND \"draws\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1933_ladder\" (\n \"club\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the number of wins when the against is larger than 1155, for Warrnambool, with more than 0 draws?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"1933_ladder\" WHERE \"against\">1155 AND \"club\"='warrnambool' AND \"draws\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grade_distribution\" (\n \"score\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What score has 15.0% as the 2012?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"grade_distribution\" WHERE \"2012\"='15.0%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grade_distribution\" (\n \"score\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What 2012 has 2 as the score?"
},
{
"role": "assistant",
"content": "SELECT \"2012\" FROM \"grade_distribution\" WHERE \"score\"='2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grade_distribution\" (\n \"score\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What 2008 has 14.2% as the 2009?"
},
{
"role": "assistant",
"content": "SELECT \"2008\" FROM \"grade_distribution\" WHERE \"2009\"='14.2%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grade_distribution\" (\n \"score\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What score has 15.0% as the 2012?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"grade_distribution\" WHERE \"2012\"='15.0%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grade_distribution\" (\n \"score\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What 2009 has 18.5% as the 2007?"
},
{
"role": "assistant",
"content": "SELECT \"2009\" FROM \"grade_distribution\" WHERE \"2007\"='18.5%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grade_distribution\" (\n \"score\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What 2011 has 12.7% as the 2010?"
},
{
"role": "assistant",
"content": "SELECT \"2011\" FROM \"grade_distribution\" WHERE \"2010\"='12.7%';"
}
]
|
[
{
"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 \"attendance\" text\n);\n\nQuestion: What is the Week of the game with a Result of L 24-0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"result\"='l 24-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 \"attendance\" text\n);\n\nQuestion: What is the Week number on December 18, 1960?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"date\"='december 18, 1960';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overall\" (\n \"team\" text,\n \"matches\" real,\n \"wins\" real,\n \"wins_pct\" text,\n \"draws\" real,\n \"draws_pct\" text,\n \"loses\" real,\n \"loses_pct\" text,\n \"against\" real\n);\n\nQuestion: Which Draws % has Wins larger than 1, and Loses % of 0%, and a Team of al-zawraa?"
},
{
"role": "assistant",
"content": "SELECT \"draws_pct\" FROM \"overall\" WHERE \"wins\">1 AND \"loses_pct\"='0%' AND \"team\"='al-zawraa';"
}
]
|
[
{
"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\" text\n);\n\nQuestion: Which pick played the Defensive End position?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"nfl_draft\" WHERE \"position\"='defensive end';"
}
]
|
[
{
"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\" text\n);\n\nQuestion: How many picks were taken before round 3 and played Linebacker?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick\") FROM \"nfl_draft\" WHERE \"position\"='linebacker' AND \"round\"<3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overall\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average number of silver medals won among nations that won 9 medals total?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"silver\") FROM \"overall\" WHERE \"total\"=9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2001_ohio_state_buckeyes_football_team\" (\n \"player\" text,\n \"round\" real,\n \"pick\" real,\n \"position\" text,\n \"nfl_club\" text\n);\n\nQuestion: Which Round has a Pick larger than 179?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"2001_ohio_state_buckeyes_football_team\" WHERE \"pick\">179;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2001_ohio_state_buckeyes_football_team\" (\n \"player\" text,\n \"round\" real,\n \"pick\" real,\n \"position\" text,\n \"nfl_club\" text\n);\n\nQuestion: What is jamar martin's highest pick?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick\") FROM \"2001_ohio_state_buckeyes_football_team\" WHERE \"player\"='jamar martin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_6b_ultra_lightweight_manx_grand_pri\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What teams rank is higher than 4 with a speed of 104.574mph?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"race_6b_ultra_lightweight_manx_grand_pri\" WHERE \"rank\">4 AND \"speed\"='104.574mph';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_6b_ultra_lightweight_manx_grand_pri\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What team does Anthony Redmond ride for?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"race_6b_ultra_lightweight_manx_grand_pri\" WHERE \"rider\"='anthony redmond';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_6b_ultra_lightweight_manx_grand_pri\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What was the speed with a time of 1:03.41.86 and a rank smaller than 3?"
},
{
"role": "assistant",
"content": "SELECT \"speed\" FROM \"race_6b_ultra_lightweight_manx_grand_pri\" WHERE \"rank\"<3 AND \"time\"='1:03.41.86';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"num_county\" text\n);\n\nQuestion: What school in 72 Scott county has an enrollment more than 473 with an AAA IHSAA Class?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"enrollment\">473 AND \"ihsaa_class\"='aaa' AND \"num_county\"='72 scott';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"num_county\" text\n);\n\nQuestion: What's the mascot of Eastern Pekin having less than 627 enrolled and an AA for their IHSAA Class?"
},
{
"role": "assistant",
"content": "SELECT \"mascot\" FROM \"indiana_high_school_athletics_conference\" WHERE \"enrollment\"<627 AND \"ihsaa_class\"='aa' AND \"school\"='eastern pekin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"num_county\" text\n);\n\nQuestion: What's the most enrolled having the dragons for a mascot and an AAA for the IHSAA Class?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"enrollment\") FROM \"indiana_high_school_athletics_conference\" WHERE \"ihsaa_class\"='aaa' AND \"mascot\"='dragons';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"num_county\" text\n);\n\nQuestion: What's the county of Eastern Pekin school with fewer than 774 enrolled?"
},
{
"role": "assistant",
"content": "SELECT \"num_county\" FROM \"indiana_high_school_athletics_conference\" WHERE \"enrollment\"<774 AND \"school\"='eastern pekin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"num_county\" text\n);\n\nQuestion: What's the location of the school having the panthers as a mascot with an AAA for the IHSAA Class?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"indiana_high_school_athletics_conference\" WHERE \"ihsaa_class\"='aaa' AND \"mascot\"='panthers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"num_county\" text\n);\n\nQuestion: What's the IHSAA Class when the mascot was the Musketeers?"
},
{
"role": "assistant",
"content": "SELECT \"ihsaa_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"mascot\"='musketeers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1965\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"characters\" text,\n \"release_date\" text\n);\n\nQuestion: Who was the director of Chaser on the Rocks?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"1965\" WHERE \"title\"='chaser on the rocks';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1965\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"characters\" text,\n \"release_date\" text\n);\n\nQuestion: What are the characters from the movie Suppressed Duck?"
},
{
"role": "assistant",
"content": "SELECT \"characters\" FROM \"1965\" WHERE \"title\"='suppressed duck';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: How many picks on average did Jay Bruchak have before round 6?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pick\") FROM \"draft_picks\" WHERE \"player\"='jay bruchak' AND \"round\"<6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: How many rounds did Pierre Bland have a pick larger than 148?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"draft_picks\" WHERE \"pick\">148 AND \"player\"='pierre bland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: What was the earliest round that Purdue had a pick larger than 10?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"draft_picks\" WHERE \"college\"='purdue' AND \"pick\">10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: How many picks did Jay Bruchak have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick\") FROM \"draft_picks\" WHERE \"player\"='jay bruchak';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"attendance\" (\n \"attendance\" real,\n \"round\" text,\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"venue\" text,\n \"weekday\" text,\n \"time_of_day\" text\n);\n\nQuestion: In what round was the Alianza home game?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"attendance\" WHERE \"home\"='alianza';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"attendance\" (\n \"attendance\" real,\n \"round\" text,\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"venue\" text,\n \"weekday\" text,\n \"time_of_day\" text\n);\n\nQuestion: What was the visiting team that played a round 16 game?"
},
{
"role": "assistant",
"content": "SELECT \"away\" FROM \"attendance\" WHERE \"round\"='round 16';"
}
]
|
[
{
"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 \"attendance\" real\n);\n\nQuestion: How many weeks have an Attendance of 62,289?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"attendance\"='62,289';"
}
]
|
[
{
"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 \"attendance\" real\n);\n\nQuestion: Which Week has an Attendance larger than 65,070?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"attendance\">'65,070';"
}
]
|
[
{
"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 \"attendance\" real\n);\n\nQuestion: Which Week has an Opponent of atlanta falcons, and an Attendance smaller than 63,114?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"opponent\"='atlanta falcons' AND \"attendance\"<'63,114';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"records\" (\n \"season\" text,\n \"division\" text,\n \"tms\" text,\n \"pos\" text,\n \"pff_nmcc\" text,\n \"ufl_cup\" text,\n \"afc_pc\" text\n);\n\nQuestion: which Tms has a Season of 2013?"
},
{
"role": "assistant",
"content": "SELECT \"tms\" FROM \"records\" WHERE \"season\"='2013';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_places\" (\n \"place\" text,\n \"code\" real,\n \"area_km_2\" real,\n \"population\" real,\n \"most_spoken_language\" text\n);\n\nQuestion: What's the population with a code more than 90902 and an area less than 1,335.47?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"population\") FROM \"main_places\" WHERE \"code\">90902 AND \"area_km_2\"<'1,335.47';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_places\" (\n \"place\" text,\n \"code\" real,\n \"area_km_2\" real,\n \"population\" real,\n \"most_spoken_language\" text\n);\n\nQuestion: What's the most area of Bochum Part 2 with a population less than 15,911?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"area_km_2\") FROM \"main_places\" WHERE \"place\"='bochum part 2' AND \"population\"<'15,911';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_places\" (\n \"place\" text,\n \"code\" real,\n \"area_km_2\" real,\n \"population\" real,\n \"most_spoken_language\" text\n);\n\nQuestion: What's the place with an area of less than 2,198.72 and a code more than 90909?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"main_places\" WHERE \"area_km_2\"<'2,198.72' AND \"code\">90909;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_undrafted_players\" (\n \"original_nfl_team\" text,\n \"player\" text,\n \"pos\" text,\n \"college\" text,\n \"conf\" text\n);\n\nQuestion: What is the Original NFL team of the CB Player?"
},
{
"role": "assistant",
"content": "SELECT \"original_nfl_team\" FROM \"notable_undrafted_players\" WHERE \"pos\"='cb';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_undrafted_players\" (\n \"original_nfl_team\" text,\n \"player\" text,\n \"pos\" text,\n \"college\" text,\n \"conf\" text\n);\n\nQuestion: What is the College of the WR Player from SWC Conf?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"notable_undrafted_players\" WHERE \"conf\"='swc' AND \"pos\"='wr';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_undrafted_players\" (\n \"original_nfl_team\" text,\n \"player\" text,\n \"pos\" text,\n \"college\" text,\n \"conf\" text\n);\n\nQuestion: What Player is from the College of memphis?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"notable_undrafted_players\" WHERE \"college\"='memphis';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"notable_undrafted_players\" (\n \"original_nfl_team\" text,\n \"player\" text,\n \"pos\" text,\n \"college\" text,\n \"conf\" text\n);\n\nQuestion: What is the College of the LB Player with Big Ten Conf.?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"notable_undrafted_players\" WHERE \"pos\"='lb' AND \"conf\"='big ten';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"sunrayia_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many draws are there when there are 11 wins, and more than 7 losses?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"draws\") FROM \"2011_ladder\" WHERE \"wins\"=11 AND \"losses\">7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"sunrayia_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the draws when there are less than 3 losses and more than 16 wins?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"draws\") FROM \"2011_ladder\" WHERE \"losses\"<3 AND \"wins\">16;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"sunrayia_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the wins when there are 5 losses, and against is more than 1205?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"2011_ladder\" WHERE \"losses\"=5 AND \"against\">1205;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"sunrayia_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the losses when Sunrayia FL is Red Cliffs, and the against is more than 2294?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"losses\") FROM \"2011_ladder\" WHERE \"sunrayia_fl\"='red cliffs' AND \"against\">2294;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"sunrayia_fl\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the number against when losses are smaller than 3, and wins arelarger than 16?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"against\") FROM \"2011_ladder\" WHERE \"losses\"<3 AND \"wins\">16;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"format\" text,\n \"owner\" text,\n \"notes\" text\n);\n\nQuestion: What is the Notes of the Frequency with Call sign CFUN-FM-1?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"radio\" WHERE \"call_sign\"='cfun-fm-1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"format\" text,\n \"owner\" text,\n \"notes\" text\n);\n\nQuestion: What is the Format of FM 100.5 Licensed to Hope?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"radio\" WHERE \"notes\"='licensed to hope' AND \"frequency\"='fm 100.5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"format\" text,\n \"owner\" text,\n \"notes\" text\n);\n\nQuestion: What is the Notes of the Frequency with a call sign of CBUE-FM?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"radio\" WHERE \"call_sign\"='cbue-fm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_to_head_record\" (\n \"competition\" text,\n \"played\" real,\n \"spartak\" real,\n \"draw\" real,\n \"dynamo\" real\n);\n\nQuestion: what is the average dynamo when draw is more than 0, played is less than 15 and spartak is more than 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"dynamo\") FROM \"head_to_head_record\" WHERE \"draw\">0 AND \"played\"<15 AND \"spartak\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_to_head_record\" (\n \"competition\" text,\n \"played\" real,\n \"spartak\" real,\n \"draw\" real,\n \"dynamo\" real\n);\n\nQuestion: what is the highest spartak when played is less than 15 and dynamo is less than 3?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"spartak\") FROM \"head_to_head_record\" WHERE \"played\"<15 AND \"dynamo\"<3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_to_head_record\" (\n \"competition\" text,\n \"played\" real,\n \"spartak\" real,\n \"draw\" real,\n \"dynamo\" real\n);\n\nQuestion: what is the most draw when the competition is soviet league and dynamo is more than 34?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"draw\") FROM \"head_to_head_record\" WHERE \"competition\"='soviet league' AND \"dynamo\">34;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_to_head_record\" (\n \"competition\" text,\n \"played\" real,\n \"spartak\" real,\n \"draw\" real,\n \"dynamo\" real\n);\n\nQuestion: what is the sum of spartak when played is 102 and draw is less than 19?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"spartak\") FROM \"head_to_head_record\" WHERE \"played\"=102 AND \"draw\"<19;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_to_head_record\" (\n \"competition\" text,\n \"played\" real,\n \"spartak\" real,\n \"draw\" real,\n \"dynamo\" real\n);\n\nQuestion: what is the least dynamo when spartak is more than 9, competition is totals and draw is more than 24?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"dynamo\") FROM \"head_to_head_record\" WHERE \"spartak\">9 AND \"competition\"='totals' AND \"draw\">24;"
}
]
|
[
{
"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 \"attendance\" text\n);\n\nQuestion: What's the result when the Washington Redskins were the opponents on a week after 8?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\">8 AND \"opponent\"='washington redskins';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"name\" text,\n \"nationality\" text,\n \"4_30\" text,\n \"4_45\" text,\n \"4_55\" text,\n \"result\" real\n);\n\nQuestion: What is the 4.45 for Anna Rogowska from Poland?"
},
{
"role": "assistant",
"content": "SELECT \"4_45\" FROM \"final\" WHERE \"nationality\"='poland' AND \"name\"='anna rogowska';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"name\" text,\n \"nationality\" text,\n \"4_30\" text,\n \"4_45\" text,\n \"4_55\" text,\n \"result\" real\n);\n\nQuestion: What is the 4.45 for Yelena Isinbayeva?"
},
{
"role": "assistant",
"content": "SELECT \"4_45\" FROM \"final\" WHERE \"name\"='yelena isinbayeva';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"name\" text,\n \"nationality\" text,\n \"4_30\" text,\n \"4_45\" text,\n \"4_55\" text,\n \"result\" real\n);\n\nQuestion: What is Anna Rogowska's average result?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"result\") FROM \"final\" WHERE \"name\"='anna rogowska';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"name\" text,\n \"nationality\" text,\n \"4_30\" text,\n \"4_45\" text,\n \"4_55\" text,\n \"result\" real\n);\n\nQuestion: What national has 4.45 for o and 4.55 for xo?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"final\" WHERE \"4_45\"='o' AND \"4_55\"='xo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_cruising_in_asia\" (\n \"ship_name\" text,\n \"year_built\" real,\n \"length\" text,\n \"crew\" real,\n \"guests\" real,\n \"staterooms\" real,\n \"comments\" text\n);\n\nQuestion: What is the sum of staterooms in with a year buit of 2008, and a crew less than 28?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"staterooms\") FROM \"ships_cruising_in_asia\" WHERE \"year_built\"=2008 AND \"crew\"<28;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships_cruising_in_asia\" (\n \"ship_name\" text,\n \"year_built\" real,\n \"length\" text,\n \"crew\" real,\n \"guests\" real,\n \"staterooms\" real,\n \"comments\" text\n);\n\nQuestion: What is the total for guests with a ship name of rv indochina, and a crew smaller than 28?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"guests\") FROM \"ships_cruising_in_asia\" WHERE \"ship_name\"='rv indochina' AND \"crew\"<28;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualification_round\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"day_1\" real,\n \"total\" real\n);\n\nQuestion: what is the country when the total is 111 and the day 1 is 69?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"qualification_round\" WHERE \"total\"=111 AND \"day_1\"=69;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualification_round\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"day_1\" real,\n \"total\" real\n);\n\nQuestion: what is the average rank when the day 1 is less than 71 and the country is romania?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"qualification_round\" WHERE \"day_1\"<71 AND \"country\"='romania';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualification_round\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"day_1\" real,\n \"total\" real\n);\n\nQuestion: how many times is the athlete jin di and the total less than 118?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"qualification_round\" WHERE \"athlete\"='jin di' AND \"total\"<118;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_information\" (\n \"nat\" text,\n \"name\" text,\n \"since\" text,\n \"goals\" real,\n \"ends\" real\n);\n\nQuestion: What is the highest goal for a GEO nat., that ended after 2010?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals\") FROM \"squad_information\" WHERE \"nat\"='geo' AND \"ends\">2010;"
}
]
|
[
{
"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 venue when the year is 2006, the competition is asian games and the event is 400 m?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"year\"=2006 AND \"competition\"='asian games' AND \"event\"='400 m';"
}
]
|
[
{
"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 venue when the event is 4x400 m relay and the competition is asian championships?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"event\"='4x400 m relay' AND \"competition\"='asian championships';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.