chat_prompt stringlengths 438 1.53k |
|---|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When did a home team score 9.6 (60)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_2\" WHERE \"home_team_score\"='9.6 (60)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the away team score at corio oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_2\" WHERE \"venue\"='corio oval';"
}
] |
[
{
"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: Who did the cowboys play when 65,537 attended?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\"='65,537';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_finals_2_4\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the name of the tournament when antonia xenia tout nata\u0161a zori\u0107 was the opponenet?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_finals_2_4\" WHERE \"opponents\"='antonia xenia tout nata\u0161a zori\u0107';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_finals_2_4\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What date was georgie stoop emily webley-smith the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"doubles_finals_2_4\" WHERE \"opponents\"='georgie stoop emily webley-smith';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_finals_2_4\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the surface of the match when the opponent was iryna bremond valeria savinykh?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_finals_2_4\" WHERE \"opponents\"='iryna bremond valeria savinykh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_finals_2_4\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the name of the opponent for the Sutton tournament?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"doubles_finals_2_4\" WHERE \"tournament\"='sutton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_finals_2_4\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the name of the opponent when anastasia pivovarova was the partner?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"doubles_finals_2_4\" WHERE \"partner\"='anastasia pivovarova';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the home team's score when the away team's score is 15.15 (105)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_2\" WHERE \"away_team_score\"='15.15 (105)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is south melbourne's home side score?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_2\" WHERE \"home_team\"='south melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What rounds did Roy Salvadori drive for David Brown Corporation?"
},
{
"role": "assistant",
"content": "SELECT \"rounds\" FROM \"teams_and_drivers\" WHERE \"entrant\"='david brown corporation' AND \"driver\"='roy salvadori';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indian_television_academy_awards\" (\n \"year\" real,\n \"category\" text,\n \"character\" text,\n \"for_the_show\" text,\n \"result\" text\n);\n\nQuestion: What are the results for years after 2007?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"indian_television_academy_awards\" WHERE \"year\">2007;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indian_television_academy_awards\" (\n \"year\" real,\n \"category\" text,\n \"character\" text,\n \"for_the_show\" text,\n \"result\" text\n);\n\nQuestion: Which characters after 2003 won?"
},
{
"role": "assistant",
"content": "SELECT \"character\" FROM \"indian_television_academy_awards\" WHERE \"result\"='won' AND \"year\">2003;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indian_television_academy_awards\" (\n \"year\" real,\n \"category\" text,\n \"character\" text,\n \"for_the_show\" text,\n \"result\" text\n);\n\nQuestion: For 2006 what category has the Show of kasautii zindagii kay?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"indian_television_academy_awards\" WHERE \"for_the_show\"='kasautii zindagii kay' AND \"year\"=2006;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indian_television_academy_awards\" (\n \"year\" real,\n \"category\" text,\n \"character\" text,\n \"for_the_show\" text,\n \"result\" text\n);\n\nQuestion: What is the character for 2005?"
},
{
"role": "assistant",
"content": "SELECT \"character\" FROM \"indian_television_academy_awards\" WHERE \"year\"=2005;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indian_television_academy_awards\" (\n \"year\" real,\n \"category\" text,\n \"character\" text,\n \"for_the_show\" text,\n \"result\" text\n);\n\nQuestion: What is a category before 2012?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"indian_television_academy_awards\" WHERE \"year\"<2012;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vital_statistics\" (\n \"average_population\" text,\n \"live_births\" real,\n \"deaths\" real,\n \"natural_change\" real,\n \"crude_birth_rate_per_1000\" real,\n \"crude_death_rate_per_1000\" real,\n \"natural_change_per_1000\" real\n);\n\nQuestion: What is the largest crude birth rate when natural change is 215 at a rate greater than 7.2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crude_birth_rate_per_1000\") FROM \"vital_statistics\" WHERE \"natural_change\"=215 AND \"natural_change_per_1000\">7.2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vital_statistics\" (\n \"average_population\" text,\n \"live_births\" real,\n \"deaths\" real,\n \"natural_change\" real,\n \"crude_birth_rate_per_1000\" real,\n \"crude_death_rate_per_1000\" real,\n \"natural_change_per_1000\" real\n);\n\nQuestion: What is natural change with a crude death rate of 8.7 and less than 472 live births?"
},
{
"role": "assistant",
"content": "SELECT \"natural_change\" FROM \"vital_statistics\" WHERE \"crude_death_rate_per_1000\"=8.7 AND \"live_births\"<472;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"industrial_diesel_shunters\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" text\n);\n\nQuestion: What owner or owners have an operational description?"
},
{
"role": "assistant",
"content": "SELECT \"owner_s\" FROM \"industrial_diesel_shunters\" WHERE \"description\"='operational';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"industrial_diesel_shunters\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" text\n);\n\nQuestion: What is the date for the Operational Livery?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"industrial_diesel_shunters\" WHERE \"livery\"='operational';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"industrial_diesel_shunters\" (\n \"number_name\" text,\n \"description\" text,\n \"livery\" text,\n \"owner_s\" text,\n \"date\" text\n);\n\nQuestion: What is the date listed for the item that has undergoing overhaul, restoration or repairs listed under description?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"industrial_diesel_shunters\" WHERE \"description\"='undergoing overhaul, restoration or repairs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who is the home team that scored 12.14 (86) when their opponent scored 22.15 (147)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_20\" WHERE \"home_team_score\"='12.14 (86)' AND \"away_team_score\"='22.15 (147)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who is the home team that played at MCG?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_20\" WHERE \"venue\"='mcg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the size of the smallest crowd that watched a game at Arden Street Oval?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_20\" WHERE \"venue\"='arden street oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the score of the away team who played home team Hawthorn?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_20\" WHERE \"home_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who is the away team that played home team Footscray?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_20\" WHERE \"home_team\"='footscray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many people attended the game where Fitzroy was the away team?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_18\" WHERE \"away_team\"='fitzroy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2901_3000\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: I want the NGC number for leo of irregular galaxy"
},
{
"role": "assistant",
"content": "SELECT \"ngc_number\" FROM \"2901_3000\" WHERE \"constellation\"='leo' AND \"object_type\"='irregular galaxy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2901_3000\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: Tell me the highest NGC number for right ascension of 09h40m28.5s"
},
{
"role": "assistant",
"content": "SELECT MAX(\"ngc_number\") FROM \"2901_3000\" WHERE \"right_ascension_j2000\"='09h40m28.5s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2901_3000\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: What is the constellation for open cluster?"
},
{
"role": "assistant",
"content": "SELECT \"constellation\" FROM \"2901_3000\" WHERE \"object_type\"='open cluster';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"record\" text,\n \"athlete\" text,\n \"nationality\" text,\n \"date\" text\n);\n\nQuestion: Which event was Tatyana Lebedeva in?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"women\" WHERE \"athlete\"='tatyana lebedeva';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"record\" text,\n \"athlete\" text,\n \"nationality\" text,\n \"date\" text\n);\n\nQuestion: What event was Fatima Whitbread Trine Hattestad in?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"women\" WHERE \"athlete\"='fatima whitbread trine hattestad';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"record\" text,\n \"athlete\" text,\n \"nationality\" text,\n \"date\" text\n);\n\nQuestion: What is Milcah Chemos' record?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"women\" WHERE \"athlete\"='milcah chemos';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"record\" text,\n \"athlete\" text,\n \"nationality\" text,\n \"date\" text\n);\n\nQuestion: What is the record for the 400 m event on 4 september 2009?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"women\" WHERE \"date\"='4 september 2009' 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 \"women\" (\n \"event\" text,\n \"record\" text,\n \"athlete\" text,\n \"nationality\" text,\n \"date\" text\n);\n\nQuestion: What event was on 26 August 2005?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"women\" WHERE \"date\"='26 august 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"event\" text,\n \"record\" text,\n \"athlete\" text,\n \"nationality\" text,\n \"date\" text\n);\n\nQuestion: What was the date of the discus throw for Bulgaria?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"women\" WHERE \"nationality\"='bulgaria' AND \"event\"='discus throw';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where was the game held when the away team scored 16.11 (107)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_13\" WHERE \"away_team_score\"='16.11 (107)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away team's score when the home team scored 16.19 (115)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_13\" WHERE \"home_team_score\"='16.19 (115)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team's score when the away team scored 16.14 (110)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_13\" WHERE \"away_team_score\"='16.14 (110)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friendly\" (\n \"match\" real,\n \"date\" text,\n \"competition_or_tour\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score1\" text\n);\n\nQuestion: What is the date ground A and Cartagena as an opponent?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"friendly\" WHERE \"ground\"='a' AND \"opponent\"='cartagena';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friendly\" (\n \"match\" real,\n \"date\" text,\n \"competition_or_tour\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score1\" text\n);\n\nQuestion: What ground has a match smaller than 2?"
},
{
"role": "assistant",
"content": "SELECT \"ground\" FROM \"friendly\" WHERE \"match\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friendly\" (\n \"match\" real,\n \"date\" text,\n \"competition_or_tour\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score1\" text\n);\n\nQuestion: What is the score of the competition of friendly, at match 7?"
},
{
"role": "assistant",
"content": "SELECT \"score1\" FROM \"friendly\" WHERE \"competition_or_tour\"='friendly' AND \"match\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"draft\" real,\n \"round\" text,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text\n);\n\nQuestion: What was the lowest Pick number of Player Brian Bradley from Canada, in a Draft year before 1985?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick\") FROM \"draft_picks\" WHERE \"nationality\"='canada' AND \"draft\"<1985 AND \"player\"='brian bradley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"draft\" real,\n \"round\" text,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text\n);\n\nQuestion: Which Round was Player Adam Cracknell Picked after 231 in a Draft year after 1988?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"draft_picks\" WHERE \"pick\">231 AND \"draft\">1988 AND \"player\"='adam cracknell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"receiving\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"long\" real\n);\n\nQuestion: Name the total number of yards for avg of 9 and rec of 1"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"yards\") FROM \"receiving\" WHERE \"avg\"=9 AND \"rec\"=1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year_stats\" (\n \"team\" real,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"winning_percentage\" real,\n \"points_for\" real,\n \"points_against\" real,\n \"point_differential\" real\n);\n\nQuestion: What is the highest number of losses that the team incurred while scoring less than 79 points in 10 games with a point differential less than 34?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"losses\") FROM \"year_by_year_stats\" WHERE \"points_for\"<79 AND \"games_played\"=10 AND \"point_differential\"<34;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"delisted_players_who_did_not_play_a_seni\" (\n \"player\" text,\n \"date_of_birth_age_when_delisted\" text,\n \"draft_details\" text,\n \"rookie_list\" text,\n \"senior_list\" text\n);\n\nQuestion: Which Player has a Date of Birth (Age When Delisted) of 13 February 1987 (aged 24)?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"delisted_players_who_did_not_play_a_seni\" WHERE \"date_of_birth_age_when_delisted\"='13 february 1987 (aged 24)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"delisted_players_who_did_not_play_a_seni\" (\n \"player\" text,\n \"date_of_birth_age_when_delisted\" text,\n \"draft_details\" text,\n \"rookie_list\" text,\n \"senior_list\" text\n);\n\nQuestion: What is listed under Senior List for Date of Birth (Age When Delisted) of 5 June 1984 (aged 23)?"
},
{
"role": "assistant",
"content": "SELECT \"senior_list\" FROM \"delisted_players_who_did_not_play_a_seni\" WHERE \"date_of_birth_age_when_delisted\"='5 june 1984 (aged 23)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brand_reorganization\" (\n \"brand\" text,\n \"year_founded\" real,\n \"year_began_making_autos\" real,\n \"year_joined_gm\" real,\n \"markets_served_today\" text\n);\n\nQuestion: What is the average year to begin making autos for a brand that joined GM in 1917?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year_began_making_autos\") FROM \"brand_reorganization\" WHERE \"year_joined_gm\"=1917;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Name the date with a home team of melbourne"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_4\" WHERE \"home_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Name the venue for collingwood home team"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_4\" WHERE \"home_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: I want to know the home team score for essendon away team"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_4\" WHERE \"away_team\"='essendon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"history_of_board_members_2002_present\" (\n \"year\" text,\n \"president\" text,\n \"vice_president\" text,\n \"gen_secretary\" text,\n \"treasurer\" text\n);\n\nQuestion: Which year has a Gen.-Secretary of silvana jansen?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"history_of_board_members_2002_present\" WHERE \"gen_secretary\"='silvana jansen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"history_of_board_members_2002_present\" (\n \"year\" text,\n \"president\" text,\n \"vice_president\" text,\n \"gen_secretary\" text,\n \"treasurer\" text\n);\n\nQuestion: Which Gen.-Secretary that has a Vice President named charlotte saes?"
},
{
"role": "assistant",
"content": "SELECT \"gen_secretary\" FROM \"history_of_board_members_2002_present\" WHERE \"vice_president\"='charlotte saes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"history_of_board_members_2002_present\" (\n \"year\" text,\n \"president\" text,\n \"vice_president\" text,\n \"gen_secretary\" text,\n \"treasurer\" text\n);\n\nQuestion: Which treasurer has a Gen.-Secretary of jonneke de koning, and a Vice President of laura tolen?"
},
{
"role": "assistant",
"content": "SELECT \"treasurer\" FROM \"history_of_board_members_2002_present\" WHERE \"gen_secretary\"='jonneke de koning' AND \"vice_president\"='laura tolen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"history_of_board_members_2002_present\" (\n \"year\" text,\n \"president\" text,\n \"vice_president\" text,\n \"gen_secretary\" text,\n \"treasurer\" text\n);\n\nQuestion: Which Vice President has a President of daniel masny, and a Treasurer of rebecca t. altmann?"
},
{
"role": "assistant",
"content": "SELECT \"vice_president\" FROM \"history_of_board_members_2002_present\" WHERE \"president\"='daniel masny' AND \"treasurer\"='rebecca t. altmann';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"history_of_board_members_2002_present\" (\n \"year\" text,\n \"president\" text,\n \"vice_president\" text,\n \"gen_secretary\" text,\n \"treasurer\" text\n);\n\nQuestion: Who was president Year of 2002-2003, second semester?"
},
{
"role": "assistant",
"content": "SELECT \"president\" FROM \"history_of_board_members_2002_present\" WHERE \"year\"='2002-2003, second semester';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"history_of_board_members_2002_present\" (\n \"year\" text,\n \"president\" text,\n \"vice_president\" text,\n \"gen_secretary\" text,\n \"treasurer\" text\n);\n\nQuestion: Which treasurer has a President of sebastian ihler?"
},
{
"role": "assistant",
"content": "SELECT \"treasurer\" FROM \"history_of_board_members_2002_present\" WHERE \"president\"='sebastian ihler';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_10_3_7\" (\n \"outcome\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Which opponent used a grass surface?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"singles_10_3_7\" WHERE \"surface\"='grass';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_10_3_7\" (\n \"outcome\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Which tournament had a score of 6\u20137 (0\u20137) , 6\u20132, 4\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_10_3_7\" WHERE \"score\"='6\u20137 (0\u20137) , 6\u20132, 4\u20136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_b_slovenia\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: Tell me the total number of points for lost less than 4"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"world_championship_group_b_slovenia\" WHERE \"lost\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_b_slovenia\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: I want the sum of drawn for lost less than 0"
},
{
"role": "assistant",
"content": "SELECT SUM(\"drawn\") FROM \"world_championship_group_b_slovenia\" WHERE \"lost\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_b_slovenia\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: I want the points difference for points of 14"
},
{
"role": "assistant",
"content": "SELECT \"points_difference\" FROM \"world_championship_group_b_slovenia\" WHERE \"points\"=14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Tell me the sum of rank for when gold is more than 0 and silver less than 23 with total more than 32"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"medal_table\" WHERE \"gold\">0 AND \"total\">32 AND \"silver\"<23;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Tell me the sum of silver for liechtenstein and bronze more than 4"
},
{
"role": "assistant",
"content": "SELECT SUM(\"silver\") FROM \"medal_table\" WHERE \"nation\"='liechtenstein' AND \"bronze\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which tournament had a score of 6\u20134, 4\u20136, 7\u20135?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_titles\" WHERE \"score\"='6\u20134, 4\u20136, 7\u20135';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which tournament had a score of 7\u20135, 2\u20136, 7\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_titles\" WHERE \"score\"='7\u20135, 2\u20136, 7\u20136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who was the opponent in the final in which the court surface was hard and the score was 6\u20133, 3\u20136, 7\u20135?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"singles_titles\" WHERE \"surface\"='hard' AND \"score\"='6\u20133, 3\u20136, 7\u20135';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the court surface when the score was 6\u20134, 6\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_titles\" WHERE \"score\"='6\u20134, 6\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: On what date was the opponent in the final Gwinyai Tongoona?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_titles\" WHERE \"opponent_in_the_final\"='gwinyai tongoona';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the record from the Golden State Warriors on 11/18?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"november\" WHERE \"visitor\"='golden state warriors' AND \"date\"='11/18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1923_1937\" (\n \"class\" text,\n \"wheels\" text,\n \"date\" text,\n \"builder\" text,\n \"no_built\" real\n);\n\nQuestion: What class has 4-4-0 wheels and was less than number 40 built?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"1923_1937\" WHERE \"wheels\"='4-4-0' AND \"no_built\"<40;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translations\" (\n \"english\" text,\n \"space_crusade\" text,\n \"aliens\" text,\n \"chaos_marines\" text,\n \"genestealers\" text,\n \"imperial_fists\" text,\n \"ultramarines\" text\n);\n\nQuestion: Name the space crusade when the english is of finnish"
},
{
"role": "assistant",
"content": "SELECT \"space_crusade\" FROM \"translations\" WHERE \"english\"='finnish';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translations\" (\n \"english\" text,\n \"space_crusade\" text,\n \"aliens\" text,\n \"chaos_marines\" text,\n \"genestealers\" text,\n \"imperial_fists\" text,\n \"ultramarines\" text\n);\n\nQuestion: Name the space crusade which has Genestealers of genr\u00f8vere (gene robbers)"
},
{
"role": "assistant",
"content": "SELECT \"space_crusade\" FROM \"translations\" WHERE \"genestealers\"='genr\u00f8vere (gene robbers)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winners\" text,\n \"score\" text,\n \"runners_up\" text,\n \"venue\" text\n);\n\nQuestion: What was Galatasaray score when when he won in 1990 and Trabzonspor was the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"winners\" WHERE \"winners\"='galatasaray' AND \"runners_up\"='trabzonspor' AND \"year\"=1990;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"date\" text,\n \"matches\" real,\n \"clubs\" text,\n \"new_entries_this_round\" text,\n \"prize_money\" text\n);\n\nQuestion: How many matches were there in the round with \u00a31,000,000 in prize money?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"matches\") FROM \"calendar\" WHERE \"prize_money\"='\u00a31,000,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"date\" text,\n \"matches\" real,\n \"clubs\" text,\n \"new_entries_this_round\" text,\n \"prize_money\" text\n);\n\nQuestion: What was the date for a round that only had 1 match?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"calendar\" WHERE \"matches\"=1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What date did Hawthorn play as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_2\" WHERE \"away_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_team\" (\n \"player\" text,\n \"position\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What is the hometown for a college in Wisconsin?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"2011_team\" WHERE \"college\"='wisconsin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_team\" (\n \"player\" text,\n \"position\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: Which college has a linebacker from Lessburg High School?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"2011_team\" WHERE \"position\"='linebacker' AND \"school\"='lessburg high school';"
}
] |
[
{
"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 opponent has a week of 11?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"=11;"
}
] |
[
{
"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 December 4, 1976 week has an attendance less than 57,366?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"date\"='december 4, 1976' AND \"attendance\"<'57,366';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"municipalities\" (\n \"province\" text,\n \"comune\" text,\n \"population_inh\" real,\n \"area_km\" real,\n \"total_km\" real\n);\n\nQuestion: Who has a larger than 70.99 km2?"
},
{
"role": "assistant",
"content": "SELECT \"comune\" FROM \"municipalities\" WHERE \"total_km\">70.99;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"municipalities\" (\n \"province\" text,\n \"comune\" text,\n \"population_inh\" real,\n \"area_km\" real,\n \"total_km\" real\n);\n\nQuestion: What is the km2 area with more than 8,328 people with a total of 121.14 km2?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"area_km\") FROM \"municipalities\" WHERE \"population_inh\">'8,328' AND \"total_km\">121.14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"municipalities\" (\n \"province\" text,\n \"comune\" text,\n \"population_inh\" real,\n \"area_km\" real,\n \"total_km\" real\n);\n\nQuestion: What is the Piano di Sorrento, Napoli lowest km2 with a total smaller than 121.14 km2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"area_km\") FROM \"municipalities\" WHERE \"province\"='napoli' AND \"comune\"='piano di sorrento' AND \"total_km\"<121.14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"feature_films\" (\n \"film_title\" text,\n \"director\" text,\n \"writer\" text,\n \"voiced_character_s\" text,\n \"producer_executive_producer\" text,\n \"sound\" text\n);\n\nQuestion: Which writer had a producer DKA, JL, AS?"
},
{
"role": "assistant",
"content": "SELECT \"writer\" FROM \"feature_films\" WHERE \"producer_executive_producer\"='dka, jl, as';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"feature_films\" (\n \"film_title\" text,\n \"director\" text,\n \"writer\" text,\n \"voiced_character_s\" text,\n \"producer_executive_producer\" text,\n \"sound\" text\n);\n\nQuestion: Name the film that Lu directed."
},
{
"role": "assistant",
"content": "SELECT \"film_title\" FROM \"feature_films\" WHERE \"director\"='lu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"feature_films\" (\n \"film_title\" text,\n \"director\" text,\n \"writer\" text,\n \"voiced_character_s\" text,\n \"producer_executive_producer\" text,\n \"sound\" text\n);\n\nQuestion: Who wrote Toy Story?"
},
{
"role": "assistant",
"content": "SELECT \"writer\" FROM \"feature_films\" WHERE \"film_title\"='toy story';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"feature_films\" (\n \"film_title\" text,\n \"director\" text,\n \"writer\" text,\n \"voiced_character_s\" text,\n \"producer_executive_producer\" text,\n \"sound\" text\n);\n\nQuestion: Which writer had voice characters of JDR, BB, TN, LR, PS?"
},
{
"role": "assistant",
"content": "SELECT \"writer\" FROM \"feature_films\" WHERE \"voiced_character_s\"='jdr, bb, tn, lr, ps';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"feature_films\" (\n \"film_title\" text,\n \"director\" text,\n \"writer\" text,\n \"voiced_character_s\" text,\n \"producer_executive_producer\" text,\n \"sound\" text\n);\n\nQuestion: Who was the sound producer that worked under Executive Producer JL?"
},
{
"role": "assistant",
"content": "SELECT \"sound\" FROM \"feature_films\" WHERE \"producer_executive_producer\"='jl';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away team at mcg?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_16\" WHERE \"venue\"='mcg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the name of the player from NGA?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"players_out\" WHERE \"country\"='nga';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: Where is Odjidja-Ofoe, with an undisclosed transfer fee, moving to?"
},
{
"role": "assistant",
"content": "SELECT \"moving_to\" FROM \"players_out\" WHERE \"transfer_fee\"='undisclosed' AND \"name\"='odjidja-ofoe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What country is the player, with an undisclosed transfer fee and moving to Nacional, from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"players_out\" WHERE \"transfer_fee\"='undisclosed' AND \"moving_to\"='nacional';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is Odjidja-Ofoe's transfer fee?"
},
{
"role": "assistant",
"content": "SELECT \"transfer_fee\" FROM \"players_out\" WHERE \"name\"='odjidja-ofoe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the name of the player from Cod?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"players_out\" WHERE \"country\"='cod';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What country is the player moving to Hamburger SV from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"players_out\" WHERE \"moving_to\"='hamburger sv';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Which Driver has an Entrant of Arrows Racing Team and Rounds 1-3?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"drivers_and_constructors\" WHERE \"entrant\"='arrows racing team' AND \"rounds\"='1-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyres\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Which Constructor has Rounds, All and Driver, Bruno Giacomelli?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"drivers_and_constructors\" WHERE \"rounds\"='all' AND \"driver\"='bruno giacomelli';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the winning score when Damien McGrane was runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"european_tour_wins_5\" WHERE \"runner_s_up\"='damien mcgrane';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.