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 \"sligo_leitrim_and_northern_counties_rail\" (\n \"class\" text,\n \"type\" text,\n \"names\" text,\n \"quantity_made\" text,\n \"manufacturer\" text,\n \"date_made\" text\n);\n\nQuestion: What is the quantity made of the locomotive with a Waterford class?"
},
{
"role": "assistant",
"content": "SELECT \"quantity_made\" FROM \"sligo_leitrim_and_northern_counties_rail\" WHERE \"class\"='waterford';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sligo_leitrim_and_northern_counties_rail\" (\n \"class\" text,\n \"type\" text,\n \"names\" text,\n \"quantity_made\" text,\n \"manufacturer\" text,\n \"date_made\" text\n);\n\nQuestion: What is the class of the locomotive with a quantity made of 1 and a 0-6-0t type?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"sligo_leitrim_and_northern_counties_rail\" WHERE \"quantity_made\"='1' AND \"type\"='0-6-0t';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sligo_leitrim_and_northern_counties_rail\" (\n \"class\" text,\n \"type\" text,\n \"names\" text,\n \"quantity_made\" text,\n \"manufacturer\" text,\n \"date_made\" text\n);\n\nQuestion: What is the class of the locomotive with a 0-4-0st type?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"sligo_leitrim_and_northern_counties_rail\" WHERE \"type\"='0-4-0st';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sligo_leitrim_and_northern_counties_rail\" (\n \"class\" text,\n \"type\" text,\n \"names\" text,\n \"quantity_made\" text,\n \"manufacturer\" text,\n \"date_made\" text\n);\n\nQuestion: What is the name of the locomotive with a Glencar class?"
},
{
"role": "assistant",
"content": "SELECT \"names\" FROM \"sligo_leitrim_and_northern_counties_rail\" WHERE \"class\"='glencar';"
}
]
|
[
{
"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 \"source\" text\n);\n\nQuestion: What country has signed type moving from porto?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"in\" WHERE \"type\"='signed' AND \"moving_from\"='porto';"
}
]
|
[
{
"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 \"source\" text\n);\n\nQuestion: Which transfer window was moving from borussia dortmund?"
},
{
"role": "assistant",
"content": "SELECT \"transfer_window\" FROM \"in\" WHERE \"moving_from\"='borussia dortmund';"
}
]
|
[
{
"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 \"source\" text\n);\n\nQuestion: What is moving from esp with transfer fee of youth system?"
},
{
"role": "assistant",
"content": "SELECT \"moving_from\" FROM \"in\" WHERE \"country\"='esp' AND \"transfer_fee\"='youth system';"
}
]
|
[
{
"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 \"source\" text\n);\n\nQuestion: What is the transfer window in esp with promoted type and more than 2010 ends?"
},
{
"role": "assistant",
"content": "SELECT \"transfer_window\" FROM \"in\" WHERE \"country\"='esp' AND \"type\"='promoted' AND \"ends\">2010;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominations\" (\n \"week_2\" text,\n \"week_4\" text,\n \"week_6\" text,\n \"week_11\" text,\n \"week_12\" text,\n \"week_13\" text,\n \"week_15\" text\n);\n\nQuestion: Who is the week 12 for the week 2 with Magda Tomek?"
},
{
"role": "assistant",
"content": "SELECT \"week_12\" FROM \"nominations\" WHERE \"week_2\"='magda tomek';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominations\" (\n \"week_2\" text,\n \"week_4\" text,\n \"week_6\" text,\n \"week_11\" text,\n \"week_12\" text,\n \"week_13\" text,\n \"week_15\" text\n);\n\nQuestion: Who is the week 12 for the week 4 of Gerard Ewelina?"
},
{
"role": "assistant",
"content": "SELECT \"week_12\" FROM \"nominations\" WHERE \"week_4\"='gerard ewelina';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"usa\" (\n \"year\" real,\n \"points\" text,\n \"rebounds\" text,\n \"assists\" text,\n \"steals\" text,\n \"blocks\" text\n);\n\nQuestion: Who was the leader in Points when Al Jefferson (7) was the leader in Rebounds?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"usa\" WHERE \"rebounds\"='al jefferson (7)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"usa\" (\n \"year\" real,\n \"points\" text,\n \"rebounds\" text,\n \"assists\" text,\n \"steals\" text,\n \"blocks\" text\n);\n\nQuestion: Who was the leader in Steals when Travis Watson (9) was the leader in Rebounds?"
},
{
"role": "assistant",
"content": "SELECT \"steals\" FROM \"usa\" WHERE \"rebounds\"='travis watson (9)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"usa\" (\n \"year\" real,\n \"points\" text,\n \"rebounds\" text,\n \"assists\" text,\n \"steals\" text,\n \"blocks\" text\n);\n\nQuestion: What was the 1st Year Al Harrington (9) the leader in Rebounds?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"usa\" WHERE \"rebounds\"='al harrington (9)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"usa\" (\n \"year\" real,\n \"points\" text,\n \"rebounds\" text,\n \"assists\" text,\n \"steals\" text,\n \"blocks\" text\n);\n\nQuestion: Who was the leader in Points with Assists of 2 tied (5) and Steals of 3 tied (2)?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"usa\" WHERE \"steals\"='3 tied (2)' AND \"assists\"='2 tied (5)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"matches\" real,\n \"average\" real\n);\n\nQuestion: Name the average with tally of 0-29 and total more than 29"
},
{
"role": "assistant",
"content": "SELECT AVG(\"average\") FROM \"top_scorers\" WHERE \"tally\"='0-29' AND \"total\">29;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"matches\" real,\n \"average\" real\n);\n\nQuestion: Name the tally with total less than 27 and average more than 3.41"
},
{
"role": "assistant",
"content": "SELECT \"tally\" FROM \"top_scorers\" WHERE \"total\"<27 AND \"average\">3.41;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: For engines of Maserati Straight-6 and entrants of H H Gould, what is the latest year?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='maserati straight-6' AND \"entrant\"='h h gould';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the fewest number of points scored by Goulds' Garage (Bristol), engines of Maserati Straight-6, in years before 1956?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='goulds'' garage (bristol)' AND \"engine\"='maserati straight-6' AND \"year\"<1956;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which chassis has fewer than 2 points, entrants of Goulds' Garage (Bristol), in 1954?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"points\"<2 AND \"entrant\"='goulds'' garage (bristol)' AND \"year\"=1954;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the most points that the Maserati 250F chassis scored in years after 1955?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='maserati 250f' AND \"year\">1955;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which engine has a year larger than 1956?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"complete_formula_one_world_championship_\" WHERE \"year\">1956;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"apollo_astronauts_who_flew_to_the_moon_w\" (\n \"name\" text,\n \"born\" text,\n \"age_on_mission\" real,\n \"mission\" text,\n \"mission_dates\" text,\n \"service\" text\n);\n\nQuestion: What is the lowest age of an astronaut named Stu Roosa?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"age_on_mission\") FROM \"apollo_astronauts_who_flew_to_the_moon_w\" WHERE \"name\"='stu roosa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"apollo_astronauts_who_flew_to_the_moon_w\" (\n \"name\" text,\n \"born\" text,\n \"age_on_mission\" real,\n \"mission\" text,\n \"mission_dates\" text,\n \"service\" text\n);\n\nQuestion: What mission did the astronaut who 38 years old on the mission and who served in NASA serve on?"
},
{
"role": "assistant",
"content": "SELECT \"mission\" FROM \"apollo_astronauts_who_flew_to_the_moon_w\" WHERE \"service\"='nasa' AND \"age_on_mission\"=38;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"properties\" (\n \"lithium\" text,\n \"sodium\" text,\n \"potassium\" text,\n \"rubidium\" text,\n \"caesium\" text\n);\n\nQuestion: what is the type of lithium when rubidium is nabr (1.9)?"
},
{
"role": "assistant",
"content": "SELECT \"lithium\" FROM \"properties\" WHERE \"rubidium\"='nabr (1.9)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"properties\" (\n \"lithium\" text,\n \"sodium\" text,\n \"potassium\" text,\n \"rubidium\" text,\n \"caesium\" text\n);\n\nQuestion: what is the properties of sodium when rubidium is nacl (2.1)?"
},
{
"role": "assistant",
"content": "SELECT \"sodium\" FROM \"properties\" WHERE \"rubidium\"='nacl (2.1)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"properties\" (\n \"lithium\" text,\n \"sodium\" text,\n \"potassium\" text,\n \"rubidium\" text,\n \"caesium\" text\n);\n\nQuestion: what is the properties of potassium when lithium is h a l o g e n s and sodium is bromine?"
},
{
"role": "assistant",
"content": "SELECT \"potassium\" FROM \"properties\" WHERE \"lithium\"='h a l o g e n s' AND \"sodium\"='bromine';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"properties\" (\n \"lithium\" text,\n \"sodium\" text,\n \"potassium\" text,\n \"rubidium\" text,\n \"caesium\" text\n);\n\nQuestion: what is the properties of lithium when caesium is ki (1.7)?"
},
{
"role": "assistant",
"content": "SELECT \"lithium\" FROM \"properties\" WHERE \"caesium\"='ki (1.7)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"properties\" (\n \"lithium\" text,\n \"sodium\" text,\n \"potassium\" text,\n \"rubidium\" text,\n \"caesium\" text\n);\n\nQuestion: what is the properties of sodium when lithium is h a l o g e n s and rubidium is nacl (2.1)?"
},
{
"role": "assistant",
"content": "SELECT \"sodium\" FROM \"properties\" WHERE \"lithium\"='h a l o g e n s' AND \"rubidium\"='nacl (2.1)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"properties\" (\n \"lithium\" text,\n \"sodium\" text,\n \"potassium\" text,\n \"rubidium\" text,\n \"caesium\" text\n);\n\nQuestion: what is the properties of sodium when potassium is lii (1.5)?"
},
{
"role": "assistant",
"content": "SELECT \"sodium\" FROM \"properties\" WHERE \"potassium\"='lii (1.5)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rs_series_b_b\" (\n \"model\" text,\n \"specification\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"prime_mover\" text,\n \"power_output\" text\n);\n\nQuestion: Which prime mover had a Model of rs-18?"
},
{
"role": "assistant",
"content": "SELECT \"prime_mover\" FROM \"rs_series_b_b\" WHERE \"model\"='rs-18';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rs_series_b_b\" (\n \"model\" text,\n \"specification\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"prime_mover\" text,\n \"power_output\" text\n);\n\nQuestion: Which model had a Specification of dl-718?"
},
{
"role": "assistant",
"content": "SELECT \"model\" FROM \"rs_series_b_b\" WHERE \"specification\"='dl-718';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rs_series_b_b\" (\n \"model\" text,\n \"specification\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"prime_mover\" text,\n \"power_output\" text\n);\n\nQuestion: Which power output had a Build date of 1951\u20131956?"
},
{
"role": "assistant",
"content": "SELECT \"power_output\" FROM \"rs_series_b_b\" WHERE \"build_date\"='1951\u20131956';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rs_series_b_b\" (\n \"model\" text,\n \"specification\" text,\n \"build_date\" text,\n \"total_produced\" real,\n \"wheel_arrangement\" text,\n \"prime_mover\" text,\n \"power_output\" text\n);\n\nQuestion: Which wheel arrangement had a Specification of dl-700?"
},
{
"role": "assistant",
"content": "SELECT \"wheel_arrangement\" FROM \"rs_series_b_b\" WHERE \"specification\"='dl-700';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fiba_euro_basket_2007_squads\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born\" real,\n \"current_club\" text\n);\n\nQuestion: Who is the player born before 1985 who is less than 2.02 tall?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"fiba_euro_basket_2007_squads\" WHERE \"year_born\"<1985 AND \"height\"<2.02;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fiba_euro_basket_2007_squads\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born\" real,\n \"current_club\" text\n);\n\nQuestion: Who is the player who was born before 1980 who currently plays for the Toronto Raptors?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"fiba_euro_basket_2007_squads\" WHERE \"year_born\"<1980 AND \"current_club\"='toronto raptors';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fiba_euro_basket_2007_squads\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born\" real,\n \"current_club\" text\n);\n\nQuestion: What position does Sergio Rodr\u00edguez, who is less than 1.96 tall and was born after 1980, play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"fiba_euro_basket_2007_squads\" WHERE \"height\"<1.96 AND \"year_born\">1980 AND \"player\"='sergio rodr\u00edguez';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fiba_euro_basket_2007_squads\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born\" real,\n \"current_club\" text\n);\n\nQuestion: What year was the Guard who currently plays for the Memphis Grizzlies born?"
},
{
"role": "assistant",
"content": "SELECT \"year_born\" FROM \"fiba_euro_basket_2007_squads\" WHERE \"position\"='guard' AND \"current_club\"='memphis grizzlies';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fiba_euro_basket_2007_squads\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born\" real,\n \"current_club\" text\n);\n\nQuestion: What is the height of the Forward who currently plays for the Toronto Raptors?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"fiba_euro_basket_2007_squads\" WHERE \"position\"='forward' AND \"current_club\"='toronto raptors';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_stage\" (\n \"date\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"group_position\" text\n);\n\nQuestion: Date of 24 september 2002 is what group position?"
},
{
"role": "assistant",
"content": "SELECT \"group_position\" FROM \"group_stage\" WHERE \"date\"='24 september 2002';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_stage\" (\n \"date\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"group_position\" text\n);\n\nQuestion: Attendance larger than 63,439, and an Opponent of bayer leverkusen had what result?"
},
{
"role": "assistant",
"content": "SELECT \"result_f_a\" FROM \"group_stage\" WHERE \"attendance\">'63,439' AND \"opponents\"='bayer leverkusen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_stage\" (\n \"date\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"group_position\" text\n);\n\nQuestion: Date of 24 september 2002 had what F-A result?"
},
{
"role": "assistant",
"content": "SELECT \"result_f_a\" FROM \"group_stage\" WHERE \"date\"='24 september 2002';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_stage\" (\n \"date\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"group_position\" text\n);\n\nQuestion: Result F\u2013A of 2\u20130 had what total number of attendance?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"group_stage\" WHERE \"result_f_a\"='2\u20130';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"july\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text\n);\n\nQuestion: What was the score of the game with a loss of Myers (5-6)?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"july\" WHERE \"loss\"='myers (5-6)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"july\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text\n);\n\nQuestion: What was the loss of the game attended by 41,212?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"july\" WHERE \"attendance\"='41,212';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"july\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance of the game that had a loss of Wolf (3-4)?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"july\" WHERE \"loss\"='wolf (3-4)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"junior_under_20_women\" (\n \"rank\" real,\n \"fastest_time_s\" real,\n \"wind_m_s\" real,\n \"athlete\" text,\n \"nation\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: what nation is bianca knight the answer for?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"junior_under_20_women\" WHERE \"athlete\"='bianca knight';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"junior_under_20_women\" (\n \"rank\" real,\n \"fastest_time_s\" real,\n \"wind_m_s\" real,\n \"athlete\" text,\n \"nation\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: what is the wind speed when brenda morehead was in the united states?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wind_m_s\") FROM \"junior_under_20_women\" WHERE \"nation\"='united states' AND \"athlete\"='brenda morehead';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"junior_under_20_women\" (\n \"rank\" real,\n \"fastest_time_s\" real,\n \"wind_m_s\" real,\n \"athlete\" text,\n \"nation\" text,\n \"date\" text,\n \"location\" text\n);\n\nQuestion: what is the highest rank in dresden with a time faster than 10.88?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"junior_under_20_women\" WHERE \"location\"='dresden' AND \"fastest_time_s\"<10.88;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"winner\" text,\n \"race_leader\" text\n);\n\nQuestion: What is the course on 1 June?"
},
{
"role": "assistant",
"content": "SELECT \"course\" FROM \"stage_results\" WHERE \"date\"='1 june';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"winner\" text,\n \"race_leader\" text\n);\n\nQuestion: Who is the winner of the Florence to Genoa course?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"stage_results\" WHERE \"course\"='florence to genoa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"winner\" text,\n \"race_leader\" text\n);\n\nQuestion: What is the date of the Rome to Florence course?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"stage_results\" WHERE \"course\"='rome to florence';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world\" (\n \"year\" real,\n \"points\" text,\n \"rebounds\" text,\n \"assists\" text,\n \"steals\" text,\n \"blocks\" text\n);\n\nQuestion: What is Assists that has a Blocks of 2 tied (1) with a Year larger than 1995"
},
{
"role": "assistant",
"content": "SELECT \"assists\" FROM \"world\" WHERE \"blocks\"='2 tied (1)' AND \"year\">1995;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the highest lane for heat 6 with a time of dns?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lane\") FROM \"heats\" WHERE \"heat\"=6 AND \"time\"='dns';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the lowest lane with a time of 2:05.90, and a Heat larger than 3?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lane\") FROM \"heats\" WHERE \"time\"='2:05.90' AND \"heat\">3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What nationality has a lane larger than 4 and a Time of 2:00.37?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"heats\" WHERE \"lane\">4 AND \"time\"='2:00.37';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the average Lane where Belarus is the nationality?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lane\") FROM \"heats\" WHERE \"nationality\"='belarus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the highest lane for nisha millet?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lane\") FROM \"heats\" WHERE \"name\"='nisha millet';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"type\" text,\n \"winner\" text,\n \"race_leader\" text\n);\n\nQuestion: On what date was the race course from Rome to Naples?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"stage_results\" WHERE \"course\"='rome to naples';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"try_bp\" text,\n \"losing_bp\" text\n);\n\nQuestion: Name the Losing BP with 22 played and 9 Try BP."
},
{
"role": "assistant",
"content": "SELECT \"losing_bp\" FROM \"2008_2009_table\" WHERE \"played\"='22' AND \"try_bp\"='9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"try_bp\" text,\n \"losing_bp\" text\n);\n\nQuestion: Name the Losing BP with drawn of 1 and a Try BP of 6."
},
{
"role": "assistant",
"content": "SELECT \"losing_bp\" FROM \"2008_2009_table\" WHERE \"drawn\"='1' AND \"try_bp\"='6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"try_bp\" text,\n \"losing_bp\" text\n);\n\nQuestion: Name the Losing BP of Newport Saracens RFC and has a Lost of 19."
},
{
"role": "assistant",
"content": "SELECT \"losing_bp\" FROM \"2008_2009_table\" WHERE \"lost\"='19' AND \"club\"='newport saracens rfc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"try_bp\" text,\n \"losing_bp\" text\n);\n\nQuestion: Name the Drawn for Ystrad Rhondda RFC and has Played of 22."
},
{
"role": "assistant",
"content": "SELECT \"drawn\" FROM \"2008_2009_table\" WHERE \"played\"='22' AND \"club\"='ystrad rhondda rfc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"try_bp\" text,\n \"losing_bp\" text\n);\n\nQuestion: Can you name the drawn with a Lost of 1?"
},
{
"role": "assistant",
"content": "SELECT \"drawn\" FROM \"2008_2009_table\" WHERE \"lost\"='1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"try_bp\" text,\n \"losing_bp\" text\n);\n\nQuestion: With a Losing BP of 8, what is the drawn?"
},
{
"role": "assistant",
"content": "SELECT \"drawn\" FROM \"2008_2009_table\" WHERE \"losing_bp\"='8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_list\" (\n \"player\" text,\n \"afl_debut\" text,\n \"games\" text,\n \"goals\" text,\n \"behinds\" text,\n \"kicks\" text,\n \"handballs\" text,\n \"disposals\" text,\n \"marks\" text,\n \"tackles\" text\n);\n\nQuestion: What is the number of disposals when marks is 134?"
},
{
"role": "assistant",
"content": "SELECT \"disposals\" FROM \"player_list\" WHERE \"marks\"='134';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friendlies\" (\n \"match\" real,\n \"date\" text,\n \"competition_or_tour\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score1\" text\n);\n\nQuestion: What is the Score1 of Match 42?"
},
{
"role": "assistant",
"content": "SELECT \"score1\" FROM \"friendlies\" WHERE \"match\"=42;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friendlies\" (\n \"match\" real,\n \"date\" text,\n \"competition_or_tour\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score1\" text\n);\n\nQuestion: On what date was the match higher than 8 on ground A against Guiseley?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"friendlies\" WHERE \"match\">8 AND \"ground\"='a' AND \"opponent\"='guiseley';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"friendlies\" (\n \"match\" real,\n \"date\" text,\n \"competition_or_tour\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score1\" text\n);\n\nQuestion: On what ground was the game on 31 Jul 2007?"
},
{
"role": "assistant",
"content": "SELECT \"ground\" FROM \"friendlies\" WHERE \"date\"='31 jul 2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What is the total of David Toms?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"made_the_cut\" WHERE \"player\"='david toms';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What is the average of Fiji with t10 Finish?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"made_the_cut\" WHERE \"finish\"='t10' AND \"country\"='fiji';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Who won in 1983?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"year_s_won\"='1983';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"newspapers\" (\n \"name\" text,\n \"frequency\" text,\n \"language\" text,\n \"city\" text,\n \"website\" text\n);\n\nQuestion: Which english website has a daily frequency ?"
},
{
"role": "assistant",
"content": "SELECT \"website\" FROM \"newspapers\" WHERE \"language\"='english' AND \"frequency\"='daily';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"newspapers\" (\n \"name\" text,\n \"frequency\" text,\n \"language\" text,\n \"city\" text,\n \"website\" text\n);\n\nQuestion: What is the frequency of the newspaper, el diario de nuevo laredo in the city of nuevo laredo ?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"newspapers\" WHERE \"city\"='nuevo laredo' AND \"name\"='el diario de nuevo laredo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"newspapers\" (\n \"name\" text,\n \"frequency\" text,\n \"language\" text,\n \"city\" text,\n \"website\" text\n);\n\nQuestion: What is the website of the Laredo Sun in the city of Laredo ?"
},
{
"role": "assistant",
"content": "SELECT \"website\" FROM \"newspapers\" WHERE \"city\"='laredo' AND \"name\"='laredo sun';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"newspapers\" (\n \"name\" text,\n \"frequency\" text,\n \"language\" text,\n \"city\" text,\n \"website\" text\n);\n\nQuestion: What is the name of the newspaper with the website liderinformativo.com ?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"newspapers\" WHERE \"website\"='liderinformativo.com';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"newspapers\" (\n \"name\" text,\n \"frequency\" text,\n \"language\" text,\n \"city\" text,\n \"website\" text\n);\n\nQuestion: Which website is in english and has the frequency of an online newspaper ?"
},
{
"role": "assistant",
"content": "SELECT \"website\" FROM \"newspapers\" WHERE \"language\"='english' AND \"frequency\"='online newspaper';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"newspapers\" (\n \"name\" text,\n \"frequency\" text,\n \"language\" text,\n \"city\" text,\n \"website\" text\n);\n\nQuestion: Which city has spanish news on the website ultimahora.com ?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"newspapers\" WHERE \"language\"='spanish' AND \"website\"='ultimahora.com';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which line after 1959 had the highest amount of points?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"year\">1959;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which line has the lowest amount of points and a year of 1954?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"year\"=1954;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the total amount of points that Christy has in the years before 1954?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='christy' AND \"year\"<1954;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which is the latest year that has an engine of Offenhauser l4, a chassis of Kurtis Kraft 500c, and the entrant of Federal Engineering?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='offenhauser l4' AND \"chassis\"='kurtis kraft 500c' AND \"entrant\"='federal engineering';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which chasis was in the year 1954?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"year\"=1954;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"year\" real,\n \"competition\" text,\n \"town\" text,\n \"opponent\" text,\n \"final_score\" text\n);\n\nQuestion: What is the final score in 2007 for the world league in novi sad played against Italy?"
},
{
"role": "assistant",
"content": "SELECT \"final_score\" FROM \"matches\" WHERE \"year\"=2007 AND \"competition\"='world league' AND \"town\"='novi sad' AND \"opponent\"='italy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"year\" real,\n \"competition\" text,\n \"town\" text,\n \"opponent\" text,\n \"final_score\" text\n);\n\nQuestion: what is the competition played in budva against italy?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"matches\" WHERE \"town\"='budva' AND \"opponent\"='italy';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"year\" real,\n \"competition\" text,\n \"town\" text,\n \"opponent\" text,\n \"final_score\" text\n);\n\nQuestion: what is the competition that had a final score of 6:5?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"matches\" WHERE \"final_score\"='6:5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"year\" real,\n \"competition\" text,\n \"town\" text,\n \"opponent\" text,\n \"final_score\" text\n);\n\nQuestion: who is the opponent when played in trieste before 2007?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"matches\" WHERE \"year\"<2007 AND \"town\"='trieste';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1965_season_finished_5th_39pts_out_of_18\" (\n \"rider\" text,\n \"matches\" real,\n \"rides\" real,\n \"bonus_pts\" real,\n \"total_points\" real\n);\n\nQuestion: What was Bob Jameson's lowest bonus where he had less than 15 rides?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bonus_pts\") FROM \"1965_season_finished_5th_39pts_out_of_18\" WHERE \"rider\"='bob jameson' AND \"rides\"<15;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1965_season_finished_5th_39pts_out_of_18\" (\n \"rider\" text,\n \"matches\" real,\n \"rides\" real,\n \"bonus_pts\" real,\n \"total_points\" real\n);\n\nQuestion: How many rides did it take to get less than 3 bonus pts in no more than 7 matches?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rides\") FROM \"1965_season_finished_5th_39pts_out_of_18\" WHERE \"bonus_pts\"<3 AND \"matches\"<7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1965_season_finished_5th_39pts_out_of_18\" (\n \"rider\" text,\n \"matches\" real,\n \"rides\" real,\n \"bonus_pts\" real,\n \"total_points\" real\n);\n\nQuestion: What is the total for 34 matches with 111 rides, but no more than 15 bonus points?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total_points\") FROM \"1965_season_finished_5th_39pts_out_of_18\" WHERE \"matches\"=34 AND \"rides\"=111 AND \"bonus_pts\">15;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1965_season_finished_5th_39pts_out_of_18\" (\n \"rider\" text,\n \"matches\" real,\n \"rides\" real,\n \"bonus_pts\" real,\n \"total_points\" real\n);\n\nQuestion: How many rides did it take Ray Day to get 274 points in total with less than 3 bonus points?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rides\") FROM \"1965_season_finished_5th_39pts_out_of_18\" WHERE \"total_points\"<274 AND \"rider\"='ray day' AND \"bonus_pts\">3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1965_season_finished_5th_39pts_out_of_18\" (\n \"rider\" text,\n \"matches\" real,\n \"rides\" real,\n \"bonus_pts\" real,\n \"total_points\" real\n);\n\nQuestion: Which rider had less than 342 points in no more than 76 rides in 7 matches with more than 2 bonus points?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"1965_season_finished_5th_39pts_out_of_18\" WHERE \"total_points\"<342 AND \"rides\"<76 AND \"matches\"=7 AND \"bonus_pts\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_45\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the Margin of victory on aug 11, 2002?"
},
{
"role": "assistant",
"content": "SELECT \"margin_of_victory\" FROM \"champions_tour_wins_45\" WHERE \"date\"='aug 11, 2002';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_45\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: When has a Winning score of \u201316 (70-65-65=200)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"champions_tour_wins_45\" WHERE \"winning_score\"='\u201316 (70-65-65=200)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_45\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the Margin of victory on oct 5, 1997?"
},
{
"role": "assistant",
"content": "SELECT \"margin_of_victory\" FROM \"champions_tour_wins_45\" WHERE \"date\"='oct 5, 1997';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions_tour_wins_45\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the Winning score on oct 22, 2000?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"champions_tour_wins_45\" WHERE \"date\"='oct 22, 2000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_2\" (\n \"episode_no\" real,\n \"airdate\" text,\n \"total_viewers\" real,\n \"share\" text,\n \"bbc_one_weekly_ranking\" text\n);\n\nQuestion: How many episodes have a share of 16.2% and an episode number of less than 1?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total_viewers\") FROM \"series_2\" WHERE \"share\"='16.2%' AND \"episode_no\"<1;"
}
]
|
[
{
"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 \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: If the French Open tournament had 2r in 2012, what was it in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"2010\" FROM \"singles_performance_timeline\" WHERE \"2012\"='2r' AND \"tournament\"='french open';"
}
]
|
[
{
"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 \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: Which 2012 tournament had 2r in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"2012\" FROM \"singles_performance_timeline\" WHERE \"2010\"='2r';"
}
]
|
[
{
"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 \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: Which tournament had 2r in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_performance_timeline\" WHERE \"2010\"='2r';"
}
]
|
[
{
"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 \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: If the French Open tournament had 2r in 2012, what was it in 2009?"
},
{
"role": "assistant",
"content": "SELECT \"2009\" FROM \"singles_performance_timeline\" WHERE \"2012\"='2r' AND \"tournament\"='french open';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.