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 \"women\" (\n \"event\" text,\n \"record\" text,\n \"athlete\" text,\n \"nationality\" text,\n \"date\" text\n);\n\nQuestion: On 11 July 2003, which athlete performed?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"women\" WHERE \"date\"='11 july 2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the away team that played luton town?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"fifth_round_proper\" WHERE \"home_team\"='luton town';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_50_o\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: Name the D 45 \u221a when it has D 41\u221a of r 20"
},
{
"role": "assistant",
"content": "SELECT \"d_45\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_41\"='r 20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_50_o\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: Name the D 41 \u221a when it has D 43 \u221a of r 18"
},
{
"role": "assistant",
"content": "SELECT \"d_41\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_43\"='r 18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_50_o\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: Name the D 49 \u221a for when D 46 \u221a of i 1 @"
},
{
"role": "assistant",
"content": "SELECT \"d_49\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_46\"='i 1 @';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_50_o\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: Name the D 43 \u221a when it has D 46 \u221a of d 26"
},
{
"role": "assistant",
"content": "SELECT \"d_43\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_46\"='d 26';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_50_o\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: Name the D 44 \u221a for when it has D 41 \u221a of r 41 +"
},
{
"role": "assistant",
"content": "SELECT \"d_44\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_41\"='r 41 +';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_50_o\" text,\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: Name the D 42 \u221a for when it has D 49 \u221a of r 12"
},
{
"role": "assistant",
"content": "SELECT \"d_42\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_49\"='r 12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: What were the goals in the game with the 26-28 final score?"
},
{
"role": "assistant",
"content": "SELECT \"goals\" FROM \"2000_fixtures_and_results\" WHERE \"score\"='26-28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: What was the score of the game on 19/3/00?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"2000_fixtures_and_results\" WHERE \"date\"='19/3/00';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: Which competition was on 17/9/00?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"2000_fixtures_and_results\" WHERE \"date\"='17/9/00';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: Which competition ended with a score of 58-4?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"2000_fixtures_and_results\" WHERE \"score\"='58-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: Where was the game that had a final score of 30-20?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"2000_fixtures_and_results\" WHERE \"score\"='30-20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: When was the game at the boulevard that ended with an 8-8 score?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2000_fixtures_and_results\" WHERE \"venue\"='the boulevard' AND \"score\"='8-8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Name the report for 6 may"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"other_grands_prix\" WHERE \"date\"='6 may';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Tell me the report with winner of louis wagner"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"other_grands_prix\" WHERE \"winning_driver\"='louis wagner';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Name the report with cuban race"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"other_grands_prix\" WHERE \"name\"='cuban race';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Name the circuit for darracq and name of cuban race"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"other_grands_prix\" WHERE \"winning_constructor\"='darracq' AND \"name\"='cuban race';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_grands_prix\" (\n \"name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Name the winning driver for havana"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"other_grands_prix\" WHERE \"circuit\"='havana';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the listed crowd when the home team's score is 27.13 (175)?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_20\" WHERE \"home_team_score\"='27.13 (175)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the home team's score when st kilda is away?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_20\" WHERE \"away_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: No Decision listed above has a visitor of Montreal."
},
{
"role": "assistant",
"content": "SELECT \"decision\" FROM \"december\" WHERE \"visitor\"='montreal';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"december\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: On December 4, Tampa Bay has a record of 12-13-2."
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"december\" WHERE \"home\"='tampa bay' AND \"date\"='december 4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passengers_carried_in_2010\" (\n \"rank\" real,\n \"airline\" text,\n \"country\" text,\n \"passengers_carried\" real,\n \"remarks\" text,\n \"alliance\" text\n);\n\nQuestion: What are the remarks for the entry ranked greater than 2 with a skyteam (2012) alliance?"
},
{
"role": "assistant",
"content": "SELECT \"remarks\" FROM \"passengers_carried_in_2010\" WHERE \"rank\">2 AND \"alliance\"='skyteam (2012)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passengers_carried_in_2010\" (\n \"rank\" real,\n \"airline\" text,\n \"country\" text,\n \"passengers_carried\" real,\n \"remarks\" text,\n \"alliance\" text\n);\n\nQuestion: How many airlines have the star alliance and are in brazil?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"passengers_carried_in_2010\" WHERE \"alliance\"='star alliance' AND \"country\"='brazil';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"village_german\" text,\n \"village_slovenian\" text,\n \"number_of_people_1991\" real,\n \"percent_of_slovenes_1991\" text,\n \"percent_of_slovenes_1951\" text\n);\n\nQuestion: What was the percentage of Slovenes in 1951 in the village that had 10.1% in 1991?"
},
{
"role": "assistant",
"content": "SELECT \"percent_of_slovenes_1951\" FROM \"references\" WHERE \"percent_of_slovenes_1991\"='10.1%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"village_german\" text,\n \"village_slovenian\" text,\n \"number_of_people_1991\" real,\n \"percent_of_slovenes_1991\" text,\n \"percent_of_slovenes_1951\" text\n);\n\nQuestion: What was Rut's Slovenes percentage in 1991?"
},
{
"role": "assistant",
"content": "SELECT \"percent_of_slovenes_1991\" FROM \"references\" WHERE \"village_slovenian\"='rut';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"reactor_data\" (\n \"unit\" text,\n \"reactor_type\" text,\n \"net_capacity\" text,\n \"gross_capacity\" text,\n \"construction_start\" text,\n \"grid_connection\" text,\n \"commercial_operation\" text,\n \"status\" text\n);\n\nQuestion: What is the status of the Hamaoka-3 unit?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"reactor_data\" WHERE \"unit\"='hamaoka-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"reactor_data\" (\n \"unit\" text,\n \"reactor_type\" text,\n \"net_capacity\" text,\n \"gross_capacity\" text,\n \"construction_start\" text,\n \"grid_connection\" text,\n \"commercial_operation\" text,\n \"status\" text\n);\n\nQuestion: What is the gross capacity of the unit that started commercial operation on August 28, 1987?"
},
{
"role": "assistant",
"content": "SELECT \"gross_capacity\" FROM \"reactor_data\" WHERE \"commercial_operation\"='august 28, 1987';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"reactor_data\" (\n \"unit\" text,\n \"reactor_type\" text,\n \"net_capacity\" text,\n \"gross_capacity\" text,\n \"construction_start\" text,\n \"grid_connection\" text,\n \"commercial_operation\" text,\n \"status\" text\n);\n\nQuestion: When was commercial operation where construction started June 10, 1971?"
},
{
"role": "assistant",
"content": "SELECT \"commercial_operation\" FROM \"reactor_data\" WHERE \"construction_start\"='june 10, 1971';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"reactor_data\" (\n \"unit\" text,\n \"reactor_type\" text,\n \"net_capacity\" text,\n \"gross_capacity\" text,\n \"construction_start\" text,\n \"grid_connection\" text,\n \"commercial_operation\" text,\n \"status\" text\n);\n\nQuestion: What is the gross capacity where the reactor is ABWR type?"
},
{
"role": "assistant",
"content": "SELECT \"gross_capacity\" FROM \"reactor_data\" WHERE \"reactor_type\"='abwr';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"reactor_data\" (\n \"unit\" text,\n \"reactor_type\" text,\n \"net_capacity\" text,\n \"gross_capacity\" text,\n \"construction_start\" text,\n \"grid_connection\" text,\n \"commercial_operation\" text,\n \"status\" text\n);\n\nQuestion: When was the Hamaoka-4 unit commercial operation date?"
},
{
"role": "assistant",
"content": "SELECT \"commercial_operation\" FROM \"reactor_data\" WHERE \"unit\"='hamaoka-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"reactor_data\" (\n \"unit\" text,\n \"reactor_type\" text,\n \"net_capacity\" text,\n \"gross_capacity\" text,\n \"construction_start\" text,\n \"grid_connection\" text,\n \"commercial_operation\" text,\n \"status\" text\n);\n\nQuestion: What is the status of the unit with a net capacity of 1212 MW?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"reactor_data\" WHERE \"net_capacity\"='1212 mw';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_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 school did player Rodney Purvis belong to?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"2012_boys_team\" WHERE \"player\"='rodney purvis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_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 was the NBA draft status for Northeast High School?"
},
{
"role": "assistant",
"content": "SELECT \"nba_draft\" FROM \"2012_boys_team\" WHERE \"school\"='northeast high school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_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 players college was Baylor?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"2012_boys_team\" WHERE \"college\"='baylor';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_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 was the college for Alex Poythress?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"2012_boys_team\" WHERE \"player\"='alex poythress';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_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 is Alex Poythress height?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"2012_boys_team\" WHERE \"player\"='alex poythress';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"champion\" text,\n \"winning_score\" text,\n \"low_amateur\" text,\n \"low_professional\" text\n);\n\nQuestion: What was Allison Fouch score in the year larger than 2000?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"winners\" WHERE \"year\">2000 AND \"champion\"='allison fouch';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"release_format\" text,\n \"country\" text,\n \"label\" text,\n \"cat_no\" text,\n \"release_date\" real\n);\n\nQuestion: How many release dates have a Country of west germany, and a Release format of vinyl?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"release_date\") FROM \"release_history\" WHERE \"country\"='west germany' AND \"release_format\"='vinyl';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"release_format\" text,\n \"country\" text,\n \"label\" text,\n \"cat_no\" text,\n \"release_date\" real\n);\n\nQuestion: Which label is from Spain?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"country\"='spain';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What's the save when the loss was santiago (2\u20132)?"
},
{
"role": "assistant",
"content": "SELECT \"save\" FROM \"game_log\" WHERE \"loss\"='santiago (2\u20132)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season_national_league_records\" (\n \"season\" text,\n \"division\" text,\n \"position\" text,\n \"played\" text,\n \"lost\" text,\n \"points\" text\n);\n\nQuestion: Which season was 2nd position?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"season_by_season_national_league_records\" WHERE \"position\"='2nd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season_national_league_records\" (\n \"season\" text,\n \"division\" text,\n \"position\" text,\n \"played\" text,\n \"lost\" text,\n \"points\" text\n);\n\nQuestion: What's the value for played when the division is nbl div2 with 12th position?"
},
{
"role": "assistant",
"content": "SELECT \"played\" FROM \"season_by_season_national_league_records\" WHERE \"division\"='nbl div2' AND \"position\"='12th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season_national_league_records\" (\n \"season\" text,\n \"division\" text,\n \"position\" text,\n \"played\" text,\n \"lost\" text,\n \"points\" text\n);\n\nQuestion: What's the points when the division is ebl div1 with 22 played?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"season_by_season_national_league_records\" WHERE \"division\"='ebl div1' AND \"played\"='22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season_national_league_records\" (\n \"season\" text,\n \"division\" text,\n \"position\" text,\n \"played\" text,\n \"lost\" text,\n \"points\" text\n);\n\nQuestion: What's the value for played when points is 8 and position is 11th?"
},
{
"role": "assistant",
"content": "SELECT \"played\" FROM \"season_by_season_national_league_records\" WHERE \"position\"='11th' AND \"points\"='8';"
}
] |
[
{
"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: Who was driving with a Grid of 13?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"classification\" WHERE \"grid\"=13;"
}
] |
[
{
"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: For Laps smaller than 6, what does the Grid add up to?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"classification\" WHERE \"laps\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What is the report status of Hockenheimring circuit?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"season_review\" WHERE \"circuit\"='hockenheimring';"
}
] |
[
{
"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 of the race with Clay Regazzoni as the fastest lap and Jackie stewart as the pole position?"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"season_review\" WHERE \"fastest_lap\"='clay regazzoni' AND \"pole_position\"='jackie stewart';"
}
] |
[
{
"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: Which race had Jacky Ickx as the winner and Clay Regazzoni with the fastest lap?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"season_review\" WHERE \"winning_driver\"='jacky ickx' AND \"fastest_lap\"='clay regazzoni';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_world_war\" (\n \"rank_in_military\" text,\n \"name\" text,\n \"born\" real,\n \"killed\" real,\n \"political_party\" text,\n \"mp_s_seat\" text\n);\n\nQuestion: What was the military rank for the person killed in 1918, born after 1865, and has a MP's Seat in Edinburgh South?"
},
{
"role": "assistant",
"content": "SELECT \"rank_in_military\" FROM \"first_world_war\" WHERE \"killed\"=1918 AND \"born\">1865 AND \"mp_s_seat\"='edinburgh south';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How much time does it take for jean alesi and grids lesser than 5?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"grid\"<5 AND \"driver\"='jean alesi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the low grid for gerhard berger for laps over 56?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"race\" WHERE \"driver\"='gerhard berger' AND \"laps\">56;"
}
] |
[
{
"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: If the grid is 13 who is driving?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"classification\" WHERE \"grid\"=13;"
}
] |
[
{
"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 purse total for the royal caribbean golf classic?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"purse\") FROM \"tournament_results\" WHERE \"tournament\"='royal caribbean golf classic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_21\" (\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 home team scored a 15.16 (106)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_21\" WHERE \"home_team_score\"='15.16 (106)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_21\" (\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 at 15.17 (107) at an away game?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_21\" WHERE \"away_team_score\"='15.17 (107)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" real,\n \"title\" text,\n \"author_s\" text,\n \"recorded\" text,\n \"length\" text\n);\n\nQuestion: Which title is 3:38 long?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"track_listing\" WHERE \"length\"='3:38';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" real,\n \"title\" text,\n \"author_s\" text,\n \"recorded\" text,\n \"length\" text\n);\n\nQuestion: Which title is 3:43 long?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"track_listing\" WHERE \"length\"='3:43';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"year\" real,\n \"film_video\" text,\n \"visual_arts\" text,\n \"theatre\" text,\n \"dance\" text,\n \"music\" text\n);\n\nQuestion: What Dance has the Visual Arts of Bryon Kim?"
},
{
"role": "assistant",
"content": "SELECT \"dance\" FROM \"references\" WHERE \"visual_arts\"='bryon kim';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"year\" real,\n \"film_video\" text,\n \"visual_arts\" text,\n \"theatre\" text,\n \"dance\" text,\n \"music\" text\n);\n\nQuestion: In 2004, what is the Dance?"
},
{
"role": "assistant",
"content": "SELECT \"dance\" FROM \"references\" WHERE \"year\"=2004;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_final_7_february_1999\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" real\n);\n\nQuestion: What artist had 1 draw?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"national_final_7_february_1999\" WHERE \"draw\"=1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"airport\" text,\n \"iata\" text,\n \"icao\" text\n);\n\nQuestion: Name the IATA for jeddah"
},
{
"role": "assistant",
"content": "SELECT \"iata\" FROM \"destinations\" WHERE \"city\"='jeddah';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"airport\" text,\n \"iata\" text,\n \"icao\" text\n);\n\nQuestion: Name the IATA for jessore"
},
{
"role": "assistant",
"content": "SELECT \"iata\" FROM \"destinations\" WHERE \"city\"='jessore';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"airport\" text,\n \"iata\" text,\n \"icao\" text\n);\n\nQuestion: Name the city for thailand"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"destinations\" WHERE \"country\"='thailand';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"airport\" text,\n \"iata\" text,\n \"icao\" text\n);\n\nQuestion: Name the IATA of wmkk"
},
{
"role": "assistant",
"content": "SELECT \"iata\" FROM \"destinations\" WHERE \"icao\"='wmkk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When did the away team carlton play?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_18\" 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 \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where did a home team score 8.14 (62)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_18\" WHERE \"home_team_score\"='8.14 (62)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_constructor\" (\n \"rank\" real,\n \"country\" text,\n \"constructor\" text,\n \"wins\" real,\n \"active\" text,\n \"first_win\" text,\n \"last_win\" text\n);\n\nQuestion: Which constructor is from ITA with a rank less than 13?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"by_constructor\" WHERE \"country\"='ita' AND \"rank\"<13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"result\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent in the Week 4 game?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"season_schedule\" WHERE \"week\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Who are the co-drivers before 2010 with under 326 laps?"
},
{
"role": "assistant",
"content": "SELECT \"co_drivers\" FROM \"24_hours_of_le_mans_results\" WHERE \"year\"<2010 AND \"laps\"<326;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Who are the co-drivers the risi competizione gt2 class that went under 329 laps and recorded a DNF?"
},
{
"role": "assistant",
"content": "SELECT \"co_drivers\" FROM \"24_hours_of_le_mans_results\" WHERE \"laps\"<329 AND \"class\"='gt2' AND \"team\"='risi competizione' AND \"pos\"='dnf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Tell me the highest laps for time/retired of +2 laps and driver of felice bonetto"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"time_retired\"='+2 laps' AND \"driver\"='felice bonetto';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: I want to know the driver when grid is greater than 13 and laps is less than 60 with time/retired of accident"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"grid\">13 AND \"laps\"<60 AND \"time_retired\"='accident';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"song\" text,\n \"aria_singles_chart\" text,\n \"triple_j_hottest_100\" text,\n \"uk_indie_singles_chart\" text,\n \"uk_singles_chart\" text,\n \"album\" text\n);\n\nQuestion: Name the album for years after 2007"
},
{
"role": "assistant",
"content": "SELECT \"album\" FROM \"singles\" WHERE \"year\">2007;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"turkey_scorers\" text,\n \"match_report\" text\n);\n\nQuestion: What was the score on october 17, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"national_team\" WHERE \"date\"='october 17, 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"turkey_scorers\" text,\n \"match_report\" text\n);\n\nQuestion: What was the competition for score of 3-0"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"national_team\" WHERE \"score\"='3-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"turkey_scorers\" text,\n \"match_report\" text\n);\n\nQuestion: Which venue had a score of 1-1?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"national_team\" WHERE \"score\"='1-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"turkey_scorers\" text,\n \"match_report\" text\n);\n\nQuestion: I want the date for nihat kahveci"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"national_team\" WHERE \"turkey_scorers\"='nihat kahveci';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real\n);\n\nQuestion: What is the smallest pick with a Reg GP less than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick_num\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"reg_gp\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real\n);\n\nQuestion: What is the total of pick numbers with a Reg GP larger than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick_num\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"reg_gp\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"rider\" text,\n \"horse\" text,\n \"time_s\" text,\n \"faults\" text,\n \"total_time_s\" text,\n \"points\" real\n);\n\nQuestion: What is the total points when there is a refusal fault and the rider is H.R.H. Prince Abdullah Al-Soud?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"round_1\" WHERE \"faults\"='refusal' AND \"rider\"='h.r.h. prince abdullah al-soud';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"rider\" text,\n \"horse\" text,\n \"time_s\" text,\n \"faults\" text,\n \"total_time_s\" text,\n \"points\" real\n);\n\nQuestion: What is the total points when the horse is Chippison?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"round_1\" WHERE \"horse\"='chippison';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"rider\" text,\n \"horse\" text,\n \"time_s\" text,\n \"faults\" text,\n \"total_time_s\" text,\n \"points\" real\n);\n\nQuestion: What is the total time (s) for the horse Pinot Grigio?"
},
{
"role": "assistant",
"content": "SELECT \"total_time_s\" FROM \"round_1\" WHERE \"horse\"='pinot grigio';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"rider\" text,\n \"horse\" text,\n \"time_s\" text,\n \"faults\" text,\n \"total_time_s\" text,\n \"points\" real\n);\n\nQuestion: What is the average amount of points when the time (s) is 81.78?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"round_1\" WHERE \"time_s\"='81.78';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_team\" (\n \"player\" text,\n \"position\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What is the position of the player from Glades Day School?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"2012_team\" WHERE \"school\"='glades day school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_team\" (\n \"player\" text,\n \"position\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What is the position of the player who went to college of notre dame?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"2012_team\" WHERE \"college\"='notre dame';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012_team\" (\n \"player\" text,\n \"position\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What is the school of the player who went to the college of michigan and originally comes from Wheaton, Illinois?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"2012_team\" WHERE \"college\"='michigan' AND \"hometown\"='wheaton, illinois';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What Chassis was driven by Otto Stuppacher?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"teams_and_drivers\" WHERE \"driver\"='otto stuppacher';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Who drove the car with the n175 chassis in round 13?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"teams_and_drivers\" WHERE \"chassis\"='n175' AND \"rounds\"='13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What chassis did John Watson drive?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"teams_and_drivers\" 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 \"3101_3200\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: what is the right ascension (j2000) when the constellation is sextans and the declination (j2000) is \u00b028\u203201\u2033?"
},
{
"role": "assistant",
"content": "SELECT \"right_ascension_j2000\" FROM \"3101_3200\" WHERE \"constellation\"='sextans' AND \"declination_j2000\"='\u00b028\u203201\u2033';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"3101_3200\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: what is the constellation when the Right ascension ( J2000 ) is 10h18m58.4s?"
},
{
"role": "assistant",
"content": "SELECT \"constellation\" FROM \"3101_3200\" WHERE \"right_ascension_j2000\"='10h18m58.4s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"3101_3200\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text\n);\n\nQuestion: what is the highest ngc number when the declination (j2000) is \u00b025\u203226\u2033?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"ngc_number\") FROM \"3101_3200\" WHERE \"declination_j2000\"='\u00b025\u203226\u2033';"
}
] |
[
{
"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 is the score for Collingwood as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" 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: What away team had a score of 14.14 (98)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_6\" WHERE \"away_team_score\"='14.14 (98)';"
}
] |
[
{
"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 did the home team score at Princes Park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_6\" 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_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 is the home team score when the away team scored 13.12 (90)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_6\" WHERE \"away_team_score\"='13.12 (90)';"
}
] |
[
{
"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: When did the home team score 14.22 (106)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_6\" WHERE \"home_team_score\"='14.22 (106)';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.