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 \"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 for the Dutch Grand Prix?"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"season_review\" WHERE \"race\"='dutch grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"songs_by_tanvi\" (\n \"film\" text,\n \"song\" text,\n \"year\" real,\n \"music_director\" text,\n \"language\" text\n);\n\nQuestion: Tell me the song with year before 2013 and music director of yuvan shankar raja and film of billa ii"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"songs_by_tanvi\" WHERE \"year\"<2013 AND \"music_director\"='yuvan shankar raja' AND \"film\"='billa ii';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_4_1998\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What title aired on March 19, 1998?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"season_4_1998\" WHERE \"original_air_date\"='march 19, 1998';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_4_1998\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: Who directed the show with the production code k2708?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"season_4_1998\" WHERE \"production_code\"='k2708';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_4_1998\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the season for series 81?"
},
{
"role": "assistant",
"content": "SELECT \"season_num\" FROM \"season_4_1998\" WHERE \"series_num\"=81;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\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 was a match played at Lake Oval?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_8\" WHERE \"venue\"='lake oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\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: At the home game in Collingwood, how much did the away team score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_8\" WHERE \"home_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\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: In the game at Victoria Park, what was the number of people in the crowd?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_8\" WHERE \"venue\"='victoria park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What was the tournament that happened in 1974 in gothenburg , sweden?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"achievements\" WHERE \"year\"=1974 AND \"venue\"='gothenburg , sweden';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_key\" (\n \"mlb_season\" text,\n \"team_season\" text,\n \"league\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text,\n \"win_pct\" text\n);\n\nQuestion: Which MLB division has a win record of 76?"
},
{
"role": "assistant",
"content": "SELECT \"division\" FROM \"table_key\" WHERE \"wins\"='76';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_key\" (\n \"mlb_season\" text,\n \"team_season\" text,\n \"league\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text,\n \"win_pct\" text\n);\n\nQuestion: What was the final rank of the Brewers in 1980?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"table_key\" WHERE \"team_season\"='1980';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_key\" (\n \"mlb_season\" text,\n \"team_season\" text,\n \"league\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text,\n \"win_pct\" text\n);\n\nQuestion: What was the final rank of the Brewers when they achieved a win percentage of .585?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"table_key\" WHERE \"win_pct\"='.585';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_key\" (\n \"mlb_season\" text,\n \"team_season\" text,\n \"league\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text,\n \"win_pct\" text\n);\n\nQuestion: Which division were the Brewers a part of in the 1987 season?"
},
{
"role": "assistant",
"content": "SELECT \"division\" FROM \"table_key\" WHERE \"team_season\"='1987';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_key\" (\n \"mlb_season\" text,\n \"team_season\" text,\n \"league\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text,\n \"win_pct\" text\n);\n\nQuestion: Which division of the Brewers had a 5th place ranking and a loss record of 87?"
},
{
"role": "assistant",
"content": "SELECT \"division\" FROM \"table_key\" WHERE \"finish\"='5th' AND \"losses\"='87';"
}
] |
[
{
"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 \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: where was the game site when the opponent was san diego chargers?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"schedule\" WHERE \"opponent\"='san diego chargers';"
}
] |
[
{
"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 \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: who was the opponent when the week was 9?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"='9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What venue features geelong as the away side?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_16\" WHERE \"away_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What venue features essendon at home?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_16\" WHERE \"home_team\"='essendon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the home team score at princes park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_16\" WHERE \"venue\"='princes park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What home team scored 10.24 (84) at vfl park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_16\" WHERE \"venue\"='vfl park' AND \"home_team_score\"='10.24 (84)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"ceremony\" text,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"outcome\" text\n);\n\nQuestion: Who is the nominee for best director?"
},
{
"role": "assistant",
"content": "SELECT \"nominee\" FROM \"awards\" WHERE \"category\"='best director';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"ceremony\" text,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"outcome\" text\n);\n\nQuestion: What ceremony was leela chitnis nominated at?"
},
{
"role": "assistant",
"content": "SELECT \"ceremony\" FROM \"awards\" WHERE \"outcome\"='nominated' AND \"nominee\"='leela chitnis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_five\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: what is the highest pick number of the CFL team, the winnipeg blue bombers?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick_num\") FROM \"round_five\" WHERE \"cfl_team\"='winnipeg blue bombers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_five\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which college has 41 picks?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"round_five\" WHERE \"pick_num\"=41;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_five\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which player plays for the college of manitoba?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_five\" WHERE \"college\"='manitoba';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pidgin_delaware_numbers_from_one_to_ten\" (\n \"munsee_delaware\" text,\n \"unami_delaware\" text,\n \"de_laet_1633\" text,\n \"campanius_ca_1645\" text,\n \"interpreter_1684\" text,\n \"thomas_1698\" text\n);\n\nQuestion: What is the Unami Delaware value for a Thomas value of nacha?"
},
{
"role": "assistant",
"content": "SELECT \"unami_delaware\" FROM \"pidgin_delaware_numbers_from_one_to_ten\" WHERE \"thomas_1698\"='nacha';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pidgin_delaware_numbers_from_one_to_ten\" (\n \"munsee_delaware\" text,\n \"unami_delaware\" text,\n \"de_laet_1633\" text,\n \"campanius_ca_1645\" text,\n \"interpreter_1684\" text,\n \"thomas_1698\" text\n);\n\nQuestion: What is the Interpreter value for an Unami Delaware value of pal\u00e9\u00b7naxk?"
},
{
"role": "assistant",
"content": "SELECT \"interpreter_1684\" FROM \"pidgin_delaware_numbers_from_one_to_ten\" WHERE \"unami_delaware\"='pal\u00e9\u00b7naxk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pidgin_delaware_numbers_from_one_to_ten\" (\n \"munsee_delaware\" text,\n \"unami_delaware\" text,\n \"de_laet_1633\" text,\n \"campanius_ca_1645\" text,\n \"interpreter_1684\" text,\n \"thomas_1698\" text\n);\n\nQuestion: What is the Munsee Delaware value for an Interpreter value of palenah?"
},
{
"role": "assistant",
"content": "SELECT \"munsee_delaware\" FROM \"pidgin_delaware_numbers_from_one_to_ten\" WHERE \"interpreter_1684\"='palenah';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pidgin_delaware_numbers_from_one_to_ten\" (\n \"munsee_delaware\" text,\n \"unami_delaware\" text,\n \"de_laet_1633\" text,\n \"campanius_ca_1645\" text,\n \"interpreter_1684\" text,\n \"thomas_1698\" text\n);\n\nQuestion: What is the Campanius term for an Unami Delaware term of pal\u00e9\u00b7naxk?"
},
{
"role": "assistant",
"content": "SELECT \"campanius_ca_1645\" FROM \"pidgin_delaware_numbers_from_one_to_ten\" WHERE \"unami_delaware\"='pal\u00e9\u00b7naxk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pidgin_delaware_numbers_from_one_to_ten\" (\n \"munsee_delaware\" text,\n \"unami_delaware\" text,\n \"de_laet_1633\" text,\n \"campanius_ca_1645\" text,\n \"interpreter_1684\" text,\n \"thomas_1698\" text\n);\n\nQuestion: What is the Interpreter term for a Munsee Delaware term of (n)x\u00e1\u00b7\u0161?"
},
{
"role": "assistant",
"content": "SELECT \"interpreter_1684\" FROM \"pidgin_delaware_numbers_from_one_to_ten\" WHERE \"munsee_delaware\"='(n)x\u00e1\u00b7\u0161';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pidgin_delaware_numbers_from_one_to_ten\" (\n \"munsee_delaware\" text,\n \"unami_delaware\" text,\n \"de_laet_1633\" text,\n \"campanius_ca_1645\" text,\n \"interpreter_1684\" text,\n \"thomas_1698\" text\n);\n\nQuestion: What is the De Laet term for a Munsee Delaware term of n\u00ed\u00b7\u0161a?"
},
{
"role": "assistant",
"content": "SELECT \"de_laet_1633\" FROM \"pidgin_delaware_numbers_from_one_to_ten\" WHERE \"munsee_delaware\"='n\u00ed\u00b7\u0161a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1993_draft_picks\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What is the name of the player picked before round 2?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"1993_draft_picks\" WHERE \"round\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1993_draft_picks\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What is the name of the player with an overall less than 209 for the Victoriaville tigres (qmjhl), and a Round of 1?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"1993_draft_picks\" WHERE \"overall\"<209 AND \"club_team\"='victoriaville tigres (qmjhl)' AND \"round\"=1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1993_draft_picks\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What is the name of the player with an Overall larger than 227?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"1993_draft_picks\" WHERE \"overall\">227;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1993_draft_picks\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What is the highest overall for a round larger than 8 for pavol demitra?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"overall\") FROM \"1993_draft_picks\" WHERE \"round\">8 AND \"player\"='pavol demitra';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heritage_diesels\" (\n \"number_name\" text,\n \"description\" text,\n \"current_status\" text,\n \"livery\" text,\n \"date\" real\n);\n\nQuestion: What description does Livery of ews have?"
},
{
"role": "assistant",
"content": "SELECT \"description\" FROM \"heritage_diesels\" WHERE \"livery\"='ews';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"p_premiers_r_runner_ups_m_minor_premiers\" (\n \"competition\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"position\" text,\n \"coach\" text,\n \"captain\" text,\n \"main_article\" text\n);\n\nQuestion: What Position has a Super League 1 Competition?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"p_premiers_r_runner_ups_m_minor_premiers\" WHERE \"competition\"='super league 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"p_premiers_r_runner_ups_m_minor_premiers\" (\n \"competition\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"position\" text,\n \"coach\" text,\n \"captain\" text,\n \"main_article\" text\n);\n\nQuestion: What Competition in Main Article of Bradford Bulls 1997 have Robbie Paul as Captain with less than 5 Lost?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"p_premiers_r_runner_ups_m_minor_premiers\" WHERE \"captain\"='robbie paul' AND \"lost\"<5 AND \"main_article\"='bradford bulls 1997';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"p_premiers_r_runner_ups_m_minor_premiers\" (\n \"competition\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"position\" text,\n \"coach\" text,\n \"captain\" text,\n \"main_article\" text\n);\n\nQuestion: What Captain has Lost 13?"
},
{
"role": "assistant",
"content": "SELECT \"captain\" FROM \"p_premiers_r_runner_ups_m_minor_premiers\" WHERE \"lost\"=13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"p_premiers_r_runner_ups_m_minor_premiers\" (\n \"competition\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"position\" text,\n \"coach\" text,\n \"captain\" text,\n \"main_article\" text\n);\n\nQuestion: How many Drawn did Coach Francis Cummins have with less than 4 Lost?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"drawn\") FROM \"p_premiers_r_runner_ups_m_minor_premiers\" WHERE \"lost\"<4 AND \"coach\"='francis cummins';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"b\" (\n \"rider\" text,\n \"horse\" text,\n \"faults\" text,\n \"round_1_2_a_2_b_3_a_points\" text,\n \"total\" real\n);\n\nQuestion: What horse did not start and had a total of over 16.16?"
},
{
"role": "assistant",
"content": "SELECT \"horse\" FROM \"b\" WHERE \"faults\"='did not start' AND \"total\">16.16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"b\" (\n \"rider\" text,\n \"horse\" text,\n \"faults\" text,\n \"round_1_2_a_2_b_3_a_points\" text,\n \"total\" real\n);\n\nQuestion: What was the total for christina liebherr?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"b\" WHERE \"rider\"='christina liebherr';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"demographics\" (\n \"year\" text,\n \"population\" text,\n \"romanians\" text,\n \"hungarians\" text,\n \"germans\" text\n);\n\nQuestion: What is the population of the year featuring an 87.5% German population?"
},
{
"role": "assistant",
"content": "SELECT \"population\" FROM \"demographics\" WHERE \"germans\"='87.5%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1987_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: How tall is the player from Chicago, IL?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"1987_boys_team\" WHERE \"hometown\"='chicago, il';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1987_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What college does Dennis Scott attend?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"1987_boys_team\" WHERE \"player\"='dennis scott';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1987_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: Who's from Bay City, TX?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"1987_boys_team\" WHERE \"hometown\"='bay city, tx';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1987_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: Which NBA Draft had Labradford Smith?"
},
{
"role": "assistant",
"content": "SELECT \"nba_draft\" FROM \"1987_boys_team\" WHERE \"player\"='labradford smith';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the lowest attendance at Windy Hill?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_2\" 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_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the home team's score at Princes Park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_2\" WHERE \"venue\"='princes park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How much did the home team Geelong score?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_2\" WHERE \"home_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the name of the home team that played Carlton?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_2\" WHERE \"away_team\"='carlton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"steam_locomotives\" (\n \"name_number\" text,\n \"builder\" text,\n \"type\" text,\n \"status\" text,\n \"notes\" text\n);\n\nQuestion: Name the status with builder of orenstein and koppel"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"steam_locomotives\" WHERE \"builder\"='orenstein and koppel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"steam_locomotives\" (\n \"name_number\" text,\n \"builder\" text,\n \"type\" text,\n \"status\" text,\n \"notes\" text\n);\n\nQuestion: Who was the builder for joffre"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"steam_locomotives\" WHERE \"name_number\"='joffre';"
}
] |
[
{
"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: Where did Carlton play as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_11\" WHERE \"home_team\"='carlton';"
}
] |
[
{
"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: Who was the away team when the home team scored 12.13 (85)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_11\" WHERE \"home_team_score\"='12.13 (85)';"
}
] |
[
{
"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: Where was the game held when the home team scored 18.17 (125)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_11\" WHERE \"home_team_score\"='18.17 (125)';"
}
] |
[
{
"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: Who was the home team when Melbourne was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_11\" WHERE \"away_team\"='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 was the away team's score at the game played at Lake Oval that had a crowd of over 15,000?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_11\" WHERE \"crowd\">'15,000' AND \"venue\"='lake oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" 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 on November 20, 1988?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='november 20, 1988';"
}
] |
[
{
"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 week 5?"
},
{
"role": "assistant",
"content": "SELECT \"kickoff_a\" FROM \"schedule\" WHERE \"week\"='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: Where was the game that had an attendance of 39,889?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"schedule\" WHERE \"attendance\"='39,889';"
}
] |
[
{
"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 record when the attendance was 43,502?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule\" WHERE \"attendance\"='43,502';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What label released a CD in 1988?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"date\"='1988' AND \"format\"='cd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: On what date did the United Kingdom have a catalog of FT 507?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"region\"='united kingdom' AND \"catalog\"='ft 507';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: On what date was the Catalog FT 507?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalog\"='ft 507';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Which label had a catalog of 54513 in 1988?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"date\"='1988' AND \"catalog\"='54513';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: On what date did Fantasy Records release a CD format of catalog FCD-4513-2?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"label\"='fantasy records' AND \"format\"='cd' AND \"catalog\"='fcd-4513-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What was John Watson's total laps with a grid of less than 7?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"classification\" WHERE \"driver\"='john watson' AND \"grid\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many laps were there with #9 grid?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"classification\" WHERE \"grid\"=9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What was the time/retired with laps less than 33 and a grid of 14?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"laps\"<33 AND \"grid\"=14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What was John Watson's time/retired?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"driver\"='john watson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"n\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: What is the player with the no. 14?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"n\" WHERE \"no_s\"='14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"n\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: What is the height of the player from Benetton Treviso, Italy?"
},
{
"role": "assistant",
"content": "SELECT \"height_in_ft\" FROM \"n\" WHERE \"school_club_team_country\"='benetton treviso, italy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_points_in_a_match\" (\n \"player\" text,\n \"tries\" text,\n \"conv\" text,\n \"pens\" text,\n \"drop\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: I want to know the pens with conv of 6"
},
{
"role": "assistant",
"content": "SELECT \"pens\" FROM \"most_points_in_a_match\" WHERE \"conv\"='6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_points_in_a_match\" (\n \"player\" text,\n \"tries\" text,\n \"conv\" text,\n \"pens\" text,\n \"drop\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Which player has 2 tries and 0 drops?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"most_points_in_a_match\" WHERE \"drop\"='0' AND \"tries\"='2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_points_in_a_match\" (\n \"player\" text,\n \"tries\" text,\n \"conv\" text,\n \"pens\" text,\n \"drop\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Which pens has 1 tries and matt alexander as a player with conv of 4?"
},
{
"role": "assistant",
"content": "SELECT \"pens\" FROM \"most_points_in_a_match\" WHERE \"tries\"='1' AND \"player\"='matt alexander' AND \"conv\"='4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_points_in_a_match\" (\n \"player\" text,\n \"tries\" text,\n \"conv\" text,\n \"pens\" text,\n \"drop\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Name the venue that has conv of 5 players on 20 points"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"most_points_in_a_match\" WHERE \"conv\"='5 players on 20 points';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"coaches\" (\n \"name\" text,\n \"period\" text,\n \"matches\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real\n);\n\nQuestion: What are the names of those who made less than 3 wins in 15 matches?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"coaches\" WHERE \"wins\"<3 AND \"matches\"<15;"
}
] |
[
{
"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 \"record\" text\n);\n\nQuestion: What is the highest amount of points when the game is less than 2?"
},
{
"role": "assistant",
"content": "SELECT \"high_points\" FROM \"playoffs\" WHERE \"game\"<2;"
}
] |
[
{
"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 \"record\" text\n);\n\nQuestion: What was the score on April 20?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"playoffs\" WHERE \"date\"='april 20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_6\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Name the surface on june 11, 1995"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_6\" WHERE \"date\"='june 11, 1995';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_6\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Name the score for september 12, 1993"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_6\" WHERE \"date\"='september 12, 1993';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_6\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Name the surface for score of 7\u20136(4), 6\u20131"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_6\" WHERE \"score\"='7\u20136(4), 6\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_6\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Name the date that had a score of 7\u20136(4), 6\u20131"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_6\" WHERE \"score\"='7\u20136(4), 6\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"longest_winning_streak\" (\n \"year\" real,\n \"competition\" text,\n \"date\" text,\n \"location\" text,\n \"score\" text,\n \"result\" text\n);\n\nQuestion: what is the result for the world group, semifinals after the year 1997?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"longest_winning_streak\" WHERE \"year\">1997 AND \"competition\"='world group, semifinals';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\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 home team played against south Melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_10\" WHERE \"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_10\" (\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 average crowd size for the home team essendon?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_10\" WHERE \"home_team\"='essendon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the home team score when north Melbourne was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_10\" WHERE \"away_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the average grid with brm and under 63 laps?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"grid\") FROM \"classification\" WHERE \"constructor\"='brm' AND \"laps\"<63;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"race\" text,\n \"length\" text,\n \"class\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: On what circuit is there a class gts-2 race that takes place on May 27?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"schedule\" WHERE \"date\"='may 27' AND \"class\"='gts-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"race\" text,\n \"length\" text,\n \"class\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: On what circuit is there a race that lasts 2 hours?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"schedule\" WHERE \"length\"='2 hours';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"race\" text,\n \"length\" text,\n \"class\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: What class is the dodge dealers grand prix?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"schedule\" WHERE \"race\"='the dodge dealers grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"race\" text,\n \"length\" text,\n \"class\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: What is the length of the First Union six hours at the Glen?"
},
{
"role": "assistant",
"content": "SELECT \"length\" FROM \"schedule\" WHERE \"race\"='first union six hours at the glen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"race\" text,\n \"length\" text,\n \"class\" text,\n \"circuit\" text,\n \"date\" text\n);\n\nQuestion: What is the class of the race that takes place on August 25?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"schedule\" WHERE \"date\"='august 25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score when Montreal was home?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"november\" WHERE \"home\"='montreal';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"challenge_cup\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: On 9/3/97, what was the score that resulted in a w?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"challenge_cup\" WHERE \"result\"='w' AND \"date\"='9/3/97';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"devonport_takapuna_local_board\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Who has a roll value of 422?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"devonport_takapuna_local_board\" WHERE \"roll\"=422;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"devonport_takapuna_local_board\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: In what area is the decile value 10?"
},
{
"role": "assistant",
"content": "SELECT \"area\" FROM \"devonport_takapuna_local_board\" WHERE \"decile\"=10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"devonport_takapuna_local_board\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the highest decile value with a roll greater than 301 in Hauraki?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"decile\") FROM \"devonport_takapuna_local_board\" WHERE \"roll\">301 AND \"area\"='hauraki';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Which Points classification has a Trofeo Fast Team of metauro mobili-pinarello, and a Stage of 6?"
},
{
"role": "assistant",
"content": "SELECT \"points_classification\" FROM \"classification_leadership_by_stage\" WHERE \"trofeo_fast_team\"='metauro mobili-pinarello' AND \"stage\"='6';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.