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 \"sunderland_a_f_c_goals\" (\n \"date\" text,\n \"venue\" text,\n \"opposition\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: What is the date of the game with a score of 4-3?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"sunderland_a_f_c_goals\" WHERE \"score\"='4-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sunderland_a_f_c_goals\" (\n \"date\" text,\n \"venue\" text,\n \"opposition\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: What is the score of the game on 8 Sep 1990?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"sunderland_a_f_c_goals\" WHERE \"date\"='8 sep 1990';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sunderland_a_f_c_goals\" (\n \"date\" text,\n \"venue\" text,\n \"opposition\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: Who is the opposition on the division 1 game at Stamford Bridge?"
},
{
"role": "assistant",
"content": "SELECT \"opposition\" FROM \"sunderland_a_f_c_goals\" WHERE \"competition\"='division 1' AND \"venue\"='stamford bridge';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which rank has a total less than 9, less than 2 bronze, and from France?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"medals_table\" WHERE \"total\"<9 AND \"bronze\"<2 AND \"nation\"='france';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which rank has more than 1 silver, more than 1 gold, and more than 4 bronze?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"medals_table\" WHERE \"silver\">1 AND \"gold\">1 AND \"bronze\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many silver have a Total smaller than 3, a Bronze of 1, and a Gold larger than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"silver\") FROM \"medals_table\" WHERE \"total\"<3 AND \"bronze\"=1 AND \"gold\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many gold have a National of New Zealand with a total less than 2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"gold\") FROM \"medals_table\" WHERE \"nation\"='new zealand' AND \"total\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_since_2000\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: Who won in 2003?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"winners_since_2000\" WHERE \"year\"=2003;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_since_2000\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: What is the average year for scatman winning?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"winners_since_2000\" WHERE \"winner\"='scatman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_since_2000\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: Who trained the horse with time of 1:09.40?"
},
{
"role": "assistant",
"content": "SELECT \"trainer\" FROM \"winners_since_2000\" WHERE \"time\"='1:09.40';"
}
] |
[
{
"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: Where was the mediterranean games held?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"tournament\"='mediterranean games';"
}
] |
[
{
"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: When was the last time a venue was held in turin, italy?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"achievements\" WHERE \"venue\"='turin, italy';"
}
] |
[
{
"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: Where was the universiade held in 1959?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"tournament\"='universiade' AND \"year\"=1959;"
}
] |
[
{
"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: How many year was the venue in stockholm, sweden used?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"achievements\" WHERE \"venue\"='stockholm, sweden';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_year\" (\n \"year\" real,\n \"driver\" text,\n \"constructor\" text,\n \"location\" text,\n \"report\" text\n);\n\nQuestion: What is a report for a race with Baconin Borzacchini in Tripoli in a year after 1928?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"by_year\" WHERE \"location\"='tripoli' AND \"year\">1928 AND \"driver\"='baconin borzacchini';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_year\" (\n \"year\" real,\n \"driver\" text,\n \"constructor\" text,\n \"location\" text,\n \"report\" text\n);\n\nQuestion: What was the constructor of the car that Achille Varzi drove before 1937?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"by_year\" WHERE \"year\"<1937 AND \"driver\"='achille varzi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_year\" (\n \"year\" real,\n \"driver\" text,\n \"constructor\" text,\n \"location\" text,\n \"report\" text\n);\n\nQuestion: What was the constructor of the car that Hermann Lang drove after 1935?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"by_year\" WHERE \"year\">1935 AND \"driver\"='hermann lang';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" text,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" text\n);\n\nQuestion: What is the Works Number that has a Number of 153 in 1916?"
},
{
"role": "assistant",
"content": "SELECT \"works_number\" FROM \"locomotives\" WHERE \"date\"='1916' AND \"number\"='153';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" text,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" text\n);\n\nQuestion: On what Date was the Works Number 7?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"locomotives\" WHERE \"works_number\"='7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" text,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" text\n);\n\nQuestion: Which Builder has a Works Number of 16272?"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"locomotives\" WHERE \"works_number\"='16272';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" text,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" text\n);\n\nQuestion: On what Date was the Works Number 12?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"locomotives\" WHERE \"works_number\"='12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_3\" (\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 South Melbourne play as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_3\" WHERE \"home_team\"='south melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_3\" (\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 St Kilda played as the home team?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_3\" WHERE \"home_team\"='st kilda';"
}
] |
[
{
"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\" text\n);\n\nQuestion: Which driver had a grid number of 18?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\"='18';"
}
] |
[
{
"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\" text\n);\n\nQuestion: Which constructor had Shinji Nakano as a driver?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"driver\"='shinji nakano';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many people were in attendance when the home team scored 7.11 (53)?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_5\" WHERE \"home_team_score\"='7.11 (53)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\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: Which away team scored 11.10 (76)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_5\" WHERE \"away_team_score\"='11.10 (76)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\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 score at Glenferrie Oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_5\" WHERE \"venue\"='glenferrie oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"walking\" (\n \"event\" text,\n \"data\" text,\n \"athlete\" text,\n \"date\" text,\n \"place\" text\n);\n\nQuestion: What date has a Data of 19:29?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"walking\" WHERE \"data\"='19:29';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"walking\" (\n \"event\" text,\n \"data\" text,\n \"athlete\" text,\n \"date\" text,\n \"place\" text\n);\n\nQuestion: Which athlete has a 35 km event?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"walking\" WHERE \"event\"='35 km';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_classification\" (\n \"cyclist\" text,\n \"nation\" text,\n \"team\" text,\n \"time\" text,\n \"uci_pro_tour_points\" real\n);\n\nQuestion: What nation is the cyclist from team discovery channel?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"general_classification\" WHERE \"team\"='discovery channel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_classification\" (\n \"cyclist\" text,\n \"nation\" text,\n \"team\" text,\n \"time\" text,\n \"uci_pro_tour_points\" real\n);\n\nQuestion: What nation is the cyclist hat has a UCI ProTour Points of 25?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"general_classification\" WHERE \"uci_pro_tour_points\"=25;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\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 Punt Road Oval?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_6\" WHERE \"venue\"='punt road oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\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 teams score at Western Oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_6\" WHERE \"venue\"='western oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"purse\" real,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" real\n);\n\nQuestion: What is the first prize amount of the person who has a score of 207 (-9) and a purse amount of more than 800,000?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"1st_prize\") FROM \"tournament_results\" WHERE \"score\"='207 (-9)' AND \"purse\">'800,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"collected_editions\" (\n \"title\" text,\n \"pages\" text,\n \"first_edition\" text,\n \"second_edition\" text,\n \"isbn\" text\n);\n\nQuestion: What is the ISBN of the book with a first edition in May 2011?"
},
{
"role": "assistant",
"content": "SELECT \"isbn\" FROM \"collected_editions\" WHERE \"first_edition\"='may 2011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"collected_editions\" (\n \"title\" text,\n \"pages\" text,\n \"first_edition\" text,\n \"second_edition\" text,\n \"isbn\" text\n);\n\nQuestion: Which first edition has an ISBN of 978-0785166252?"
},
{
"role": "assistant",
"content": "SELECT \"first_edition\" FROM \"collected_editions\" WHERE \"isbn\"='978-0785166252';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"collected_editions\" (\n \"title\" text,\n \"pages\" text,\n \"first_edition\" text,\n \"second_edition\" text,\n \"isbn\" text\n);\n\nQuestion: Which first edition has 264 pages and the ISBN of 978-0785111832?"
},
{
"role": "assistant",
"content": "SELECT \"first_edition\" FROM \"collected_editions\" WHERE \"pages\"='264' AND \"isbn\"='978-0785111832';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many people were in the crowd when the home team scored 10.17 (77)?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_6\" WHERE \"home_team_score\"='10.17 (77)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\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 had a score of 6.9 (45)"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_6\" WHERE \"home_team_score\"='6.9 (45)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many people were in the crowd at collingwood's home game?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_6\" 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_6\" (\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 away team have a score of 11.10 (76)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_6\" WHERE \"away_team_score\"='11.10 (76)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which away team played against the home team that scored 8.8 (56)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_13\" WHERE \"away_team_score\"='8.8 (56)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the away team score when playing against fitzroy?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_13\" WHERE \"home_team\"='fitzroy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where did the away team play when they scored 12.13 (85)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_13\" WHERE \"away_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 \"production_overview\" (\n \"pilot_car_no\" real,\n \"colour\" text,\n \"serial_no\" text,\n \"engine_no\" real,\n \"registration_no\" text\n);\n\nQuestion: What is the serial number of the pilot car that is black, has a pilot car number larger than 2, and an engine number of 1008?"
},
{
"role": "assistant",
"content": "SELECT \"serial_no\" FROM \"production_overview\" WHERE \"colour\"='black' AND \"pilot_car_no\">2 AND \"engine_no\"=1008;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When the Away team had a score of 14.11 (95), what was the team name?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_12\" WHERE \"away_team_score\"='14.11 (95)';"
}
] |
[
{
"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 low lap total that has a Time or Retired of accident?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"classification\" WHERE \"time_retired\"='accident';"
}
] |
[
{
"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 smallest crowd when the away team scored 10.18 (78)?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_16\" WHERE \"away_team_score\"='10.18 (78)';"
}
] |
[
{
"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 date was the crowd larger than 16,000 people and the away team scored 8.11 (59)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_16\" WHERE \"crowd\">'16,000' AND \"away_team_score\"='8.11 (59)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the venue when the Home team scored 18.9 (117)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_16\" WHERE \"home_team_score\"='18.9 (117)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_rugby_world_cup_squads\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: Which player was a fly-half?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"2007_rugby_world_cup_squads\" WHERE \"position\"='fly-half';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_rugby_world_cup_squads\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: What is the mean number of caps for Ryota Asano?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"caps\") FROM \"2007_rugby_world_cup_squads\" WHERE \"player\"='ryota asano';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_rugby_world_cup_squads\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: What is the mean number of caps for Ryota Asano?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"caps\") FROM \"2007_rugby_world_cup_squads\" WHERE \"player\"='ryota asano';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"j\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: Who is the forward from Grambling State?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"j\" WHERE \"position\"='forward' AND \"school_club_team\"='grambling state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"j\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the nationality of the guard who plays at Utah?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"j\" WHERE \"position\"='guard' AND \"school_club_team\"='utah';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"j\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the position of the player from Tampa?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"j\" WHERE \"school_club_team\"='tampa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"j\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the nationality of the player on the Jazz from 1974-79?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"j\" WHERE \"years_for_jazz\"='1974-79';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"j\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: Who is the player who went to school at Tampa?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"j\" WHERE \"school_club_team\"='tampa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"j\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the nationality of the player on the Jazz from 1974-79?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"j\" WHERE \"years_for_jazz\"='1974-79';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\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 size of the crowd when an away team had a score of 9.9 (63)?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_9\" WHERE \"away_team_score\"='9.9 (63)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\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 that had a score of 4.13 (37)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_9\" WHERE \"away_team_score\"='4.13 (37)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\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 score of the away team at the the glenferrie oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_9\" WHERE \"venue\"='glenferrie oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"inactive_chapters\" (\n \"name\" text,\n \"founded\" real,\n \"institution\" text,\n \"location\" text,\n \"status\" text\n);\n\nQuestion: What institution is located in athens, ga, us?"
},
{
"role": "assistant",
"content": "SELECT \"institution\" FROM \"inactive_chapters\" WHERE \"location\"='athens, ga, us';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"inactive_chapters\" (\n \"name\" text,\n \"founded\" real,\n \"institution\" text,\n \"location\" text,\n \"status\" text\n);\n\nQuestion: What is the status of the institution that was founded in 1996?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"inactive_chapters\" WHERE \"founded\"=1996;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_individual_score\" (\n \"runs\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: During runs 332, what was the venue?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"highest_individual_score\" WHERE \"runs\"='332';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_individual_score\" (\n \"runs\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Which player's runs are 270?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"highest_individual_score\" WHERE \"runs\"='270';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_individual_score\" (\n \"runs\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: During season 1935, what was the venue?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"highest_individual_score\" WHERE \"season\"='1935';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_individual_score\" (\n \"runs\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: For player Les Ames, what was the venue?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"highest_individual_score\" WHERE \"player\"='les ames';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"grand_prix\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: When was the Austrian Grand Prix?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"season_review\" WHERE \"grand_prix\"='austrian grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"melodi_grand_prix_1999_27_february_1999\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" real\n);\n\nQuestion: How many points has a draw greater than 3 and 3rd place?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"melodi_grand_prix_1999_27_february_1999\" WHERE \"draw\">3 AND \"place\"=3;"
}
] |
[
{
"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 \"events\" real,\n \"wins\" real\n);\n\nQuestion: Name the average events for miller barber"
},
{
"role": "assistant",
"content": "SELECT AVG(\"events\") FROM \"leaders\" WHERE \"player\"='miller barber';"
}
] |
[
{
"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 \"events\" real,\n \"wins\" real\n);\n\nQuestion: Name the most wins for earnings of 130,002"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"leaders\" WHERE \"earnings\"='130,002';"
}
] |
[
{
"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 \"events\" real,\n \"wins\" real\n);\n\nQuestion: Name the average wins for earnings more than 120,367 and events less than 13"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"leaders\" WHERE \"earnings\">'120,367' AND \"events\"<13;"
}
] |
[
{
"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 \"events\" real,\n \"wins\" real\n);\n\nQuestion: Name the average rank for earnings less than 231,008 and wins less than 1"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"leaders\" WHERE \"earnings\"<'231,008' AND \"wins\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"releases\" (\n \"release_title\" text,\n \"released_as\" text,\n \"release_type\" text,\n \"label\" text,\n \"year\" text\n);\n\nQuestion: What year was Neverchanger with the label of Latenight weeknight?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"releases\" WHERE \"label\"='latenight weeknight' AND \"release_title\"='neverchanger';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"releases\" (\n \"release_title\" text,\n \"released_as\" text,\n \"release_type\" text,\n \"label\" text,\n \"year\" text\n);\n\nQuestion: What year was Ethereal 77, which has a CD album release type?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"releases\" WHERE \"release_type\"='cd album' AND \"released_as\"='ethereal 77';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"services\" (\n \"platform\" real,\n \"frequency_per_hour\" real,\n \"destination\" text,\n \"operator\" text,\n \"line\" text\n);\n\nQuestion: what is the platform when the frequency (per hour) is 4 and the destination is west croydon?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"platform\") FROM \"services\" WHERE \"frequency_per_hour\"=4 AND \"destination\"='west croydon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"services\" (\n \"platform\" real,\n \"frequency_per_hour\" real,\n \"destination\" text,\n \"operator\" text,\n \"line\" text\n);\n\nQuestion: what is the highest platform number when the frequency (per hour) is 4, the operator is london overground and the destination is west croydon?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"platform\") FROM \"services\" WHERE \"frequency_per_hour\"=4 AND \"operator\"='london overground' AND \"destination\"='west croydon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What is the name of the team with a qual 1 time of 1:17.481?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"qualifying_results\" WHERE \"qual_1\"='1:17.481';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What is the qual 1 for the best of 1:18.067?"
},
{
"role": "assistant",
"content": "SELECT \"qual_1\" FROM \"qualifying_results\" WHERE \"best\"='1:18.067';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What is the qual 1 when the qual 2 has no time and the best is 1:16.776?"
},
{
"role": "assistant",
"content": "SELECT \"qual_1\" FROM \"qualifying_results\" WHERE \"qual_2\"='no time' AND \"best\"='1:16.776';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What person on team Minardi Team USA with a qual of 1:17.481?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"qualifying_results\" WHERE \"team\"='minardi team usa' AND \"qual_1\"='1:17.481';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What is the name of the person with a qual 1 time of 1:16.850?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"qualifying_results\" WHERE \"qual_1\"='1:16.850';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What is the qual 2 when the qual 1 is 1:16.841?"
},
{
"role": "assistant",
"content": "SELECT \"qual_2\" FROM \"qualifying_results\" WHERE \"qual_1\"='1:16.841';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1066_to_1135\" (\n \"heir\" text,\n \"status\" text,\n \"relationship_to_monarch\" text,\n \"became_heir\" text,\n \"reason\" text,\n \"ceased_to_be_heir\" text,\n \"monarch\" text\n);\n\nQuestion: Who is the Monarch whose Heir is Robert Curthose when the Reason is that the father became king?"
},
{
"role": "assistant",
"content": "SELECT \"monarch\" FROM \"1066_to_1135\" WHERE \"heir\"='robert curthose' AND \"reason\"='father became king';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1066_to_1135\" (\n \"heir\" text,\n \"status\" text,\n \"relationship_to_monarch\" text,\n \"became_heir\" text,\n \"reason\" text,\n \"ceased_to_be_heir\" text,\n \"monarch\" text\n);\n\nQuestion: Which Monarch has succession unclear 1100-1103 as his Status?"
},
{
"role": "assistant",
"content": "SELECT \"monarch\" FROM \"1066_to_1135\" WHERE \"status\"='succession unclear 1100-1103';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1066_to_1135\" (\n \"heir\" text,\n \"status\" text,\n \"relationship_to_monarch\" text,\n \"became_heir\" text,\n \"reason\" text,\n \"ceased_to_be_heir\" text,\n \"monarch\" text\n);\n\nQuestion: Which Reason is given when 1103 is the date for Became heir?"
},
{
"role": "assistant",
"content": "SELECT \"reason\" FROM \"1066_to_1135\" WHERE \"became_heir\"='1103';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1066_to_1135\" (\n \"heir\" text,\n \"status\" text,\n \"relationship_to_monarch\" text,\n \"became_heir\" text,\n \"reason\" text,\n \"ceased_to_be_heir\" text,\n \"monarch\" text\n);\n\nQuestion: What is the Status when Henry I is the Monarch and the Reason is succession unclear 1100-1103?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"1066_to_1135\" WHERE \"monarch\"='henry i' AND \"reason\"='succession unclear 1100-1103';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Name the tyre for hb bewaking team ensign with rounds of 13"
},
{
"role": "assistant",
"content": "SELECT \"tyre\" FROM \"drivers_and_constructors\" WHERE \"entrant\"='hb bewaking team ensign' AND \"rounds\"='13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Name the round for engine of ford cosworth dfv 3.0 v8 with chassis fo 751"
},
{
"role": "assistant",
"content": "SELECT \"rounds\" FROM \"drivers_and_constructors\" WHERE \"engine\"='ford cosworth dfv 3.0 v8' AND \"chassis\"='751';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Name the chassis for tyre of g and carlos reutemann"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"drivers_and_constructors\" WHERE \"tyre\"='g' AND \"driver\"='carlos reutemann';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Name the entrant for chassis of gh1"
},
{
"role": "assistant",
"content": "SELECT \"entrant\" FROM \"drivers_and_constructors\" WHERE \"chassis\"='gh1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Name the rounds for stanley brm"
},
{
"role": "assistant",
"content": "SELECT \"rounds\" FROM \"drivers_and_constructors\" WHERE \"entrant\"='stanley brm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"key\" (\n \"nationality\" text,\n \"position\" text,\n \"tottenham_hotspur_career\" text,\n \"club_apps\" text,\n \"goals\" text\n);\n\nQuestion: What were the years of the Tottenham Hotspur career for the player with 10 goals, from England, played the df position, and had 118 club apps?"
},
{
"role": "assistant",
"content": "SELECT \"tottenham_hotspur_career\" FROM \"key\" WHERE \"goals\"='10' AND \"nationality\"='england' AND \"position\"='df' AND \"club_apps\"='118';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"key\" (\n \"nationality\" text,\n \"position\" text,\n \"tottenham_hotspur_career\" text,\n \"club_apps\" text,\n \"goals\" text\n);\n\nQuestion: What is the position of the player from England with 62 goals?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"key\" WHERE \"nationality\"='england' AND \"goals\"='62';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"key\" (\n \"nationality\" text,\n \"position\" text,\n \"tottenham_hotspur_career\" text,\n \"club_apps\" text,\n \"goals\" text\n);\n\nQuestion: How many goals did the player from England who played the position of mf and had 170 club apps had?"
},
{
"role": "assistant",
"content": "SELECT \"goals\" FROM \"key\" WHERE \"nationality\"='england' AND \"position\"='mf' AND \"club_apps\"='170';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"key\" (\n \"nationality\" text,\n \"position\" text,\n \"tottenham_hotspur_career\" text,\n \"club_apps\" text,\n \"goals\" text\n);\n\nQuestion: How many goals did the player with 229 club apps have?"
},
{
"role": "assistant",
"content": "SELECT \"goals\" FROM \"key\" WHERE \"club_apps\"='229';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_spring_musical\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: For which Award Ceremony was Emilio Pichardo as Bobby Strong nominated?"
},
{
"role": "assistant",
"content": "SELECT \"award_ceremony\" FROM \"the_spring_musical\" WHERE \"nominee\"='emilio pichardo as bobby strong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_spring_musical\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: Who was nominated for best female performer?"
},
{
"role": "assistant",
"content": "SELECT \"nominee\" FROM \"the_spring_musical\" WHERE \"category\"='best female performer';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.