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 \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Name the score for 10 april 2007 and opponent of selima sfar"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_titles\" WHERE \"date\"='10 april 2007' AND \"opponent\"='selima sfar';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"race\" text,\n \"dist_f\" real,\n \"course\" text,\n \"prize_k\" real,\n \"runners\" real,\n \"placing\" real,\n \"margin\" text,\n \"jockey\" text,\n \"trainer\" text\n);\n\nQuestion: How many runners had placings over 8?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"runners\") FROM \"race_record\" WHERE \"placing\">8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"race\" text,\n \"dist_f\" real,\n \"course\" text,\n \"prize_k\" real,\n \"runners\" real,\n \"placing\" real,\n \"margin\" text,\n \"jockey\" text,\n \"trainer\" text\n);\n\nQuestion: Which course had a jockey of Royston FFrench?"
},
{
"role": "assistant",
"content": "SELECT \"course\" FROM \"race_record\" WHERE \"jockey\"='royston ffrench';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"race\" text,\n \"dist_f\" real,\n \"course\" text,\n \"prize_k\" real,\n \"runners\" real,\n \"placing\" real,\n \"margin\" text,\n \"jockey\" text,\n \"trainer\" text\n);\n\nQuestion: What is the average prize for the Buttercross Limited Stakes?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"prize_k\") FROM \"race_record\" WHERE \"race\"='buttercross limited stakes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"race\" text,\n \"dist_f\" real,\n \"course\" text,\n \"prize_k\" real,\n \"runners\" real,\n \"placing\" real,\n \"margin\" text,\n \"jockey\" text,\n \"trainer\" text\n);\n\nQuestion: How many total runners had jockeys of Olivier Peslier with placings under 2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"runners\") FROM \"race_record\" WHERE \"jockey\"='olivier peslier' AND \"placing\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rookie_list\" (\n \"player\" text,\n \"afl_debut\" text,\n \"games\" text,\n \"goals\" text,\n \"kicks\" text,\n \"handballs\" text,\n \"disposals\" text,\n \"marks\" text,\n \"tackles\" text\n);\n\nQuestion: Name the games with marks of 21"
},
{
"role": "assistant",
"content": "SELECT \"games\" FROM \"rookie_list\" WHERE \"marks\"='21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rookie_list\" (\n \"player\" text,\n \"afl_debut\" text,\n \"games\" text,\n \"goals\" text,\n \"kicks\" text,\n \"handballs\" text,\n \"disposals\" text,\n \"marks\" text,\n \"tackles\" text\n);\n\nQuestion: Name the kicks with goals of 1"
},
{
"role": "assistant",
"content": "SELECT \"kicks\" FROM \"rookie_list\" WHERE \"goals\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rookie_list\" (\n \"player\" text,\n \"afl_debut\" text,\n \"games\" text,\n \"goals\" text,\n \"kicks\" text,\n \"handballs\" text,\n \"disposals\" text,\n \"marks\" text,\n \"tackles\" text\n);\n\nQuestion: Name the goals with games of 6"
},
{
"role": "assistant",
"content": "SELECT \"goals\" FROM \"rookie_list\" WHERE \"games\"='6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1990\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What game had the date was it with the final score of 7-23"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1990\" WHERE \"final_score\"='7-23';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1990\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What was the final score of the game at the astrodome?"
},
{
"role": "assistant",
"content": "SELECT \"final_score\" FROM \"1990\" WHERE \"stadium\"='astrodome';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1990\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What was the final score for the date of December 30?"
},
{
"role": "assistant",
"content": "SELECT \"final_score\" FROM \"1990\" WHERE \"date\"='december 30';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1990\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What was the name of the Visiting team at Jack Murphy Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"visiting_team\" FROM \"1990\" WHERE \"stadium\"='jack murphy stadium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1990\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What was the name of the host team at Texas stadium?"
},
{
"role": "assistant",
"content": "SELECT \"host_team\" FROM \"1990\" WHERE \"stadium\"='texas stadium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1990\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What was the name of the host team dated December 16?"
},
{
"role": "assistant",
"content": "SELECT \"host_team\" FROM \"1990\" WHERE \"date\"='december 16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_24_hours_of_le_mans_results\" (\n \"year\" real,\n \"class\" text,\n \"tyres\" text,\n \"team\" text,\n \"co_drivers\" text,\n \"laps\" real,\n \"pos\" text\n);\n\nQuestion: Are there any Teams after 1997?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"complete_24_hours_of_le_mans_results\" WHERE \"year\">1997;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_24_hours_of_le_mans_results\" (\n \"year\" real,\n \"class\" text,\n \"tyres\" text,\n \"team\" text,\n \"co_drivers\" text,\n \"laps\" real,\n \"pos\" text\n);\n\nQuestion: Which class has laps under 77?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"complete_24_hours_of_le_mans_results\" WHERE \"laps\"<77;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"guarantee_group\" (\n \"name\" text,\n \"class\" text,\n \"hometown\" text,\n \"boarded\" text,\n \"position\" text\n);\n\nQuestion: Who boarded first class?"
},
{
"role": "assistant",
"content": "SELECT \"boarded\" FROM \"guarantee_group\" WHERE \"class\"='first';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_08_lincoln_city_f_c_season\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"away_fans\" real\n);\n\nQuestion: What was the lowest attendance at a game when there were fewer than 151 away fans and an opponent of Bury?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"2007_08_lincoln_city_f_c_season\" WHERE \"away_fans\"<151 AND \"opponent\"='bury';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What are the lowest number of points with a Year of 1978, and a Chassis of ensign n177?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"complete_world_championship_formula_one_\" WHERE \"year\"=1978 AND \"chassis\"='ensign n177';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What are the highest number of points with an Entrant of warsteiner brewery?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"complete_world_championship_formula_one_\" WHERE \"entrant\"='warsteiner brewery';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"before_the_elections\" (\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45\" text,\n \"d_46\" text,\n \"d_47\" text,\n \"d_48\" text\n);\n\nQuestion: What is the D 43 when D 46 is R 6?"
},
{
"role": "assistant",
"content": "SELECT \"d_43\" FROM \"before_the_elections\" WHERE \"d_46\"='r 6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"before_the_elections\" (\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45\" text,\n \"d_46\" text,\n \"d_47\" text,\n \"d_48\" text\n);\n\nQuestion: What is the D44 when D43 is R 14?"
},
{
"role": "assistant",
"content": "SELECT \"d_44\" FROM \"before_the_elections\" WHERE \"d_43\"='r 14';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"before_the_elections\" (\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45\" text,\n \"d_46\" text,\n \"d_47\" text,\n \"d_48\" text\n);\n\nQuestion: What is the D48 when D 43 is plurality \u2191??"
},
{
"role": "assistant",
"content": "SELECT \"d_48\" FROM \"before_the_elections\" WHERE \"d_43\"='plurality \u2191';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"before_the_elections\" (\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45\" text,\n \"d_46\" text,\n \"d_47\" text,\n \"d_48\" text\n);\n\nQuestion: What is the D44 when D41 is D 16?"
},
{
"role": "assistant",
"content": "SELECT \"d_44\" FROM \"before_the_elections\" WHERE \"d_41\"='d 16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"carterton_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What gender is the team that has a decile of 5 and in the Dalefield area?"
},
{
"role": "assistant",
"content": "SELECT \"gender\" FROM \"carterton_district\" WHERE \"decile\"=5 AND \"area\"='dalefield';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"carterton_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What school in Dalefield has a roll less than 81?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"carterton_district\" WHERE \"roll\"<81 AND \"area\"='dalefield';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_list\" (\n \"island\" text,\n \"group\" text,\n \"area_ha\" text,\n \"population\" text,\n \"height_m\" real\n);\n\nQuestion: What is the lowest Height (m) on the island of Burray?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"height_m\") FROM \"main_list\" WHERE \"island\"='burray';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_list\" (\n \"island\" text,\n \"group\" text,\n \"area_ha\" text,\n \"population\" text,\n \"height_m\" real\n);\n\nQuestion: What group on the island of Faray has a Height (m) of 32 and a Population of 0?"
},
{
"role": "assistant",
"content": "SELECT \"group\" FROM \"main_list\" WHERE \"height_m\"=32 AND \"population\"='0' AND \"island\"='faray';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_list\" (\n \"island\" text,\n \"group\" text,\n \"area_ha\" text,\n \"population\" text,\n \"height_m\" real\n);\n\nQuestion: What group has a Population of see hoy?"
},
{
"role": "assistant",
"content": "SELECT \"group\" FROM \"main_list\" WHERE \"population\"='see hoy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_list\" (\n \"island\" text,\n \"group\" text,\n \"area_ha\" text,\n \"population\" text,\n \"height_m\" real\n);\n\nQuestion: What group on the island of Muckle Green Holm has a population of 0?"
},
{
"role": "assistant",
"content": "SELECT \"group\" FROM \"main_list\" WHERE \"population\"='0' AND \"island\"='muckle green holm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_list\" (\n \"island\" text,\n \"group\" text,\n \"area_ha\" text,\n \"population\" text,\n \"height_m\" real\n);\n\nQuestion: What is the area (ha) of the group on the island of Linga Holm that has a Height (m) larger than 7?"
},
{
"role": "assistant",
"content": "SELECT \"area_ha\" FROM \"main_list\" WHERE \"height_m\">7 AND \"island\"='linga holm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_list\" (\n \"island\" text,\n \"group\" text,\n \"area_ha\" text,\n \"population\" text,\n \"height_m\" real\n);\n\nQuestion: What is the Population of the group that has a Height (m) of 15 and an Area (ha) of 00017 17?"
},
{
"role": "assistant",
"content": "SELECT \"population\" FROM \"main_list\" WHERE \"height_m\"=15 AND \"area_ha\"='00017 17';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wanganui_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the roll number of the school in Aramoho with a decile of 1?"
},
{
"role": "assistant",
"content": "SELECT \"roll\" FROM \"wanganui_district\" WHERE \"area\"='aramoho' AND \"decile\"=1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wanganui_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the area of Mangamahu primary school?"
},
{
"role": "assistant",
"content": "SELECT \"area\" FROM \"wanganui_district\" WHERE \"name\"='mangamahu primary school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wanganui_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the area of the coed school with a state authority and a roll number of 122?"
},
{
"role": "assistant",
"content": "SELECT \"area\" FROM \"wanganui_district\" WHERE \"authority\"='state' AND \"gender\"='coed' AND \"roll\"=122;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominations_awards\" (\n \"year\" real,\n \"artist\" text,\n \"album_song\" text,\n \"award\" text,\n \"result_category\" text\n);\n\nQuestion: Which result is older than 2007?"
},
{
"role": "assistant",
"content": "SELECT \"result_category\" FROM \"nominations_awards\" WHERE \"year\"<2007;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominations_awards\" (\n \"year\" real,\n \"artist\" text,\n \"album_song\" text,\n \"award\" text,\n \"result_category\" text\n);\n\nQuestion: What year was the Album/Song Speaking louder than before?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"nominations_awards\" WHERE \"album_song\"='speaking louder than before';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominations_awards\" (\n \"year\" real,\n \"artist\" text,\n \"album_song\" text,\n \"award\" text,\n \"result_category\" text\n);\n\nQuestion: What is the most recent year with the Album/Song \"the best worst-case scenario\"?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"nominations_awards\" WHERE \"album_song\"='the best worst-case scenario';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_24_21\" (\n \"outcome\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the score of the final in which Melanie South played with partner Remi Tezuka on a clay surface?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_24_21\" WHERE \"surface\"='clay' AND \"partner\"='remi tezuka';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_24_21\" (\n \"outcome\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the score of the final in which Melanie South played with partner Ksenia Lykina during the Kurume Cup tournament?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_24_21\" WHERE \"partner\"='ksenia lykina' AND \"tournament\"='kurume';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_24_21\" (\n \"outcome\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the score of the final in which Melanie South played with partner Katie O'Brien?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_24_21\" WHERE \"partner\"='katie o''brien';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_24_21\" (\n \"outcome\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome of the tournament in Edinburgh?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles_24_21\" WHERE \"tournament\"='edinburgh';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"invercargill_city\" (\n \"name\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the total decile with an Authority of state, and a Name of newfield park school?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"decile\") FROM \"invercargill_city\" WHERE \"authority\"='state' AND \"name\"='newfield park school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"invercargill_city\" (\n \"name\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the largest decile with a Roll larger than 34, a Gender of coed, and an Authority of state integrated, and an Area of georgetown?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"decile\") FROM \"invercargill_city\" WHERE \"roll\">34 AND \"gender\"='coed' AND \"authority\"='state integrated' AND \"area\"='georgetown';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"invercargill_city\" (\n \"name\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the smallest roll with an Authority of state, a Name of newfield park school, and a Decile smaller than 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"roll\") FROM \"invercargill_city\" WHERE \"authority\"='state' AND \"name\"='newfield park school' AND \"decile\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"invercargill_city\" (\n \"name\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which name has an Area of makarewa?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"invercargill_city\" WHERE \"area\"='makarewa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"invercargill_city\" (\n \"name\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Which name has a Gender of coed, and a Decile larger than 5, and a Roll of 131?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"invercargill_city\" WHERE \"gender\"='coed' AND \"decile\">5 AND \"roll\"=131;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_information\" (\n \"nat\" text,\n \"name\" text,\n \"since\" text,\n \"goals\" real,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: Add up all the Ends columns that have goals smaller than 0."
},
{
"role": "assistant",
"content": "SELECT SUM(\"ends\") FROM \"squad_information\" WHERE \"goals\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What was the competition in 2003?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"achievements\" WHERE \"year\"=2003;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What was the competition in 2003?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"achievements\" WHERE \"year\"=2003;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Which position has 50+12 points and fewer than 10 draws?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"position\") FROM \"final_table\" WHERE \"points\"='50+12' AND \"draws\"<10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: How many positions have goals of fewer than 40 and more than 38 played?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"position\") FROM \"final_table\" WHERE \"goals_for\"<40 AND \"played\">38;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: How many losses are there in the CD Sabadell club with a goal difference less than -2, and more than 38 played?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"losses\") FROM \"final_table\" WHERE \"goal_difference\"<-2 AND \"club\"='cd sabadell' AND \"played\">38;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What are the average number of played with goals of less than 43, more than 9 draws, a higher position than 17 and 30-8 points?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"played\") FROM \"final_table\" WHERE \"goals_for\"<43 AND \"draws\">9 AND \"position\">17 AND \"points\"='30-8';"
}
]
|
[
{
"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: What is the total number of losses of the player with an avg/g smaller than -3.3 and a gain larger than 126?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"loss\") FROM \"rushing\" WHERE \"avg_g\"<-3.3 AND \"gain\">126;"
}
]
|
[
{
"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: What is the total number of losses Jackson, T., who had more than 27 gain, an avg/g smaller than 55.9, and a long less than 34, had?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"loss\") FROM \"rushing\" WHERE \"gain\">27 AND \"avg_g\"<55.9 AND \"name\"='jackson, t.' AND \"long\"<34;"
}
]
|
[
{
"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: What is the total number of long Dubose, E., who had 0 losses, a gain less than 17, and an avg/g bigger than 0, had?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"long\") FROM \"rushing\" WHERE \"loss\"=0 AND \"gain\"<17 AND \"avg_g\">0 AND \"name\"='dubose, e.';"
}
]
|
[
{
"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 \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What date was the record 20\u201316?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='20\u201316';"
}
]
|
[
{
"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 \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the attendance in the gave versus the Brewers with a score of 9\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"opponent\"='brewers' AND \"score\"='9\u20136';"
}
]
|
[
{
"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 \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the attendance on May 26?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"date\"='may 26';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_class_records\" (\n \"name\" text,\n \"seasons\" text,\n \"matches\" real,\n \"inns\" real,\n \"runs\" real\n);\n\nQuestion: Matches of 127 has how many total number of inns?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"inns\") FROM \"first_class_records\" WHERE \"matches\"=127;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_class_records\" (\n \"name\" text,\n \"seasons\" text,\n \"matches\" real,\n \"inns\" real,\n \"runs\" real\n);\n\nQuestion: Name of clem hill, and Inns larger than 126 has the lowest runs?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"runs\") FROM \"first_class_records\" WHERE \"name\"='clem hill' AND \"inns\">126;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_class_records\" (\n \"name\" text,\n \"seasons\" text,\n \"matches\" real,\n \"inns\" real,\n \"runs\" real\n);\n\nQuestion: Runs smaller than 6106, and Inns smaller than 146 has what total number of matches?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"matches\") FROM \"first_class_records\" WHERE \"runs\"<6106 AND \"inns\"<146;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_class_records\" (\n \"name\" text,\n \"seasons\" text,\n \"matches\" real,\n \"inns\" real,\n \"runs\" real\n);\n\nQuestion: Seasons of 1987\u20132007, and a Runs larger than 11622 is the highest inns?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"inns\") FROM \"first_class_records\" WHERE \"seasons\"='1987\u20132007' AND \"runs\">11622;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_29_16_titles_13_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Name the partner for opponents of franti\u0161ek \u010derm\u00e1k michal merti\u0148\u00e1k"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"doubles_29_16_titles_13_runners_up\" WHERE \"opponents_in_the_final\"='franti\u0161ek \u010derm\u00e1k michal merti\u0148\u00e1k';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_29_16_titles_13_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Name the score in the final for january 12, 2013"
},
{
"role": "assistant",
"content": "SELECT \"score_in_the_final\" FROM \"doubles_29_16_titles_13_runners_up\" WHERE \"date\"='january 12, 2013';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_29_16_titles_13_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Name the opponents for outcome of runner-up and date of august 7, 2011"
},
{
"role": "assistant",
"content": "SELECT \"opponents_in_the_final\" FROM \"doubles_29_16_titles_13_runners_up\" WHERE \"outcome\"='runner-up' AND \"date\"='august 7, 2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_29_16_titles_13_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Name the partner for surface of grass and opponents of j\u00fcrgen melzer philipp petzschner"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"doubles_29_16_titles_13_runners_up\" WHERE \"surface\"='grass' AND \"opponents_in_the_final\"='j\u00fcrgen melzer philipp petzschner';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_29_16_titles_13_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Name the score in the final for runner-up and hard surface with opponents being micha\u00ebl llodra nenad zimonji\u0107"
},
{
"role": "assistant",
"content": "SELECT \"score_in_the_final\" FROM \"doubles_29_16_titles_13_runners_up\" WHERE \"outcome\"='runner-up' AND \"surface\"='hard' AND \"opponents_in_the_final\"='micha\u00ebl llodra nenad zimonji\u0107';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships\" (\n \"ship\" text,\n \"builder\" text,\n \"namesake\" text,\n \"renamed\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"commissioned_or_completed\" text\n);\n\nQuestion: What date was the ship 'Wyandotte' launched?"
},
{
"role": "assistant",
"content": "SELECT \"launched\" FROM \"ships\" WHERE \"ship\"='wyandotte';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships\" (\n \"ship\" text,\n \"builder\" text,\n \"namesake\" text,\n \"renamed\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"commissioned_or_completed\" text\n);\n\nQuestion: What was the original name of the ship 'Ajax'?"
},
{
"role": "assistant",
"content": "SELECT \"renamed\" FROM \"ships\" WHERE \"ship\"='ajax';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ships\" (\n \"ship\" text,\n \"builder\" text,\n \"namesake\" text,\n \"renamed\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"commissioned_or_completed\" text\n);\n\nQuestion: What date was the ship named Manhattan completed?"
},
{
"role": "assistant",
"content": "SELECT \"commissioned_or_completed\" FROM \"ships\" WHERE \"ship\"='manhattan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: What position had fewer than 373 laps and a class position of 1st?"
},
{
"role": "assistant",
"content": "SELECT \"pos\" FROM \"24_hours_of_le_mans_results\" WHERE \"laps\"<373 AND \"class_pos\"='1st';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: What class had fewer than 336 laps in 2004?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"24_hours_of_le_mans_results\" WHERE \"laps\"<336 AND \"year\"=2004;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"game\" real,\n \"date\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: What is the average attendance of game 1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"summary\" WHERE \"game\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"game\" real,\n \"date\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: What is the attendance amount of the race with a time of 2:07?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"summary\" WHERE \"time\"='2:07';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What club has less than 61 goals for and 55 goals against?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"final_table\" WHERE \"goals_for\"<61 AND \"goals_against\"=55;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the amount of Draws for the game that had a score of 45+7 and a position below 3?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"draws\") FROM \"final_table\" WHERE \"points\"='45+7' AND \"position\"<3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What was the number of draws when the Elche CF club played 38 and had a goal difference of -16?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"draws\") FROM \"final_table\" WHERE \"goal_difference\">-16 AND \"club\"='elche cf' AND \"played\">38;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"alma_awards\" (\n \"year\" real,\n \"recipient\" text,\n \"role\" text,\n \"category\" text,\n \"result\" text\n);\n\nQuestion: Who was the recipient for Outstanding actress television series prior to 2008?"
},
{
"role": "assistant",
"content": "SELECT \"recipient\" FROM \"alma_awards\" WHERE \"year\"<2008;"
}
]
|
[
{
"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 \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the opponent at the game when the record was 71-78?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='71-78';"
}
]
|
[
{
"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 \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the date of the game that had a loss of Risley (0-1)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"loss\"='risley (0-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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the date of the game when the record was 70-74?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='70-74';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: What player was moving from manchester united?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"in\" WHERE \"moving_from\"='manchester united';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: What player costs \u00a3210k to transfer?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"in\" WHERE \"transfer_fee\"='\u00a3210k';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: Who is moving during winter from wal?"
},
{
"role": "assistant",
"content": "SELECT \"moving_from\" FROM \"in\" WHERE \"transfer_window\"='winter' AND \"country\"='wal';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"episode\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: Which original artist has a Episode of workshop #1?"
},
{
"role": "assistant",
"content": "SELECT \"original_artist\" FROM \"performances_results\" WHERE \"episode\"='workshop #1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"episode\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: Which theme has a Episode of top 6?"
},
{
"role": "assistant",
"content": "SELECT \"theme\" FROM \"performances_results\" WHERE \"episode\"='top 6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"episode\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: Which Theme has a Order # of 9?"
},
{
"role": "assistant",
"content": "SELECT \"theme\" FROM \"performances_results\" WHERE \"order_num\"='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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"time\" text,\n \"record\" text\n);\n\nQuestion: What was the score on August 19?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='august 19';"
}
]
|
[
{
"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 \"attendance\" real,\n \"time\" text,\n \"record\" text\n);\n\nQuestion: Where the time is 2:46, what is the record?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"time\"='2:46';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the Date, when the home team is the NY Rangers?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"october\" WHERE \"home\"='ny rangers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"variants\" (\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"torque\" text,\n \"redline\" real,\n \"year\" real\n);\n\nQuestion: Power of 220kw (299hp) @ 4000 has what torque?"
},
{
"role": "assistant",
"content": "SELECT \"torque\" FROM \"variants\" WHERE \"power\"='220kw (299hp) @ 4000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"variants\" (\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"torque\" text,\n \"redline\" real,\n \"year\" real\n);\n\nQuestion: What is the Displacement that has Power of 220kw (299hp) @ 4000, and a year larger than 2002?"
},
{
"role": "assistant",
"content": "SELECT \"displacement\" FROM \"variants\" WHERE \"year\">2002 AND \"power\"='220kw (299hp) @ 4000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"variants\" (\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"torque\" text,\n \"redline\" real,\n \"year\" real\n);\n\nQuestion: Displacement of 4.4l (4423cc/269in\u00b3) and a Power of 220kw (299hp) @ 4000 belongs to what engine?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"variants\" WHERE \"displacement\"='4.4l (4423cc/269in\u00b3)' AND \"power\"='220kw (299hp) @ 4000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"week\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"result\" text\n);\n\nQuestion: What week was the Original artist, the police ?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"performances_results\" WHERE \"original_artist\"='the police';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances_results\" (\n \"week\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"result\" text\n);\n\nQuestion: Which song garnered an advanced result during top 20 week ?"
},
{
"role": "assistant",
"content": "SELECT \"song_choice\" FROM \"performances_results\" WHERE \"result\"='advanced' AND \"week\"='top 20';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals_14_9_titles_5_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"tournament\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Which Malaysia Satellite tournaments were played after 1998?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"finals_14_9_titles_5_runners_up\" WHERE \"year\">1998 AND \"tournament\"='malaysia satellite';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals_14_9_titles_5_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"tournament\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Who was the runner-up for the Bulgaria Open, before 2007?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"finals_14_9_titles_5_runners_up\" WHERE \"year\"<2007 AND \"outcome\"='runner-up' AND \"tournament\"='bulgaria open';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals_14_9_titles_5_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"tournament\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the score of the player who played against Wong Choong Hann in the Dutch Open?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"finals_14_9_titles_5_runners_up\" WHERE \"tournament\"='dutch open' AND \"opponent\"='wong choong hann';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.