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 \"history\" (\n \"year\" real,\n \"western_champion\" text,\n \"result\" text,\n \"eastern_champion\" text,\n \"finals_mvp\" text\n);\n\nQuestion: What is the score from the Sacramento monarchs from the west and the Connecticut sun from the east?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"history\" WHERE \"western_champion\"='sacramento monarchs' AND \"eastern_champion\"='connecticut sun';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: Who is the nominee for Best Lead Actress?"
},
{
"role": "assistant",
"content": "SELECT \"nominee\" FROM \"awards\" WHERE \"category\"='best lead actress';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: In what category is Carmen Salinas nominated?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"awards\" WHERE \"nominee\"='carmen salinas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What year was there a category of Best Supporting Actress?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"awards\" WHERE \"category\"='best supporting actress';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"location\" text,\n \"londonborough\" text,\n \"post_town\" text,\n \"postcodedistrict\" text,\n \"dialcode\" text\n);\n\nQuestion: What Londongborough has a Dialcode of 01992?"
},
{
"role": "assistant",
"content": "SELECT \"londonborough\" FROM \"see_also\" WHERE \"dialcode\"='01992';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"location\" text,\n \"londonborough\" text,\n \"post_town\" text,\n \"postcodedistrict\" text,\n \"dialcode\" text\n);\n\nQuestion: What is the Dialcode of whitechapel?"
},
{
"role": "assistant",
"content": "SELECT \"dialcode\" FROM \"see_also\" WHERE \"location\"='whitechapel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"location\" text,\n \"londonborough\" text,\n \"post_town\" text,\n \"postcodedistrict\" text,\n \"dialcode\" text\n);\n\nQuestion: What is the name of the Post code district that is in Eden Park?"
},
{
"role": "assistant",
"content": "SELECT \"postcodedistrict\" FROM \"see_also\" WHERE \"location\"='eden park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"location\" text,\n \"londonborough\" text,\n \"post_town\" text,\n \"postcodedistrict\" text,\n \"dialcode\" text\n);\n\nQuestion: Which Post Town has a Dialcode of 020 and is located in Hook?"
},
{
"role": "assistant",
"content": "SELECT \"post_town\" FROM \"see_also\" WHERE \"dialcode\"='020' AND \"location\"='hook';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"location\" text,\n \"londonborough\" text,\n \"post_town\" text,\n \"postcodedistrict\" text,\n \"dialcode\" text\n);\n\nQuestion: What Dialcode has a location of Edmonton?"
},
{
"role": "assistant",
"content": "SELECT \"dialcode\" FROM \"see_also\" WHERE \"location\"='edmonton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: Which average rank has an Earning amount that is less than $224,589?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"leaders\" WHERE \"earnings\"<'224,589';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: Which country has a rank of 2?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"leaders\" WHERE \"rank\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"howick_local_board\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the total number on roll for Shelly Park school?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"roll\") FROM \"howick_local_board\" WHERE \"name\"='shelly park 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\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_a\" text,\n \"game_site\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What week was the record 0-5?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"record\"='0-5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_a\" text,\n \"game_site\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the result of the game with the attendance of 45,320?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='45,320';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_a\" text,\n \"game_site\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What time was the kickoff on September 15, 1985?"
},
{
"role": "assistant",
"content": "SELECT \"kickoff_a\" FROM \"schedule\" WHERE \"date\"='september 15, 1985';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" text,\n \"avg\" text,\n \"td_s\" real,\n \"long\" text\n);\n\nQuestion: Which Player had a Long of 5 and Yards of 6?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"running_backs\" WHERE \"long\"='5' AND \"yards\"='6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" text,\n \"avg\" text,\n \"td_s\" real,\n \"long\" text\n);\n\nQuestion: What was the total number of TD's for Player Lashaun Ward while also having a Long of 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"td_s\") FROM \"running_backs\" WHERE \"long\"='2' AND \"player\"='lashaun ward';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" text,\n \"avg\" text,\n \"td_s\" real,\n \"long\" text\n);\n\nQuestion: How many Yards did Player Rob Turner collect?"
},
{
"role": "assistant",
"content": "SELECT \"yards\" FROM \"running_backs\" WHERE \"player\"='rob turner';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who is the home team on March 5?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"game_log\" WHERE \"date\"='march 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who is the visitor on March 24?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"game_log\" WHERE \"date\"='march 24';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the home team on March 24?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"game_log\" WHERE \"date\"='march 24';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\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 total crowd at the game where the home team score was 8.21 (69)"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_11\" WHERE \"home_team_score\"='8.21 (69)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\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 a home team score 16.15 (111)"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_11\" WHERE \"home_team_score\"='16.15 (111)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\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 total crowd in the game where the home teams score was 18.12 (120)"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_11\" WHERE \"home_team_score\"='18.12 (120)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\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: On which date was the game where the home teams score was 22.15 (147), and the away teams score was 9.8 (62)"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_11\" WHERE \"home_team_score\"='22.15 (147)' AND \"away_team_score\"='9.8 (62)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"defense\" (\n \"player\" text,\n \"tackles\" real,\n \"solo\" real,\n \"assisted\" real,\n \"sack\" real,\n \"yards\" real,\n \"td_s\" real\n);\n\nQuestion: what is the lowest solo when assisted is less than 10, td's is 0, sack is less than 3 and yards is more than 5?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"solo\") FROM \"defense\" WHERE \"assisted\"<10 AND \"td_s\"=0 AND \"sack\"<3 AND \"yards\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"defense\" (\n \"player\" text,\n \"tackles\" real,\n \"solo\" real,\n \"assisted\" real,\n \"sack\" real,\n \"yards\" real,\n \"td_s\" real\n);\n\nQuestion: what is the assisted when the solo is 6 and sack is less than 5?"
},
{
"role": "assistant",
"content": "SELECT \"assisted\" FROM \"defense\" WHERE \"solo\"=6 AND \"sack\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"defense\" (\n \"player\" text,\n \"tackles\" real,\n \"solo\" real,\n \"assisted\" real,\n \"sack\" real,\n \"yards\" real,\n \"td_s\" real\n);\n\nQuestion: what is the highest td's when the sack is less than 13, tackles is less than 8 and yards is less than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"td_s\") FROM \"defense\" WHERE \"sack\"<13 AND \"tackles\"<8 AND \"yards\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_phase\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: How many losses had a played number that was more than 34?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"first_phase\" WHERE \"played\">34;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_phase\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Which highest 'goals against' number had wins of 19 and a 'goals for' number that was bigger than 53?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals_against\") FROM \"first_phase\" WHERE \"wins\"=19 AND \"goals_for\">53;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_phase\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Which mean number of losses had a played number that was bigger than 34?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"losses\") FROM \"first_phase\" WHERE \"played\">34;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_phase\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Which lowest goals for number had a played number of less than 34?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goals_for\") FROM \"first_phase\" WHERE \"played\"<34;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_phase\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Which Played number had a goal difference of more than 0 when the club was Valencia CF?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"played\") FROM \"first_phase\" WHERE \"goal_difference\">0 AND \"club\"='valencia cf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What player has a college named san sebastian?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_5\" WHERE \"college\"='san sebastian';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What college has pick 45"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"round_5\" WHERE \"pick\"=45;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_7_2011\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Name the air date for the seasons before 14 and series less than 183 with production code more than 709"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"season_7_2011\" WHERE \"season_num\"<14 AND \"production_code\">709 AND \"series_num\"<183;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_7_2011\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Tell me the title for the production code less than 706 with series number more than 175"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"season_7_2011\" WHERE \"series_num\">175 AND \"production_code\"<706;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_7_2011\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: Name the least series number with production code of 717 and season number less than 17"
},
{
"role": "assistant",
"content": "SELECT MIN(\"series_num\") FROM \"season_7_2011\" WHERE \"production_code\"=717 AND \"season_num\"<17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"children_s_books\" (\n \"g_zel_aml_nin_kay_p_panteri\" text,\n \"g_zel_aml_s_lost_panther\" text,\n \"collection_of_short_stories\" text,\n \"can_yay_nlar\" text,\n \"2005\" real\n);\n\nQuestion: Which Can Yay\u0131nlar\u0131 has a G\u00fczel\u00e7aml\u0131\u2019nin Kay\u0131p Panteri of \u00e7evreci peri?"
},
{
"role": "assistant",
"content": "SELECT \"can_yay_nlar\" FROM \"children_s_books\" WHERE \"g_zel_aml_nin_kay_p_panteri\"='\u00e7evreci peri';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"children_s_books\" (\n \"g_zel_aml_nin_kay_p_panteri\" text,\n \"g_zel_aml_s_lost_panther\" text,\n \"collection_of_short_stories\" text,\n \"can_yay_nlar\" text,\n \"2005\" real\n);\n\nQuestion: Which 2005 has a G\u00fczel\u00e7aml\u0131\u2019s Lost Panther of green fairy?"
},
{
"role": "assistant",
"content": "SELECT \"2005\" FROM \"children_s_books\" WHERE \"g_zel_aml_s_lost_panther\"='green fairy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"children_s_books\" (\n \"g_zel_aml_nin_kay_p_panteri\" text,\n \"g_zel_aml_s_lost_panther\" text,\n \"collection_of_short_stories\" text,\n \"can_yay_nlar\" text,\n \"2005\" real\n);\n\nQuestion: Which 2005 has a G\u00fczel\u00e7aml\u0131\u2019s Lost Panther of the muse?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"2005\") FROM \"children_s_books\" WHERE \"g_zel_aml_s_lost_panther\"='the muse';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what is the grid when the driver is pierre levegh?"
},
{
"role": "assistant",
"content": "SELECT \"grid\" FROM \"race\" WHERE \"driver\"='pierre levegh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what is the grid when the laps is 2?"
},
{
"role": "assistant",
"content": "SELECT \"grid\" FROM \"race\" WHERE \"laps\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what is the time/retired when the driver is toulo de graffenried?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"driver\"='toulo de graffenried';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what is the time/retired when the grid is less than 13, the constructor is alfa romeo and the laps is more than 12?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"grid\"<13 AND \"constructor\"='alfa romeo' AND \"laps\">12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what is the grid when the laps is more than 20?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"race\" WHERE \"laps\">20;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_50\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the D 49 \u221a when D 47 \u221a is d 67 +?"
},
{
"role": "assistant",
"content": "SELECT \"d_49\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_47\"='d 67 +';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_50\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the number for D 44 \u221a when D 47 \u221a is r 7?"
},
{
"role": "assistant",
"content": "SELECT \"d_44\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_47\"='r 7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_50\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the D 42 \u221a number when the D 45 \u221a is r 16?"
},
{
"role": "assistant",
"content": "SELECT \"d_42\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_45\"='r 16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_50\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the D 49 \u221a number when the D 41 \u221a is d 61 \u221a?"
},
{
"role": "assistant",
"content": "SELECT \"d_49\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_41\"='d 61 \u221a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_50\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the D 42 \u221a figure when D 46 \u221a is r 6?"
},
{
"role": "assistant",
"content": "SELECT \"d_42\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_46\"='r 6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_50\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the D 50 \u221a when the D 47 \u221a is r 27 \u221a?"
},
{
"role": "assistant",
"content": "SELECT \"d_50\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_47\"='r 27 \u221a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goal_to_win\" (\n \"player\" text,\n \"competition\" text,\n \"team\" text,\n \"opponent\" text,\n \"year\" real,\n \"score\" text\n);\n\nQuestion: Tell me the player for ballarat football league"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"goal_to_win\" WHERE \"competition\"='ballarat football league';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goal_to_win\" (\n \"player\" text,\n \"competition\" text,\n \"team\" text,\n \"opponent\" text,\n \"year\" real,\n \"score\" text\n);\n\nQuestion: Tell me the player for east perth"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"goal_to_win\" WHERE \"team\"='east perth';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goal_to_win\" (\n \"player\" text,\n \"competition\" text,\n \"team\" text,\n \"opponent\" text,\n \"year\" real,\n \"score\" text\n);\n\nQuestion: Tell met he score for team of waaia"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"goal_to_win\" WHERE \"team\"='waaia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"goal_to_win\" (\n \"player\" text,\n \"competition\" text,\n \"team\" text,\n \"opponent\" text,\n \"year\" real,\n \"score\" text\n);\n\nQuestion: Tell me the team for victorian football league"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"goal_to_win\" WHERE \"competition\"='victorian football league';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"position\" text,\n \"from_club\" text,\n \"date_joined\" text,\n \"debut\" text\n);\n\nQuestion: What round was the debut of Scott Tunbridge?"
},
{
"role": "assistant",
"content": "SELECT \"debut\" FROM \"in\" WHERE \"name\"='scott tunbridge';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"position\" text,\n \"from_club\" text,\n \"date_joined\" text,\n \"debut\" text\n);\n\nQuestion: What round was the debut of defender Stephen Laybutt?"
},
{
"role": "assistant",
"content": "SELECT \"debut\" FROM \"in\" WHERE \"position\"='defender' AND \"name\"='stephen laybutt';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"position\" text,\n \"from_club\" text,\n \"date_joined\" text,\n \"debut\" text\n);\n\nQuestion: What position had a debut in round 6?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"in\" WHERE \"debut\"='round 6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"position\" text,\n \"from_club\" text,\n \"date_joined\" text,\n \"debut\" text\n);\n\nQuestion: What is the name of the player that had a debut in round 6?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"in\" WHERE \"debut\"='round 6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"position\" text,\n \"from_club\" text,\n \"date_joined\" text,\n \"debut\" text\n);\n\nQuestion: What date did the player from Santo Andr\u00e9 debut?"
},
{
"role": "assistant",
"content": "SELECT \"date_joined\" FROM \"in\" WHERE \"from_club\"='santo andr\u00e9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"venue\" text,\n \"location\" text,\n \"winning_team\" text,\n \"score\" text,\n \"u_s_captain\" text,\n \"international_captain\" text\n);\n\nQuestion: what is the venue when the score is 20\u00bd\u201311\u00bd?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"results\" WHERE \"score\"='20\u00bd\u201311\u00bd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"venue\" text,\n \"location\" text,\n \"winning_team\" text,\n \"score\" text,\n \"u_s_captain\" text,\n \"international_captain\" text\n);\n\nQuestion: Who is the winning team when the year is more than 2003, the score is 19\u00bd\u201314\u00bd and the venue is harding park golf club?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"results\" WHERE \"year\">2003 AND \"score\"='19\u00bd\u201314\u00bd' AND \"venue\"='harding park golf club';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"venue\" text,\n \"location\" text,\n \"winning_team\" text,\n \"score\" text,\n \"u_s_captain\" text,\n \"international_captain\" text\n);\n\nQuestion: what is the highest year that the U.S. captain is ken venturi?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"results\" WHERE \"u_s_captain\"='ken venturi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"venue\" text,\n \"location\" text,\n \"winning_team\" text,\n \"score\" text,\n \"u_s_captain\" text,\n \"international_captain\" text\n);\n\nQuestion: what is the location when the year is less than 1998 and the international captain is david graham?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"results\" WHERE \"year\"<1998 AND \"international_captain\"='david graham';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: How much did jim colbert earned ranked above 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"earnings\") FROM \"leaders\" WHERE \"player\"='jim colbert' AND \"rank\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\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 away team score where the crowd is greater than 25,000 and the Away team is south melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_11\" WHERE \"crowd\">'25,000' AND \"away_team\"='south melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\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 largest crowd with a Home team score of 9.17 (71)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_11\" WHERE \"home_team_score\"='9.17 (71)';"
}
] |
[
{
"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: What day did the VFL play at Junction Oval?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_18\" WHERE \"venue\"='junction oval';"
}
] |
[
{
"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: Where did Footscray play as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_18\" 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: Who was the opponent when Footscray played as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_18\" 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: What was the attendance when the VFL played Arden Street Oval?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_18\" 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 \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What was the score June 22?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"date\"='june 22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: Which school has a hometown of winter park, FL?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"2007_boys_team\" WHERE \"hometown\"='winter park, fl';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What's the college of the player with a height of 6-4 and went to lake howell high school?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"2007_boys_team\" WHERE \"height\"='6-4' AND \"school\"='lake howell high school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What's the hometown of the player with a college of lsu?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"2007_boys_team\" WHERE \"college\"='lsu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What's the heigh of the player who went to lake howell high school?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"2007_boys_team\" WHERE \"school\"='lake howell high school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What's the heigh of nolan smith?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"2007_boys_team\" WHERE \"player\"='nolan smith';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What's the height of the player who went to oak hill academy?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"2007_boys_team\" WHERE \"school\"='oak hill academy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What tyre did Paul Russo have on his fastest lap?"
},
{
"role": "assistant",
"content": "SELECT \"tyre\" FROM \"season_review\" WHERE \"fastest_lap\"='paul russo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What is the date that Stirling Moss had his fastest lap in a Maserati?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"season_review\" WHERE \"constructor\"='maserati' AND \"fastest_lap\"='stirling moss';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: Who was the winning driver on 30 May?"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"season_review\" WHERE \"date\"='30 may';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What was the fastest lap in the Belgian Grand Prix?"
},
{
"role": "assistant",
"content": "SELECT \"fastest_lap\" FROM \"season_review\" WHERE \"race\"='belgian grand prix';"
}
] |
[
{
"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: Who was the home team when the away team was Hawthorn?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_18\" 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 \"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: On what date did the game at Windy Hill take place?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_18\" WHERE \"venue\"='windy hill';"
}
] |
[
{
"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: What was the venue when the away team was Hawthorn?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_18\" 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 \"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: What was the home team when the game was at Windy Hill?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_18\" WHERE \"venue\"='windy hill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: What position has less than 343 laps in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"pos\" FROM \"24_hours_of_le_mans_results\" WHERE \"laps\"<343 AND \"year\"=2010;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: What are panoz motor sports' lowest number of laps before 2002?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"24_hours_of_le_mans_results\" WHERE \"team\"='panoz motor sports' AND \"year\"<2002;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\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 \"series\" text\n);\n\nQuestion: What's the sum of the games that had paul (9) for high assists?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"game\") FROM \"playoffs\" WHERE \"high_assists\"='paul (9)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\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 \"series\" text\n);\n\nQuestion: What team had a high points of west (20)?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"playoffs\" WHERE \"high_points\"='west (20)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What week was the game played at Robert f. Kennedy memorial stadium with more than 54,633 people in attendance?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"game_site\"='robert f. kennedy memorial stadium' AND \"attendance\">'54,633';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What was the result of the game played in texas stadium with more than 46,267 in the crowd and against the pittsburgh steelers?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"game_site\"='texas stadium' AND \"attendance\">'46,267' AND \"opponent\"='pittsburgh steelers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What opponent had a game with more than 50,705 in attendace on September 13, 1982?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\">'50,705' AND \"date\"='september 13, 1982';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the time/retired associated with a grid of 5 and under 73 laps?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"laps\"<73 AND \"grid\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"placings\" real,\n \"figures\" real,\n \"free\" real,\n \"total\" real\n);\n\nQuestion: What was the free score of the skater with a total of 156.67?"
},
{
"role": "assistant",
"content": "SELECT \"free\" FROM \"men\" WHERE \"total\"=156.67;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"rank\" real,\n \"name\" text,\n \"nation\" text,\n \"placings\" real,\n \"figures\" real,\n \"free\" real,\n \"total\" real\n);\n\nQuestion: What was the average figure score of the skater with a free score under 56.35?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"figures\") FROM \"men\" WHERE \"free\"<56.35;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competitive\" (\n \"date\" text,\n \"tournament\" text,\n \"round\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score_1\" text\n);\n\nQuestion: Which opponent had round 1?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"competitive\" WHERE \"round\"='1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competitive\" (\n \"date\" text,\n \"tournament\" text,\n \"round\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score_1\" text\n);\n\nQuestion: Which date's opponent was Dender when the tournament was in the Jupiler League and the ground was a?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"competitive\" WHERE \"opponent\"='dender' AND \"tournament\"='jupiler league' AND \"ground\"='a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competitive\" (\n \"date\" text,\n \"tournament\" text,\n \"round\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score_1\" text\n);\n\nQuestion: Which ground's round was 33?"
},
{
"role": "assistant",
"content": "SELECT \"ground\" FROM \"competitive\" WHERE \"round\"='33';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.