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 \"chicago_black_hawks_4_detroit_red_wings_\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the home team in the game that led to a 2-3 series record?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"chicago_black_hawks_4_detroit_red_wings_\" WHERE \"record\"='2-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_22\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: Which home team had a score of 100-86?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_22\" WHERE \"score\"='100-86';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_22\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: Which report corresponds to the State Sports Centre?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"round_22\" WHERE \"venue\"='state sports centre';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_22\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: Who was the away team at the Win Entertainment Centre?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_22\" WHERE \"venue\"='win entertainment centre';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: Can you tell me the total number of Gain that has the Name of williams, jonathan, and the Loss larger than 3?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gain\") FROM \"rushing\" WHERE \"name\"='williams, jonathan' AND \"loss\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: Can you tell me the sum of Loss that has the Gain of 2646?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"loss\") FROM \"rushing\" WHERE \"gain\"=2646;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: Can you tell me the sum of Gain that has the Name of kass, rob, and the Avg/g smaller than 1.9?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"gain\") FROM \"rushing\" WHERE \"name\"='kass, rob' AND \"avg_g\"<1.9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rushing\" (\n \"name\" text,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: Can you tell me the lowest Long that has the Gain of 20, and the Loss smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"long\") FROM \"rushing\" WHERE \"gain\"=20 AND \"loss\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent_num\" text,\n \"result\" text,\n \"score\" text,\n \"attendance\" real,\n \"stadium\" text\n);\n\nQuestion: What was the result of the game at Cleveland Browns Stadium with an attendance of 65,995?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\">'65,995' AND \"stadium\"='cleveland browns stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the highest ERP W with a w216bo call sign?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"erp_w\") FROM \"translators\" WHERE \"call_sign\"='w216bo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What kind of Crowd has a Home team of port adelaide, and a Away team score of 11.10 (76)?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"group_b\" WHERE \"home_team\"='port adelaide' AND \"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 \"group_b\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What kind of Crowd has a Ground of subiaco oval?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"group_b\" WHERE \"ground\"='subiaco oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What kind of Ground has a Home team score of 13.14 (92)?"
},
{
"role": "assistant",
"content": "SELECT \"ground\" FROM \"group_b\" WHERE \"home_team_score\"='13.14 (92)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What kind of Home team has a Home team score of 13.14 (92)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"group_b\" WHERE \"home_team_score\"='13.14 (92)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_b\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many Crowd that has a Date on saturday, 29 january and an Away team of collingwood?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"group_b\" WHERE \"date\"='saturday, 29 january' AND \"away_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: On which date after week 11 was the opponent the arizona cardinals?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\">11 AND \"opponent\"='arizona cardinals';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance during week 15?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"=15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"season\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"alternate\" text,\n \"events\" text\n);\n\nQuestion: What was the lead with an alternate of li dongyan?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"teams\" WHERE \"alternate\"='li dongyan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"season\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"alternate\" text,\n \"events\" text\n);\n\nQuestion: Which lead had a season of 2007-08?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"teams\" WHERE \"season\"='2007-08';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"season\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"alternate\" text,\n \"events\" text\n);\n\nQuestion: Which lead had a season of 2009-10?"
},
{
"role": "assistant",
"content": "SELECT \"lead\" FROM \"teams\" WHERE \"season\"='2009-10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"routes\" (\n \"name\" text,\n \"daytime\" text,\n \"evening\" text,\n \"saturday\" text,\n \"sunday\" text\n);\n\nQuestion: Which Name has a Yes Saturday and a Yes Evening?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"routes\" WHERE \"saturday\"='yes' AND \"evening\"='yes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"routes\" (\n \"name\" text,\n \"daytime\" text,\n \"evening\" text,\n \"saturday\" text,\n \"sunday\" text\n);\n\nQuestion: Name the Daytime which has Saturday of yes and a Name of exmouth?"
},
{
"role": "assistant",
"content": "SELECT \"daytime\" FROM \"routes\" WHERE \"saturday\"='yes' AND \"name\"='exmouth';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"routes\" (\n \"name\" text,\n \"daytime\" text,\n \"evening\" text,\n \"saturday\" text,\n \"sunday\" text\n);\n\nQuestion: Name the Evening that has a Sunday of no, and a Name of s. vidal/plant express?"
},
{
"role": "assistant",
"content": "SELECT \"evening\" FROM \"routes\" WHERE \"sunday\"='no' AND \"name\"='s. vidal/plant express';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"routes\" (\n \"name\" text,\n \"daytime\" text,\n \"evening\" text,\n \"saturday\" text,\n \"sunday\" text\n);\n\nQuestion: Name the Daytime which has a Name of exmouth?"
},
{
"role": "assistant",
"content": "SELECT \"daytime\" FROM \"routes\" WHERE \"name\"='exmouth';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"routes\" (\n \"name\" text,\n \"daytime\" text,\n \"evening\" text,\n \"saturday\" text,\n \"sunday\" text\n);\n\nQuestion: Which Saturday has a Sunday of yes and a Evening of yes?"
},
{
"role": "assistant",
"content": "SELECT \"saturday\" FROM \"routes\" WHERE \"sunday\"='yes' AND \"evening\"='yes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"routes\" (\n \"name\" text,\n \"daytime\" text,\n \"evening\" text,\n \"saturday\" text,\n \"sunday\" text\n);\n\nQuestion: Which Saturday has a Name of confederation?"
},
{
"role": "assistant",
"content": "SELECT \"saturday\" FROM \"routes\" WHERE \"name\"='confederation';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college\" (\n \"season\" text,\n \"gp_gs\" text,\n \"yards\" text,\n \"long\" text,\n \"avg_g\" text\n);\n\nQuestion: What was the GP-GS for the 2009 season?"
},
{
"role": "assistant",
"content": "SELECT \"gp_gs\" FROM \"college\" WHERE \"season\"='2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college\" (\n \"season\" text,\n \"gp_gs\" text,\n \"yards\" text,\n \"long\" text,\n \"avg_g\" text\n);\n\nQuestion: Which GP-GS had a long of 17 and a season of total?"
},
{
"role": "assistant",
"content": "SELECT \"gp_gs\" FROM \"college\" WHERE \"long\"='17' AND \"season\"='total';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college\" (\n \"season\" text,\n \"gp_gs\" text,\n \"yards\" text,\n \"long\" text,\n \"avg_g\" text\n);\n\nQuestion: Which Long has redshirt for its Avg/G?"
},
{
"role": "assistant",
"content": "SELECT \"long\" FROM \"college\" WHERE \"avg_g\"='redshirt';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college\" (\n \"season\" text,\n \"gp_gs\" text,\n \"yards\" text,\n \"long\" text,\n \"avg_g\" text\n);\n\nQuestion: What was the Av/G of the 2009 season?"
},
{
"role": "assistant",
"content": "SELECT \"avg_g\" FROM \"college\" WHERE \"season\"='2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"college\" (\n \"season\" text,\n \"gp_gs\" text,\n \"yards\" text,\n \"long\" text,\n \"avg_g\" text\n);\n\nQuestion: For the Avg/G of 5.9, what was the long?"
},
{
"role": "assistant",
"content": "SELECT \"long\" FROM \"college\" WHERE \"avg_g\"='5.9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the Location Attendance, when High Points is \"D. McKey (24)\", and when Score is \"L 96-105\"?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"high_points\"='d. mckey (24)' AND \"score\"='l 96-105';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is High Rebounds, when Game is greater than 33, and when Score is \"W 132-101\"?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"game\">33 AND \"score\"='w 132-101';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Team, when Game is \"32\"?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"game\"=32;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the sum of Game, when High Points is \"D. McKey (24)\", and when Team is \"@ Dallas Mavericks\"?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"game\") FROM \"game_log\" WHERE \"high_points\"='d. mckey (24)' AND \"team\"='@ dallas mavericks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_15\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Which Tournament has Opponents of marc l\u00f3pez santiago ventura?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_15\" WHERE \"opponents\"='marc l\u00f3pez santiago ventura';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_15\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Which Opponents have a Partnering of alessandro motti, and a Date of 12 september 2005?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"doubles_15\" WHERE \"partnering\"='alessandro motti' AND \"date\"='12 september 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_15\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Which Opponents have a Score of 6\u20134, 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"doubles_15\" WHERE \"score\"='6\u20134, 6\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_15\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Which Tournament has a Surface of hard, and a Date of 24 september 2011?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_15\" WHERE \"surface\"='hard' AND \"date\"='24 september 2011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: How many rounds did the match at GCF: Strength and Honor last?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"event\"='gcf: strength and honor';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"communities\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the total population for Saint-Antoine with an area squared of 6.43?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"population\") FROM \"communities\" WHERE \"official_name\"='saint-antoine' AND \"area_km_2\">6.43;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"communities\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the current status of a location with a census ranking of 1,769 of 5,008 and population greater than 930?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"communities\" WHERE \"population\">930 AND \"census_ranking\"='1,769 of 5,008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: How many games in February have a record of 40-15-5?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"february\") FROM \"schedule_and_results\" WHERE \"record\"='40-15-5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the lowest numbered game with an opponent of Minnesota North Stars earlier than February 25?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"game\") FROM \"schedule_and_results\" WHERE \"opponent\"='minnesota north stars' AND \"february\"<25;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: How many games have the New York Islanders as an opponent before February 7?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"game\") FROM \"schedule_and_results\" WHERE \"opponent\"='new york islanders' AND \"february\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the earliest February date with a record of 37-13-4 in a game earlier than 54?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"february\") FROM \"schedule_and_results\" WHERE \"record\"='37-13-4' AND \"game\"<54;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the date of the game when the record is 2-0?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='2-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the average game number when the record is 4-1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"game\") FROM \"game_log\" WHERE \"record\"='4-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the location and attendance of game 1?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"game\"=1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the date of the game located in Madison Square Garden, when the team is Seattle and the game number is less than 6?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"location_attendance\"='madison square garden' AND \"game\"<6 AND \"team\"='seattle';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the location and attendance of the game when the score is 125-100?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"score\"='125-100';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" text,\n \"date\" text,\n \"circuit\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Who was the winning driver in 1956?"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"results\" WHERE \"year\"='1956';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" text,\n \"date\" text,\n \"circuit\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Which circuit did Peter Whitehead win?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"results\" WHERE \"winning_driver\"='peter whitehead';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" text,\n \"date\" text,\n \"circuit\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: What report did Jack Brabham win?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"results\" WHERE \"winning_driver\"='jack brabham';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" text,\n \"date\" text,\n \"circuit\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: What year did Ferrari win the Kyalami circuit?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"results\" WHERE \"circuit\"='kyalami' AND \"winning_constructor\"='ferrari';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" text,\n \"date\" text,\n \"circuit\" text,\n \"winning_driver\" text,\n \"winning_constructor\" text,\n \"report\" text\n);\n\nQuestion: Which circuit did Jim Clark win in 1962?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"results\" WHERE \"winning_driver\"='jim clark' AND \"year\"='1962';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: On what Date was the 2011 LG Cup Competittion?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"competition\"='2011 lg cup';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"selections\" (\n \"pick\" real,\n \"player\" text,\n \"pos\" text,\n \"nationality\" text,\n \"team\" text,\n \"previous_team\" text,\n \"nba_years_a\" text,\n \"career_with_the_franchise_b\" text\n);\n\nQuestion: What is the pick for the player with 2 years in the NBA and who plays for the Utah Jazz?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"selections\" WHERE \"nba_years_a\"='2' AND \"previous_team\"='utah jazz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the final score for the game in which Carmelo Anthony (26) was the high points scorer?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"high_points\"='carmelo anthony (26)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: In which game number was Chris Andersen (12) the high rebounds scorer?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"game_log\" WHERE \"high_rebounds\"='chris andersen (12)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the final score for the game played against @ Milwaukee?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"team\"='@ milwaukee';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: For the game played against the L.A. Lakers, where was the match played and what was the attendance level?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"team\"='l.a. lakers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_1_results\" (\n \"name\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is Name, when Laps is \"50\", when Grid is greater than 9, when Team is \"Jim Beam Racing\", and when Time/Retired is \"+ 18.0s\"?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"race_1_results\" WHERE \"laps\"=50 AND \"grid\">9 AND \"team\"='jim beam racing' AND \"time_retired\"='+ 18.0s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_1_results\" (\n \"name\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the lowest Laps, when Grid is greater than 7, and when Name is \"Fabian Coulthard\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"race_1_results\" WHERE \"grid\">7 AND \"name\"='fabian coulthard';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_1_results\" (\n \"name\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is Time/Retired, when Laps is less than 49, and when Name is \"Michael Caruso\"?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race_1_results\" WHERE \"laps\"<49 AND \"name\"='michael caruso';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_1_results\" (\n \"name\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is Time/Retired, when Team is \"Team Vodafone\", and when Grid is greater than 4?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race_1_results\" WHERE \"team\"='team vodafone' AND \"grid\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"national_final_14_march_1993\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" real\n);\n\nQuestion: What is the draw number of the Artist Dav Mcnamara and a place bigger than 4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"draw\") FROM \"national_final_14_march_1993\" WHERE \"artist\"='dav mcnamara' AND \"place\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"test_cricket\" (\n \"runs\" text,\n \"match\" text,\n \"stadium\" text,\n \"city_country\" text,\n \"year\" text\n);\n\nQuestion: What is the stadium name that has 144 as the runs?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"test_cricket\" WHERE \"runs\"='144';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"test_cricket\" (\n \"runs\" text,\n \"match\" text,\n \"stadium\" text,\n \"city_country\" text,\n \"year\" text\n);\n\nQuestion: For what year was 100* runs happen?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"test_cricket\" WHERE \"runs\"='100*';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"test_cricket\" (\n \"runs\" text,\n \"match\" text,\n \"stadium\" text,\n \"city_country\" text,\n \"year\" text\n);\n\nQuestion: How many runs happened in 2013?"
},
{
"role": "assistant",
"content": "SELECT \"runs\" FROM \"test_cricket\" WHERE \"year\"='2013';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"test_cricket\" (\n \"runs\" text,\n \"match\" text,\n \"stadium\" text,\n \"city_country\" text,\n \"year\" text\n);\n\nQuestion: With 42 as the match what are the runs?"
},
{
"role": "assistant",
"content": "SELECT \"runs\" FROM \"test_cricket\" WHERE \"match\"='42';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"test_cricket\" (\n \"runs\" text,\n \"match\" text,\n \"stadium\" text,\n \"city_country\" text,\n \"year\" text\n);\n\nQuestion: In 2009 with 100* runs, what is the match?"
},
{
"role": "assistant",
"content": "SELECT \"match\" FROM \"test_cricket\" WHERE \"year\"='2009' AND \"runs\"='100*';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"test_cricket\" (\n \"runs\" text,\n \"match\" text,\n \"stadium\" text,\n \"city_country\" text,\n \"year\" text\n);\n\nQuestion: When the game was played in the stadium called stadium what was the match?"
},
{
"role": "assistant",
"content": "SELECT \"match\" FROM \"test_cricket\" WHERE \"stadium\"='stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"1st_round\" text,\n \"2nd_round\" text\n);\n\nQuestion: What is the 2nd round with a score of 3 - 3, and a team 1 fc gueugnon (d2)?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_round\" FROM \"round_of_16\" WHERE \"score\"='3 - 3' AND \"team_1\"='fc gueugnon (d2)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"1st_round\" text,\n \"2nd_round\" text\n);\n\nQuestion: What is the 2nd round with a score of 3 - 3, and a team 2 fc lorient (d2)?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_round\" FROM \"round_of_16\" WHERE \"score\"='3 - 3' AND \"team_2\"='fc lorient (d2)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"1st_round\" text,\n \"2nd_round\" text\n);\n\nQuestion: What team 1 has a 2nd round 0 - 1, and a team 2 rc lens (d1)?"
},
{
"role": "assistant",
"content": "SELECT \"team_1\" FROM \"round_of_16\" WHERE \"2nd_round\"='0 - 1' AND \"team_2\"='rc lens (d1)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"1st_round\" text,\n \"2nd_round\" text\n);\n\nQuestion: What is the 1st round with a team 2 paris sg (d1)?"
},
{
"role": "assistant",
"content": "SELECT \"1st_round\" FROM \"round_of_16\" WHERE \"team_2\"='paris sg (d1)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"1st_round\" text,\n \"2nd_round\" text\n);\n\nQuestion: What is the 1st round with a 2nd round of 0 - 1, and team 1 sco angers (d1)?"
},
{
"role": "assistant",
"content": "SELECT \"1st_round\" FROM \"round_of_16\" WHERE \"2nd_round\"='0 - 1' AND \"team_1\"='sco angers (d1)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loaned_out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: WHAT IS THE NAME WITH A SUMMER TRANSFER WINDOW, AND COUNTRY SEN?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"loaned_out\" WHERE \"transfer_window\"='summer' AND \"country\"='sen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loaned_out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: WHAT IS THE COUNTRY WITH NAME OF KANU?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"loaned_out\" WHERE \"name\"='kanu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loaned_out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: WHAT IS THE MOVING TO LOCATION WITH BEL AS COUNTRY?"
},
{
"role": "assistant",
"content": "SELECT \"moving_to\" FROM \"loaned_out\" WHERE \"country\"='bel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loaned_out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: WHAT IS THE COUNTRY WITH SUMMER TRANSFER WINDOW?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"loaned_out\" WHERE \"transfer_window\"='summer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loaned_out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: WHAT IS THE TRANSFER WINDOW FOR THE COUNTRY OF BRA?"
},
{
"role": "assistant",
"content": "SELECT \"transfer_window\" FROM \"loaned_out\" WHERE \"country\"='bra';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What opponent had an attendance of 63,659?"
},
{
"role": "assistant",
"content": "SELECT \"opponentnum\" FROM \"schedule\" WHERE \"attendance\"='63,659';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result of 10/18/1947?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='10/18/1947';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponentnum\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result for 10/04/1947?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='10/04/1947';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chinese_taipei_national_football_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"report\" text\n);\n\nQuestion: Which competition has a report of AIFF?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"chinese_taipei_national_football_team\" WHERE \"report\"='aiff';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chinese_taipei_national_football_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"report\" text\n);\n\nQuestion: What is the score for a report of AFC on April 4, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"chinese_taipei_national_football_team\" WHERE \"report\"='afc' AND \"date\"='april 4, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the attendance for the game against the Houston Oilers?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"opponent\"='houston oilers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scottish_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many people attended round f?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"scottish_cup\" WHERE \"round\"='f';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scottish_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many people on average attend round f?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"scottish_cup\" WHERE \"round\"='f';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scottish_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the result in round qf?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"scottish_cup\" WHERE \"round\"='qf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who played Blackpool when Blackpool was at home?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"fifth_round\" WHERE \"home_team\"='blackpool';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: How many times did Arsenal tie when they were away?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"fifth_round\" WHERE \"away_team\"='arsenal';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score of the game when Blackpool was away?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fifth_round\" WHERE \"away_team\"='blackpool';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What result had a time of 1:02?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"kickboxing_record\" WHERE \"time\"='1:02';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What time was the event k-1 the challenge 1999?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"kickboxing_record\" WHERE \"event\"='k-1 the challenge 1999';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Where was the decision draw before round 5?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"kickboxing_record\" WHERE \"method\"='decision draw' AND \"round\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"career_wr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is Career Win-Loss, when Tournament is \"Hamburg\"?"
},
{
"role": "assistant",
"content": "SELECT \"career_win_loss\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='hamburg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"career_wr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is 2004, when 2003 is \"1R\", and when 2006 is \"A\"?"
},
{
"role": "assistant",
"content": "SELECT \"2004\" FROM \"singles_performance_timeline\" WHERE \"2003\"='1r' AND \"2006\"='a';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.