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 \"airbus_jetliners_1972_1994\" (\n \"model\" text,\n \"a300\" text,\n \"a310\" text,\n \"a320\" text,\n \"a330\" text,\n \"a340\" text\n);\n\nQuestion: What model is the A310 of 1983?"
},
{
"role": "assistant",
"content": "SELECT \"model\" FROM \"airbus_jetliners_1972_1994\" WHERE \"a310\"='1983';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"male_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: What name is in the number 2 spot when Ethan is in the number 6 spot and Mason is in the number 3 spot?"
},
{
"role": "assistant",
"content": "SELECT \"no_2\" FROM \"male_names\" WHERE \"no_6\"='ethan' AND \"no_3\"='mason';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"male_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: In what region and year was Jacob the number 2 name and Ryan the number 10 name?"
},
{
"role": "assistant",
"content": "SELECT \"region_year\" FROM \"male_names\" WHERE \"no_2\"='jacob' AND \"no_10\"='ryan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"male_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: What name was number 7 when Mason was number 1, Owen was number 6, Jackson was number 9, and Logan was number 10?"
},
{
"role": "assistant",
"content": "SELECT \"no_7\" FROM \"male_names\" WHERE \"no_1\"='mason' AND \"no_9\"='jackson' AND \"no_10\"='logan' AND \"no_6\"='owen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"male_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: What name was in the number 4 spot when Aiden was number 7 and James was number 3?"
},
{
"role": "assistant",
"content": "SELECT \"no_4\" FROM \"male_names\" WHERE \"no_7\"='aiden' AND \"no_3\"='james';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"j\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the positions of Damon Jones?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"j\" WHERE \"player\"='damon jones';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"j\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: for how many years did the player who graduated from stanford play for Grizzlies?"
},
{
"role": "assistant",
"content": "SELECT \"years_for_grizzlies\" FROM \"j\" WHERE \"school_club_team\"='stanford';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"j\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which school did Dahntay Jones graduate from?"
},
{
"role": "assistant",
"content": "SELECT \"school_club_team\" FROM \"j\" WHERE \"player\"='dahntay jones';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"j\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which player gradyated from Florida State?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"j\" WHERE \"school_club_team\"='florida state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals\" (\n \"year\" text,\n \"champions\" text,\n \"result\" text,\n \"runners_up\" text,\n \"playoffs_mvp\" text\n);\n\nQuestion: What is the Playoffs MVP of the game with a Result of 4\u20131 with Champions Daejeon Hyundai Dynat?"
},
{
"role": "assistant",
"content": "SELECT \"playoffs_mvp\" FROM \"finals\" WHERE \"result\"='4\u20131' AND \"champions\"='daejeon hyundai dynat';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals\" (\n \"year\" text,\n \"champions\" text,\n \"result\" text,\n \"runners_up\" text,\n \"playoffs_mvp\" text\n);\n\nQuestion: What is the Year of the game with Result of 4\u20133 and Champions of Daegu Tongyang Orions?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"finals\" WHERE \"result\"='4\u20133' AND \"champions\"='daegu tongyang orions';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals\" (\n \"year\" text,\n \"champions\" text,\n \"result\" text,\n \"runners_up\" text,\n \"playoffs_mvp\" text\n);\n\nQuestion: What is the Runners-up of the game with a Result of 4\u20131 and Champions of Wonju Dongbu Promy?"
},
{
"role": "assistant",
"content": "SELECT \"runners_up\" FROM \"finals\" WHERE \"result\"='4\u20131' AND \"champions\"='wonju dongbu promy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friendlies\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Where was the venue that Linfield was the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"friendlies\" WHERE \"opponent\"='linfield';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_division\" (\n \"scorer\" text,\n \"club\" text,\n \"league_goals\" text,\n \"fa_cup_goals\" real,\n \"league_cup_goals\" real,\n \"total\" real\n);\n\nQuestion: Which scorer plays for Aldershot and has scored a total of 19 League goals?"
},
{
"role": "assistant",
"content": "SELECT \"scorer\" FROM \"fourth_division\" WHERE \"club\"='aldershot' AND \"league_goals\"='19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_division\" (\n \"scorer\" text,\n \"club\" text,\n \"league_goals\" text,\n \"fa_cup_goals\" real,\n \"league_cup_goals\" real,\n \"total\" real\n);\n\nQuestion: What is the highest number of League Cup goals that were scored by Hartlepool?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"league_cup_goals\") FROM \"fourth_division\" WHERE \"club\"='hartlepool';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: When was the game at the North Shore Events Centre?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_12\" WHERE \"venue\"='north shore events centre';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: What is the report corresponding to the game that had the Townsville Crocodiles as home team?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"round_12\" WHERE \"home_team\"='townsville crocodiles';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: When was the game that had Sydney Spirit as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_12\" WHERE \"away_team\"='sydney spirit';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: What was the box score for the game that had the Townsville Crocodiles as home team?"
},
{
"role": "assistant",
"content": "SELECT \"box_score\" FROM \"round_12\" WHERE \"home_team\"='townsville crocodiles';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: What was the box score for the game that had the Cairns Taipans as home team?"
},
{
"role": "assistant",
"content": "SELECT \"box_score\" FROM \"round_12\" WHERE \"home_team\"='cairns taipans';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What's the lap number for time/retired of +33.912?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"moto_gp_classification\" WHERE \"time_retired\"='+33.912';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Total laps for Shinya Nakano at smaller than 10 grids."
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"moto_gp_classification\" WHERE \"rider\"='shinya nakano' AND \"grid\"<10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What years were from Connecticut?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"a\" WHERE \"from\"='connecticut';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: Where is the position of sG from?"
},
{
"role": "assistant",
"content": "SELECT \"from\" FROM \"a\" WHERE \"position\"='sg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: Which player wears the number 2 on his jersey?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"a\" WHERE \"jersey_number_s\"='2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What position is from Georgia Tech?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"a\" WHERE \"from\"='georgia tech';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the highest number of rebounds of the san antonio spurs?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"team\"='san antonio spurs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score of game 4?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the date of the game with a w 105-88 score?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"score\"='w 105-88';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the game with the golden state warriors?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"game_log\" WHERE \"team\"='golden state warriors';"
}
] |
[
{
"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: What is the Pick # of the Player from Southern MIssissippi?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick\") FROM \"nfl_draft\" WHERE \"school\"='southern mississippi';"
}
] |
[
{
"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: In what Round was Derrick Franklin picked?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"nfl_draft\" WHERE \"player\"='derrick franklin';"
}
] |
[
{
"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: In what Round does Duke have a Pick larger than 9?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"nfl_draft\" WHERE \"pick\">9 AND \"school\"='duke';"
}
] |
[
{
"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: In what Round was Tommy Norman picked?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"nfl_draft\" WHERE \"player\"='tommy norman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_indicators_for_nwsc_1998_201\" (\n \"1998\" text,\n \"2000\" text,\n \"2004\" text,\n \"2007\" text,\n \"2011\" text\n);\n\nQuestion: What is the 2000 value if the 1998 value is 1.5?"
},
{
"role": "assistant",
"content": "SELECT \"2000\" FROM \"performance_indicators_for_nwsc_1998_201\" WHERE \"1998\"='1.5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_indicators_for_nwsc_1998_201\" (\n \"1998\" text,\n \"2000\" text,\n \"2004\" text,\n \"2007\" text,\n \"2011\" text\n);\n\nQuestion: What is the 2004 value if the 1998 value is 35?"
},
{
"role": "assistant",
"content": "SELECT \"2004\" FROM \"performance_indicators_for_nwsc_1998_201\" WHERE \"1998\"='35';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_indicators_for_nwsc_1998_201\" (\n \"1998\" text,\n \"2000\" text,\n \"2004\" text,\n \"2007\" text,\n \"2011\" text\n);\n\nQuestion: What is the 1998 value if the 2000 value is 25?"
},
{
"role": "assistant",
"content": "SELECT \"1998\" FROM \"performance_indicators_for_nwsc_1998_201\" WHERE \"2000\"='25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_indicators_for_nwsc_1998_201\" (\n \"1998\" text,\n \"2000\" text,\n \"2004\" text,\n \"2007\" text,\n \"2011\" text\n);\n\nQuestion: What is the 1998 value if the 2007 value is 8?"
},
{
"role": "assistant",
"content": "SELECT \"1998\" FROM \"performance_indicators_for_nwsc_1998_201\" WHERE \"2007\"='8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_indicators_for_nwsc_1998_201\" (\n \"1998\" text,\n \"2000\" text,\n \"2004\" text,\n \"2007\" text,\n \"2011\" text\n);\n\nQuestion: What is the 2000 value if the 1998 value is 1.5?"
},
{
"role": "assistant",
"content": "SELECT \"2000\" FROM \"performance_indicators_for_nwsc_1998_201\" WHERE \"1998\"='1.5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance_indicators_for_nwsc_1998_201\" (\n \"1998\" text,\n \"2000\" text,\n \"2004\" text,\n \"2007\" text,\n \"2011\" text\n);\n\nQuestion: What is the 1998 value if the 2011 value is 30.4?"
},
{
"role": "assistant",
"content": "SELECT \"1998\" FROM \"performance_indicators_for_nwsc_1998_201\" WHERE \"2011\"='30.4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"typical_duplex_scanners\" (\n \"product\" text,\n \"dimensions_mm\" text,\n \"pages_per_minute_color\" real,\n \"max_page_size\" text,\n \"interface\" text\n);\n\nQuestion: What is the interface of the product xerox travel scanner 100?"
},
{
"role": "assistant",
"content": "SELECT \"interface\" FROM \"typical_duplex_scanners\" WHERE \"product\"='xerox travel scanner 100';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"typical_duplex_scanners\" (\n \"product\" text,\n \"dimensions_mm\" text,\n \"pages_per_minute_color\" real,\n \"max_page_size\" text,\n \"interface\" text\n);\n\nQuestion: What is the pages per minute (color) of the machine that has a max page size of a4 and dimensions (mm) of 303 x 94 x 60?"
},
{
"role": "assistant",
"content": "SELECT \"pages_per_minute_color\" FROM \"typical_duplex_scanners\" WHERE \"max_page_size\"='a4' AND \"dimensions_mm\"='303 x 94 x 60';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"end_of_season_managerial_changes\" (\n \"name\" text,\n \"club\" text,\n \"date_of_departure\" text,\n \"replacement\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: What club had Guus Hiddink as outgoing manager?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"end_of_season_managerial_changes\" WHERE \"name\"='guus hiddink';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"end_of_season_managerial_changes\" (\n \"name\" text,\n \"club\" text,\n \"date_of_departure\" text,\n \"replacement\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: When did Brendan Rodgers depart his position?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_departure\" FROM \"end_of_season_managerial_changes\" WHERE \"name\"='brendan rodgers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"end_of_season_managerial_changes\" (\n \"name\" text,\n \"club\" text,\n \"date_of_departure\" text,\n \"replacement\" text,\n \"date_of_appointment\" text\n);\n\nQuestion: On what date was Paulo Sousa appointed?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_appointment\" FROM \"end_of_season_managerial_changes\" WHERE \"replacement\"='paulo sousa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who had the high rebounds, and how many did he have, for the game played on April 9?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"date\"='april 9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"philadelphia_phillies_vs_los_angeles_dod\" (\n \"game\" real,\n \"date\" text,\n \"score\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: What date did a game have a time of 3:44?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"philadelphia_phillies_vs_los_angeles_dod\" WHERE \"time\"='3:44';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"philadelphia_phillies_vs_los_angeles_dod\" (\n \"game\" real,\n \"date\" text,\n \"score\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: What was the attendance for the game after game 4?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"philadelphia_phillies_vs_los_angeles_dod\" WHERE \"game\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"barangays\" (\n \"barangay\" text,\n \"urban_rural\" text,\n \"geographic_character\" text,\n \"population_2007\" real,\n \"population_2010\" real\n);\n\nQuestion: WHAT IS THE TYPE OF LAND WITH A 2010 POPULATION GREATER THAN 2539, A RURAL AREA, AND A 2007 POPULATION OF 2572?"
},
{
"role": "assistant",
"content": "SELECT \"geographic_character\" FROM \"barangays\" WHERE \"population_2010\">2539 AND \"urban_rural\"='rural' AND \"population_2007\"=2572;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"barangays\" (\n \"barangay\" text,\n \"urban_rural\" text,\n \"geographic_character\" text,\n \"population_2007\" real,\n \"population_2010\" real\n);\n\nQuestion: WHAT IS THE TYPE OF LAND WITH A 2007 POPULATION SMALLER THAN 4346, 2010 POPULATION LARGER THAN 3385, FROM BARANGAY OF MANALONGON?"
},
{
"role": "assistant",
"content": "SELECT \"geographic_character\" FROM \"barangays\" WHERE \"population_2007\"<4346 AND \"population_2010\">3385 AND \"barangay\"='manalongon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"barangays\" (\n \"barangay\" text,\n \"urban_rural\" text,\n \"geographic_character\" text,\n \"population_2007\" real,\n \"population_2010\" real\n);\n\nQuestion: WHAT IS THE POPULATION OF 2007 WHEN 2010 POPULATION WAS SMALLER THAN 1282?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"population_2007\") FROM \"barangays\" WHERE \"population_2010\"<1282;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the number of points when the played is less than 30?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"group_i\" WHERE \"played\"<30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the number of goals when the goal difference was less than 43, and the position less than 3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"goals_for\") FROM \"group_i\" WHERE \"goal_difference\"<43 AND \"position\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the position when the points were less than 34, draws of 7, and a Club of sd eibar?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"position\") FROM \"group_i\" WHERE \"points\"<34 AND \"draws\"=7 AND \"club\"='sd eibar';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the number of goals against when the goal difference was less than 43, the Wins less than 13, and losses more than 14?"
},
{
"role": "assistant",
"content": "SELECT \"goals_against\" FROM \"group_i\" WHERE \"goal_difference\"<43 AND \"wins\"<13 AND \"losses\">14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the highest Goal Difference when the goals against were less than 76, and the position larger than 5, and a Played larger than 30?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goal_difference\") FROM \"group_i\" WHERE \"goals_against\"<76 AND \"position\">5 AND \"played\">30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"production\" (\n \"block\" real,\n \"director\" text,\n \"writers\" text,\n \"producer\" text,\n \"code\" text\n);\n\nQuestion: Who is the producer for the director Richard Clark?"
},
{
"role": "assistant",
"content": "SELECT \"producer\" FROM \"production\" WHERE \"director\"='richard clark';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"production\" (\n \"block\" real,\n \"director\" text,\n \"writers\" text,\n \"producer\" text,\n \"code\" text\n);\n\nQuestion: What is the lowest block for director Graeme Harper?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"block\") FROM \"production\" WHERE \"director\"='graeme harper';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"country\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends_f_a\" text,\n \"stolen_ends_for\" real,\n \"stolen_ends_against\" real,\n \"shot_pct\" real\n);\n\nQuestion: What is the skip when the country is finland?"
},
{
"role": "assistant",
"content": "SELECT \"skip\" FROM \"standings\" WHERE \"country\"='finland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"country\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends_f_a\" text,\n \"stolen_ends_for\" real,\n \"stolen_ends_against\" real,\n \"shot_pct\" real\n);\n\nQuestion: What is the lowest ends lost when the stolen ends for is less than 13, and stolten ends against is 6?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"ends_lost\") FROM \"standings\" WHERE \"stolen_ends_for\"<13 AND \"stolen_ends_against\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"country\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends_f_a\" text,\n \"stolen_ends_for\" real,\n \"stolen_ends_against\" real,\n \"shot_pct\" real\n);\n\nQuestion: What is the sum shot % when the country is finland, and an ends lost is larger than 49?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"shot_pct\") FROM \"standings\" WHERE \"country\"='finland' AND \"ends_lost\">49;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"country\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends_f_a\" text,\n \"stolen_ends_for\" real,\n \"stolen_ends_against\" real,\n \"shot_pct\" real\n);\n\nQuestion: What is the stolen ends against for a bank ends f/a of 4/7, and a country of china?"
},
{
"role": "assistant",
"content": "SELECT \"stolen_ends_against\" FROM \"standings\" WHERE \"blank_ends_f_a\"='4/7' AND \"country\"='china';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1970s_eagles_15_4_1\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"location\" text\n);\n\nQuestion: what is the location when the year is after 1974 and the date is september 19?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"1970s_eagles_15_4_1\" WHERE \"year\">1974 AND \"date\"='september 19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1970s_eagles_15_4_1\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"location\" text\n);\n\nQuestion: what is the location when the year is before 1979 and the result is 19-17?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"1970s_eagles_15_4_1\" WHERE \"year\"<1979 AND \"result\"='19-17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1970s_eagles_15_4_1\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"location\" text\n);\n\nQuestion: what is the result for 1970 at yankee stadium?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"1970s_eagles_15_4_1\" WHERE \"year\"=1970 AND \"location\"='yankee stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1970s_eagles_15_4_1\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"location\" text\n);\n\nQuestion: what is the year when the location is yankee stadium and the result is 23-23"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"1970s_eagles_15_4_1\" WHERE \"location\"='yankee stadium' AND \"result\"='23-23';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances\" (\n \"name\" text,\n \"years\" text,\n \"league\" real,\n \"scottish_cup\" real,\n \"league_cup\" real,\n \"europe\" real,\n \"total\" real\n);\n\nQuestion: Which Scottish Cup has a League Cup of 95, and a Europe larger than 23?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"scottish_cup\") FROM \"appearances\" WHERE \"league_cup\"=95 AND \"europe\">23;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances\" (\n \"name\" text,\n \"years\" text,\n \"league\" real,\n \"scottish_cup\" real,\n \"league_cup\" real,\n \"europe\" real,\n \"total\" real\n);\n\nQuestion: Which Total has a Name of eoin jess category:articles with hcards, and a Scottish Cup larger than 23?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"appearances\" WHERE \"name\"='eoin jess category:articles with hcards' AND \"scottish_cup\">23;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances\" (\n \"name\" text,\n \"years\" text,\n \"league\" real,\n \"scottish_cup\" real,\n \"league_cup\" real,\n \"europe\" real,\n \"total\" real\n);\n\nQuestion: Which Total has a Name of alex mcleish category:articles with hcards, and a League smaller than 494?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"appearances\" WHERE \"name\"='alex mcleish category:articles with hcards' AND \"league\"<494;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances\" (\n \"name\" text,\n \"years\" text,\n \"league\" real,\n \"scottish_cup\" real,\n \"league_cup\" real,\n \"europe\" real,\n \"total\" real\n);\n\nQuestion: Which League Cup has a Scottish Cup larger than 69?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"league_cup\") FROM \"appearances\" WHERE \"scottish_cup\">69;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances\" (\n \"name\" text,\n \"years\" text,\n \"league\" real,\n \"scottish_cup\" real,\n \"league_cup\" real,\n \"europe\" real,\n \"total\" real\n);\n\nQuestion: Which Scottish Cup has a League smaller than 561, Years of 1989\u20131995 1997\u20132001, and Europe smaller than 11?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"scottish_cup\") FROM \"appearances\" WHERE \"league\"<561 AND \"years\"='1989\u20131995 1997\u20132001' AND \"europe\"<11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_players_drafted_into_the_nfl\" (\n \"player\" text,\n \"position\" text,\n \"round\" real,\n \"pick\" real,\n \"nfl_club\" text\n);\n\nQuestion: What is the highest pick of the houston oilers NFL club, which has a round greater than 10?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick\") FROM \"team_players_drafted_into_the_nfl\" WHERE \"nfl_club\"='houston oilers' AND \"round\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_players_drafted_into_the_nfl\" (\n \"player\" text,\n \"position\" text,\n \"round\" real,\n \"pick\" real,\n \"nfl_club\" text\n);\n\nQuestion: What is the round of the new york jets NFL club?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"team_players_drafted_into_the_nfl\" WHERE \"nfl_club\"='new york jets';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_players_drafted_into_the_nfl\" (\n \"player\" text,\n \"position\" text,\n \"round\" real,\n \"pick\" real,\n \"nfl_club\" text\n);\n\nQuestion: What is the sum of the round of the new york jets NFL club, which has a pick less than 166?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"team_players_drafted_into_the_nfl\" WHERE \"nfl_club\"='new york jets' AND \"pick\"<166;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: WHAT IS THE 2012 PERFORMANCE FOR THE MADRID MASTERS?"
},
{
"role": "assistant",
"content": "SELECT \"2012\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='madrid masters';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: WHAT IS THE 2011 PERFORMANCE FOR TOURNAMENTS PLAYED?"
},
{
"role": "assistant",
"content": "SELECT \"2011\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='tournaments played';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: WHAT IS THE 2010 PERFORMANCE THAT HAD 2009 0F 0, AND FINALS TOURNAMENT?"
},
{
"role": "assistant",
"content": "SELECT \"2010\" FROM \"singles_performance_timeline\" WHERE \"2009\"='0' AND \"tournament\"='finals';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: WHAT IS THE 2009 PERFORMANCE FOR TOURNAMENTS PLAYED?"
},
{
"role": "assistant",
"content": "SELECT \"2009\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='tournaments played';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"scorers\" text,\n \"attendance\" real\n);\n\nQuestion: Who were the scorers in round 3?"
},
{
"role": "assistant",
"content": "SELECT \"scorers\" FROM \"fa_cup\" WHERE \"round\"='round 3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"scorers\" text,\n \"attendance\" real\n);\n\nQuestion: What is the H/A in the semi-final round where oldham athletic were the opponents?"
},
{
"role": "assistant",
"content": "SELECT \"h_a\" FROM \"fa_cup\" WHERE \"opponents\"='oldham athletic' AND \"round\"='semi-final';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"scorers\" text,\n \"attendance\" real\n);\n\nQuestion: Who were the scorers in the semi-final round where oldham athletic were the opponents?"
},
{
"role": "assistant",
"content": "SELECT \"scorers\" FROM \"fa_cup\" WHERE \"opponents\"='oldham athletic' AND \"round\"='semi-final';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_11_8_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Where was the tournament where the score was 1\u20136, 6\u20133, 3\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_11_8_3\" WHERE \"score\"='1\u20136, 6\u20133, 3\u20136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_11_8_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Who did thomaz bellucci play against when the score was 4\u20136, 6\u20134, 6\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"singles_11_8_3\" WHERE \"score\"='4\u20136, 6\u20134, 6\u20132';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_25_12_13\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome of the tournament with Akiko Yonemura as a partner on a hard surface?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles_25_12_13\" WHERE \"surface\"='hard' AND \"partner\"='akiko yonemura';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: Which tournament has 1r in 2011, 1r in 2012, A in 2005, and 1r in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_performance_timeline\" WHERE \"2011\"='1r' AND \"2012\"='1r' AND \"2005\"='a' AND \"2010\"='1r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is the 2010 value with a 1r in 2012 and an A in 2005?"
},
{
"role": "assistant",
"content": "SELECT \"2010\" FROM \"singles_performance_timeline\" WHERE \"2012\"='1r' AND \"2005\"='a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is the tournament with a 2r in 2009 and a 2r in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_performance_timeline\" WHERE \"2009\"='2r' AND \"2010\"='2r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is the 2011 value of the 2012 grand slam tournaments?"
},
{
"role": "assistant",
"content": "SELECT \"2011\" FROM \"singles_performance_timeline\" WHERE \"2012\"='grand slam tournaments';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the record after game 45?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"game\"='45';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the game at the delta center when the record was 35-14?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"location_attendance\"='delta center' AND \"record\"='35-14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent, during the game at the location of keyarena at seattle center?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"location_attendance\"='keyarena at seattle center';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selected_discography\" (\n \"artist\" text,\n \"inst\" text,\n \"release\" text,\n \"format\" text,\n \"label\" text,\n \"year\" real\n);\n\nQuestion: What is the label of release we are the rage with a cd format?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"selected_discography\" WHERE \"format\"='cd' AND \"release\"='we are the rage';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1950s_giants_13_7\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: Who was the winning team before 1956 on October 21?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"1950s_giants_13_7\" WHERE \"year\"<1956 AND \"date\"='october 21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1950s_giants_13_7\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: Who was the loser when the New York Giants were the winners on November 14?"
},
{
"role": "assistant",
"content": "SELECT \"loser\" FROM \"1950s_giants_13_7\" WHERE \"winner\"='new york giants' AND \"date\"='november 14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1950s_giants_13_7\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: Who was the winner when the Philadelphia eagles were the losers after 1958 at Yankee Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"1950s_giants_13_7\" WHERE \"loser\"='philadelphia eagles' AND \"location\"='yankee stadium' AND \"year\">1958;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1950s_giants_13_7\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: What location was the game with the result of 29-14?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"1950s_giants_13_7\" WHERE \"result\"='29-14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the score of the wigan athletic home team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"first_round_proper\" WHERE \"home_team\"='wigan athletic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the away team with a 2 tie no.?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"first_round_proper\" WHERE \"tie_no\"='2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the away team for the home team wigan athletic?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"first_round_proper\" WHERE \"home_team\"='wigan athletic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the score on 23 November 1983 with exeter city as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"first_round_proper\" WHERE \"date\"='23 november 1983' AND \"away_team\"='exeter city';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.