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 \"2004_list\" (\n \"rank\" real,\n \"company\" text,\n \"headquarters\" text,\n \"industry\" text,\n \"sales_billion\" real,\n \"profits_billion\" real,\n \"assets_billion\" real,\n \"market_value_billion\" real\n);\n\nQuestion: What is the highest profits in billions of the company headquartered in the USA with a market value of 194.87 billions and less than 76.66 billions in sales?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"profits_billion\") FROM \"2004_list\" WHERE \"headquarters\"='usa' AND \"market_value_billion\"=194.87 AND \"sales_billion\"<76.66;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Total has a Nation of japan, and a Silver larger than 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"nation\"='japan' AND \"silver\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Nation has a Gold larger than 0, and a Total larger than 4, and a Rank of 6?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"medal_table\" WHERE \"gold\">0 AND \"total\">4 AND \"rank\"='6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Silver has a Rank of 1, and a Total smaller than 11?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"silver\") FROM \"medal_table\" WHERE \"rank\"='1' AND \"total\"<11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Total has a Nation of united states, and a Bronze larger than 3?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"medal_table\" WHERE \"nation\"='united states' AND \"bronze\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_a_partnership_records\" (\n \"wicket\" text,\n \"runs\" text,\n \"batsmen\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Where did jamie cox & daniel marsh play against queensland?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"list_a_partnership_records\" WHERE \"opponent\"='queensland' AND \"batsmen\"='jamie cox & daniel marsh';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_a_partnership_records\" (\n \"wicket\" text,\n \"runs\" text,\n \"batsmen\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Where were jamie cox & scott kremerskothen paired?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"list_a_partnership_records\" WHERE \"batsmen\"='jamie cox & scott kremerskothen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_a_partnership_records\" (\n \"wicket\" text,\n \"runs\" text,\n \"batsmen\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Who were the batsmen paired for wicket 7?"
},
{
"role": "assistant",
"content": "SELECT \"batsmen\" FROM \"list_a_partnership_records\" WHERE \"wicket\"='7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_a_partnership_records\" (\n \"wicket\" text,\n \"runs\" text,\n \"batsmen\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: How many runs did they get against new south wales in 2002/03?"
},
{
"role": "assistant",
"content": "SELECT \"runs\" FROM \"list_a_partnership_records\" WHERE \"opponent\"='new south wales' AND \"season\"='2002/03';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_a_partnership_records\" (\n \"wicket\" text,\n \"runs\" text,\n \"batsmen\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What season did they play queensland at wicket 4?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"list_a_partnership_records\" WHERE \"opponent\"='queensland' AND \"wicket\"='4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"date\" text,\n \"title\" text,\n \"peak_position\" real,\n \"weeks\" text,\n \"sales\" real\n);\n\nQuestion: What was the Peak Position on July 11, 2001?"
},
{
"role": "assistant",
"content": "SELECT \"peak_position\" FROM \"singles\" WHERE \"date\"='july 11, 2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"date\" text,\n \"title\" text,\n \"peak_position\" real,\n \"weeks\" text,\n \"sales\" real\n);\n\nQuestion: On December 12, 2001, how many weeks had the single been in its position?"
},
{
"role": "assistant",
"content": "SELECT \"weeks\" FROM \"singles\" WHERE \"date\"='december 12, 2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"c\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the nationality of the Team Purdue?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"c\" WHERE \"school_club_team\"='purdue';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"c\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the nationality of the Team Georgia Tech?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"c\" WHERE \"school_club_team\"='georgia tech';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"c\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_grizzlies\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the nationality of the forward position on the Grizzlies in 2011?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"c\" WHERE \"position\"='forward' AND \"years_for_grizzlies\"='2011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual_champions\" (\n \"year\" real,\n \"venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"third_place\" text\n);\n\nQuestion: Who was the runner-up at the event held in Tartu, Estonia?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"individual_champions\" WHERE \"venue\"='tartu, estonia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual_champions\" (\n \"year\" real,\n \"venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"third_place\" text\n);\n\nQuestion: For the event held in Tartu, Estonia, what is the name of the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"individual_champions\" WHERE \"venue\"='tartu, estonia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual_champions\" (\n \"year\" real,\n \"venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"third_place\" text\n);\n\nQuestion: Who took third place in 2012?"
},
{
"role": "assistant",
"content": "SELECT \"third_place\" FROM \"individual_champions\" WHERE \"year\"=2012;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual_champions\" (\n \"year\" real,\n \"venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"third_place\" text\n);\n\nQuestion: In what year was this event held in Oslo, Norway?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"individual_champions\" WHERE \"venue\"='oslo, norway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_foreign_ministers\" (\n \"name\" text,\n \"party\" text,\n \"tenure\" text,\n \"head_s_of_government\" text,\n \"ministerial_title\" text\n);\n\nQuestion: What is the head of government for Don Stephen Senanayake?"
},
{
"role": "assistant",
"content": "SELECT \"head_s_of_government\" FROM \"list_of_foreign_ministers\" WHERE \"name\"='don stephen senanayake';"
}
] |
[
{
"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: Which team is in 14th position?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"24_hours_of_le_mans_results\" WHERE \"pos\"='14th';"
}
] |
[
{
"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: Which position has a Year larger than 1997, and a Class Position of 3rd?"
},
{
"role": "assistant",
"content": "SELECT \"pos\" FROM \"24_hours_of_le_mans_results\" WHERE \"year\">1997 AND \"class_pos\"='3rd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_num1\" text,\n \"points\" text,\n \"team_num2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is 2nd Leg, when Team #2 is \"San Lorenzo\"?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"round_of_16\" WHERE \"team_num2\"='san lorenzo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standard_voltage_90_nm\" (\n \"model_number\" text,\n \"clock_speed\" text,\n \"l2_cache\" text,\n \"fsb_speed\" text,\n \"clock_multiplier\" text,\n \"voltage_range\" text,\n \"socket\" text,\n \"release_date\" text\n);\n\nQuestion: Which Clock Speed has a FSB Speed of 400 mhz, and a Model Number of c7-m 794?"
},
{
"role": "assistant",
"content": "SELECT \"clock_speed\" FROM \"standard_voltage_90_nm\" WHERE \"fsb_speed\"='400 mhz' AND \"model_number\"='c7-m 794';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standard_voltage_90_nm\" (\n \"model_number\" text,\n \"clock_speed\" text,\n \"l2_cache\" text,\n \"fsb_speed\" text,\n \"clock_multiplier\" text,\n \"voltage_range\" text,\n \"socket\" text,\n \"release_date\" text\n);\n\nQuestion: Which Socket has a FSB Speed of 400 mhz, and a Voltage Range of 1.004 v?"
},
{
"role": "assistant",
"content": "SELECT \"socket\" FROM \"standard_voltage_90_nm\" WHERE \"fsb_speed\"='400 mhz' AND \"voltage_range\"='1.004 v';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standard_voltage_90_nm\" (\n \"model_number\" text,\n \"clock_speed\" text,\n \"l2_cache\" text,\n \"fsb_speed\" text,\n \"clock_multiplier\" text,\n \"voltage_range\" text,\n \"socket\" text,\n \"release_date\" text\n);\n\nQuestion: Which Clock Multiplier has a Clock Speed of 1.6 ghz, and a Model Number of c7-m 764?"
},
{
"role": "assistant",
"content": "SELECT \"clock_multiplier\" FROM \"standard_voltage_90_nm\" WHERE \"clock_speed\"='1.6 ghz' AND \"model_number\"='c7-m 764';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standard_voltage_90_nm\" (\n \"model_number\" text,\n \"clock_speed\" text,\n \"l2_cache\" text,\n \"fsb_speed\" text,\n \"clock_multiplier\" text,\n \"voltage_range\" text,\n \"socket\" text,\n \"release_date\" text\n);\n\nQuestion: Which FSB Speed has a Model Number of c7-m 765?"
},
{
"role": "assistant",
"content": "SELECT \"fsb_speed\" FROM \"standard_voltage_90_nm\" WHERE \"model_number\"='c7-m 765';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standard_voltage_90_nm\" (\n \"model_number\" text,\n \"clock_speed\" text,\n \"l2_cache\" text,\n \"fsb_speed\" text,\n \"clock_multiplier\" text,\n \"voltage_range\" text,\n \"socket\" text,\n \"release_date\" text\n);\n\nQuestion: Which Clock Multiplier has a Model Number of c7-m 764?"
},
{
"role": "assistant",
"content": "SELECT \"clock_multiplier\" FROM \"standard_voltage_90_nm\" WHERE \"model_number\"='c7-m 764';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"standard_voltage_90_nm\" (\n \"model_number\" text,\n \"clock_speed\" text,\n \"l2_cache\" text,\n \"fsb_speed\" text,\n \"clock_multiplier\" text,\n \"voltage_range\" text,\n \"socket\" text,\n \"release_date\" text\n);\n\nQuestion: Which Release Date has a Voltage Range of 1.148 v - 1.196 v?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"standard_voltage_90_nm\" WHERE \"voltage_range\"='1.148 v - 1.196 v';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Who are the players that placed t2?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"first_round\" WHERE \"place\"='t2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Which country is Lee Trevino from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"first_round\" WHERE \"player\"='lee trevino';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Which player(s) is from South Africa?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"first_round\" WHERE \"country\"='south africa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year_record\" (\n \"year\" real,\n \"mlb_club\" text,\n \"record\" text,\n \"finish\" text,\n \"manager\" text\n);\n\nQuestion: what is the record when the year is after 1992, manager is tom kotchman and finish is 2nd?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"year_by_year_record\" WHERE \"year\">1992 AND \"manager\"='tom kotchman' AND \"finish\"='2nd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year_record\" (\n \"year\" real,\n \"mlb_club\" text,\n \"record\" text,\n \"finish\" text,\n \"manager\" text\n);\n\nQuestion: what is the finish when the manager is tom kotchman and record is 43-33?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"year_by_year_record\" WHERE \"manager\"='tom kotchman' AND \"record\"='43-33';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year_record\" (\n \"year\" real,\n \"mlb_club\" text,\n \"record\" text,\n \"finish\" text,\n \"manager\" text\n);\n\nQuestion: what is the finish when the manager is tom kotchman and the record is 40-36?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"year_by_year_record\" WHERE \"manager\"='tom kotchman' AND \"record\"='40-36';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year_record\" (\n \"year\" real,\n \"mlb_club\" text,\n \"record\" text,\n \"finish\" text,\n \"manager\" text\n);\n\nQuestion: who is the manager when the year is before 1994 and finish is 5th?"
},
{
"role": "assistant",
"content": "SELECT \"manager\" FROM \"year_by_year_record\" WHERE \"year\"<1994 AND \"finish\"='5th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year_record\" (\n \"year\" real,\n \"mlb_club\" text,\n \"record\" text,\n \"finish\" text,\n \"manager\" text\n);\n\nQuestion: what is the record when the year is 2011?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"year_by_year_record\" WHERE \"year\"=2011;"
}
] |
[
{
"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\" real,\n \"finish\" text\n);\n\nQuestion: What is Player, when Total is \"294\", and when Year(s) Won is \"1955\"?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"total\"=294 AND \"year_s_won\"='1955';"
}
] |
[
{
"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\" real,\n \"finish\" text\n);\n\nQuestion: What is Player, when To Par is less than 14?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"to_par\"<14;"
}
] |
[
{
"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\" real,\n \"finish\" text\n);\n\nQuestion: What is To Par, when Player is \"Tommy Bolt\"?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"player\"='tommy bolt';"
}
] |
[
{
"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\" real,\n \"finish\" text\n);\n\nQuestion: What is the sum of Total, when Player is \"Tommy Bolt\"?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"made_the_cut\" WHERE \"player\"='tommy bolt';"
}
] |
[
{
"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\" real,\n \"finish\" text\n);\n\nQuestion: What is the total number of Total, when To Par is \"7\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"made_the_cut\" WHERE \"to_par\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"award_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nomination\" text,\n \"result\" text\n);\n\nQuestion: Which award was won when the nomination was Senses Around?"
},
{
"role": "assistant",
"content": "SELECT \"award\" FROM \"award_and_nominations\" WHERE \"result\"='won' AND \"nomination\"='senses around';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"award_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nomination\" text,\n \"result\" text\n);\n\nQuestion: What was the nomination in a year earlier than 2009?"
},
{
"role": "assistant",
"content": "SELECT \"nomination\" FROM \"award_and_nominations\" WHERE \"year\"<2009;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"award_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nomination\" text,\n \"result\" text\n);\n\nQuestion: Which award is for the category Best New Artist?"
},
{
"role": "assistant",
"content": "SELECT \"award\" FROM \"award_and_nominations\" WHERE \"category\"='best new artist';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"award_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nomination\" text,\n \"result\" text\n);\n\nQuestion: What is the earliest year with a category of Top 10 Selling Mandarin Albums of the Year?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"award_and_nominations\" WHERE \"category\"='top 10 selling mandarin albums of the year';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"j\" (\n \"discipline\" text,\n \"championship\" text,\n \"circuit\" text,\n \"event\" text,\n \"session\" text\n);\n\nQuestion: For the USAC National Championship, what is the Discipline?"
},
{
"role": "assistant",
"content": "SELECT \"discipline\" FROM \"j\" WHERE \"championship\"='usac national championship';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"j\" (\n \"discipline\" text,\n \"championship\" text,\n \"circuit\" text,\n \"event\" text,\n \"session\" text\n);\n\nQuestion: In the Indianapolis Sweepstakes race session, what is the championship?"
},
{
"role": "assistant",
"content": "SELECT \"championship\" FROM \"j\" WHERE \"session\"='race' AND \"event\"='indianapolis sweepstakes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"j\" (\n \"discipline\" text,\n \"championship\" text,\n \"circuit\" text,\n \"event\" text,\n \"session\" text\n);\n\nQuestion: What circuit is the Sprint Cup series championship?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"j\" WHERE \"championship\"='sprint cup series';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What were the Results for 25,000 Attendance?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='25,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result on 10/06/1934?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='10/06/1934';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_teams\" (\n \"club\" text,\n \"home_city\" text,\n \"stadium\" text,\n \"founded\" real,\n \"seasons_in_prsl\" text\n);\n\nQuestion: What year was the team Club of atl\u00e9tico de san juan fc who plays at hiram bithorn stadium founded."
},
{
"role": "assistant",
"content": "SELECT SUM(\"founded\") FROM \"former_teams\" WHERE \"stadium\"='hiram bithorn stadium' AND \"club\"='atl\u00e9tico de san juan fc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fbs_radio_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power\" text,\n \"location\" text\n);\n\nQuestion: What is the Branding of the Iloilo City Frequency with a Power of 10 Kw?"
},
{
"role": "assistant",
"content": "SELECT \"branding\" FROM \"fbs_radio_stations\" WHERE \"power\"='10 kw' AND \"location\"='iloilo city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fbs_radio_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power\" text,\n \"location\" text\n);\n\nQuestion: What is the Power of the Frequency with a Callsign of DXLL?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"fbs_radio_stations\" WHERE \"callsign\"='dxll';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fbs_radio_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power\" text,\n \"location\" text\n);\n\nQuestion: What is the Frequency in Davao City?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"fbs_radio_stations\" WHERE \"location\"='davao city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fbs_radio_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power\" text,\n \"location\" text\n);\n\nQuestion: What is the Branding with a Callsign DWLL?"
},
{
"role": "assistant",
"content": "SELECT \"branding\" FROM \"fbs_radio_stations\" WHERE \"callsign\"='dwll';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fbs_radio_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power\" text,\n \"location\" text\n);\n\nQuestion: What is the Branding of the Metro Manila Frequency with a Callsign of DWBL?"
},
{
"role": "assistant",
"content": "SELECT \"branding\" FROM \"fbs_radio_stations\" WHERE \"location\"='metro manila' AND \"callsign\"='dwbl';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fbs_radio_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power\" text,\n \"location\" text\n);\n\nQuestion: What is the Location of the Frequency with a Callsign of DXBL?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"fbs_radio_stations\" WHERE \"callsign\"='dxbl';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chasma\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" real\n);\n\nQuestion: What name in a year after 1997 has a longitude of 213.0e?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"chasma\" WHERE \"year_named\">1997 AND \"longitude\"='213.0e';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chasma\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" real\n);\n\nQuestion: How many years correspond to longitude of 36.8e and diameter greater than 697?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year_named\") FROM \"chasma\" WHERE \"longitude\"='36.8e' AND \"diameter_km\">697;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was the pick # for a center picked before round 6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick_num\") FROM \"nfl_draft\" WHERE \"position\"='center' AND \"round\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"participating_teams\" (\n \"seed\" real,\n \"team\" text,\n \"league\" text,\n \"notes\" text,\n \"eliminated_at\" text\n);\n\nQuestion: What team with a seed value greater than 7 has a note that they were an NCRAA champion?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"participating_teams\" WHERE \"seed\">7 AND \"notes\"='ncraa champion';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"studio_albums\" (\n \"date_of_release\" real,\n \"title\" text,\n \"label\" text,\n \"oricon_peak\" real,\n \"riaa_cert\" text\n);\n\nQuestion: WHAT IS THE ORICON PEAK NUMBER WITH AN ATLANTIC LABEL, SUBHUMAN RACE, LATER THAN 1995?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"oricon_peak\") FROM \"studio_albums\" WHERE \"label\"='atlantic' AND \"title\"='subhuman race' AND \"date_of_release\">1995;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"studio_albums\" (\n \"date_of_release\" real,\n \"title\" text,\n \"label\" text,\n \"oricon_peak\" real,\n \"riaa_cert\" text\n);\n\nQuestion: WHAT LABEL HAD A RELEASE DATE OF 1991?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"studio_albums\" WHERE \"date_of_release\"=1991;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"studio_albums\" (\n \"date_of_release\" real,\n \"title\" text,\n \"label\" text,\n \"oricon_peak\" real,\n \"riaa_cert\" text\n);\n\nQuestion: WHAT IS THE AVERAGE DATE OF RELEASE FOR THICKSKIN?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"date_of_release\") FROM \"studio_albums\" WHERE \"title\"='thickskin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"location\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"nickname\" text,\n \"joined\" real,\n \"left\" real,\n \"current_conference\" text\n);\n\nQuestion: What is the lowest enrollment amount for a year left of 2012 and a current conference of Mid-South?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"enrollment\") FROM \"former_members\" WHERE \"left\"=2012 AND \"current_conference\"='mid-south';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" real,\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"venue\" text\n);\n\nQuestion: Which season was there a game with the score of 1:3 played at the venue of national stadium, maldives?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"season\") FROM \"results\" WHERE \"score\"='1:3' AND \"venue\"='national stadium, maldives';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" real,\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"venue\" text\n);\n\nQuestion: What was the venue of the match where the score was 1:3 and team 2 was binh duong?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"results\" WHERE \"score\"='1:3' AND \"team_2\"='binh duong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" real,\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"venue\" text\n);\n\nQuestion: What was the score of the game when team 2 was club valencia?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"results\" WHERE \"team_2\"='club valencia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" real,\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"venue\" text\n);\n\nQuestion: What was the venue of the match where team 2 was pea and the score was 1:3?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"results\" WHERE \"team_2\"='pea' AND \"score\"='1:3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_top_10_renewable_electricity_produ\" (\n \"country\" text,\n \"year\" real,\n \"total\" real,\n \"hydroelectricity\" real,\n \"wind_power\" real,\n \"biomass_and_waste\" text,\n \"solar\" real\n);\n\nQuestion: In 2011 with a hydroelectricity less than 119.6, what was the solar?"
},
{
"role": "assistant",
"content": "SELECT \"solar\" FROM \"world_top_10_renewable_electricity_produ\" WHERE \"year\"=2011 AND \"hydroelectricity\"<119.6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_top_10_renewable_electricity_produ\" (\n \"country\" text,\n \"year\" real,\n \"total\" real,\n \"hydroelectricity\" real,\n \"wind_power\" real,\n \"biomass_and_waste\" text,\n \"solar\" real\n);\n\nQuestion: What is the minimum hydroelectricity with a less than 116.4 total, and a greater than 18.637 solar?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"hydroelectricity\") FROM \"world_top_10_renewable_electricity_produ\" WHERE \"total\"<116.4 AND \"solar\">18.637;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_top_10_renewable_electricity_produ\" (\n \"country\" text,\n \"year\" real,\n \"total\" real,\n \"hydroelectricity\" real,\n \"wind_power\" real,\n \"biomass_and_waste\" text,\n \"solar\" real\n);\n\nQuestion: In 2011 with a less than 13.333 wind power what is the mean hydroelectricity?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"hydroelectricity\") FROM \"world_top_10_renewable_electricity_produ\" WHERE \"year\">2011 AND \"wind_power\"<13.333;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_top_10_renewable_electricity_produ\" (\n \"country\" text,\n \"year\" real,\n \"total\" real,\n \"hydroelectricity\" real,\n \"wind_power\" real,\n \"biomass_and_waste\" text,\n \"solar\" real\n);\n\nQuestion: What country has a less than 136.1 total and a 0.02 solar?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"world_top_10_renewable_electricity_produ\" WHERE \"total\"<136.1 AND \"solar\"=0.02;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"date\" text,\n \"home\" text,\n \"score\" text,\n \"away\" text,\n \"attendance\" real\n);\n\nQuestion: Home for away of hispano?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"round_13\" WHERE \"away\"='hispano';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Position has a Pick # smaller than 23, and a Player of garrett sutherland?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_four\" WHERE \"pick_num\"<23 AND \"player\"='garrett sutherland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the CFL Team which has a Player of chris evraire?"
},
{
"role": "assistant",
"content": "SELECT \"cfl_team\" FROM \"round_four\" WHERE \"player\"='chris evraire';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name The Player who has a Pick # of 27?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_four\" WHERE \"pick_num\"=27;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the Player who has a CFL Team of toronto?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_four\" WHERE \"cfl_team\"='toronto';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the Pick # which has a Position of lb, and a CFL Team of winnipeg?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pick_num\") FROM \"round_four\" WHERE \"position\"='lb' AND \"cfl_team\"='winnipeg';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: WHAT IS THE SUM OF ATTENDANCE FOR DETROIT, WHEN POINTS ARE LARGER THAN 33?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"game_log\" WHERE \"home\"='detroit' AND \"points\">33;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the location and attendance for the game on December 12?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"date\"='december 12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"receiving\" (\n \"player\" text,\n \"attempts\" real,\n \"yards\" real,\n \"avg_yards\" real,\n \"long\" real,\n \"touchdowns\" real\n);\n\nQuestion: What is the lowest Touchdowns, when Player is Andrew Glover, and when Yards is greater than 281?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"touchdowns\") FROM \"receiving\" WHERE \"player\"='andrew glover' AND \"yards\">281;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"receiving\" (\n \"player\" text,\n \"attempts\" real,\n \"yards\" real,\n \"avg_yards\" real,\n \"long\" real,\n \"touchdowns\" real\n);\n\nQuestion: What is the average Touchdowns, when Yards is less than 293, and when Long is greater than 39?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"touchdowns\") FROM \"receiving\" WHERE \"yards\"<293 AND \"long\">39;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"receiving\" (\n \"player\" text,\n \"attempts\" real,\n \"yards\" real,\n \"avg_yards\" real,\n \"long\" real,\n \"touchdowns\" real\n);\n\nQuestion: What is the total number of Attempts, when Touchdowns is 6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attempts\") FROM \"receiving\" WHERE \"touchdowns\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What is Venue, when Extra is Pentathlon?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"extra\"='pentathlon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What is the highest Year, when Extra is Pentathlon?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"achievements\" WHERE \"extra\"='pentathlon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What is the sum of Year, when Result is 9th?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"achievements\" WHERE \"result\"='9th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What is Tournament, when Result is 2nd, and when Year is 2009?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"achievements\" WHERE \"result\"='2nd' AND \"year\"=2009;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"extra\" text\n);\n\nQuestion: What is Result, when Venue is G\u00f6tzis , Austria?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"achievements\" WHERE \"venue\"='g\u00f6tzis , austria';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What label does Germany have?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"region\"='germany';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What region has the Chrysalis label, and a Catalog of chr 1047?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"release_history\" WHERE \"label\"='chrysalis' AND \"catalog\"='chr 1047';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: When did the United Kingdom format a stereo LP?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"region\"='united kingdom' AND \"format\"='stereo lp';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What region goes along with January 1974?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"release_history\" WHERE \"date\"='january 1974';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the label from 1973 that has a catalog number of l 35023?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"date\"='1973' AND \"catalog\"='l 35023';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"driver\" text,\n \"points\" real,\n \"races\" real,\n \"wins\" text,\n \"second\" text,\n \"third\" text\n);\n\nQuestion: How many wins did the driver with 1 second and more than 12 races have?"
},
{
"role": "assistant",
"content": "SELECT \"wins\" FROM \"season_by_season\" WHERE \"second\"='1' AND \"races\">12;"
}
] |
[
{
"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 \"gp_gs\" real,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: What is the lowest Loss number when the Gain is less than 61 and the Avg/G is 6?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"loss\") FROM \"rushing\" WHERE \"gain\"<61 AND \"avg_g\"=6;"
}
] |
[
{
"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 \"gp_gs\" real,\n \"gain\" real,\n \"loss\" real,\n \"long\" real,\n \"avg_g\" real\n);\n\nQuestion: What is the sum of Avg/G for Dan Dierking when the Loss is 0 and the Gain is more than 34?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"avg_g\") FROM \"rushing\" WHERE \"loss\"=0 AND \"name\"='dan dierking' AND \"gain\">34;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chicago_black_hawks_4_detroit_red_wings_\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the visiting team on April 6?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"chicago_black_hawks_4_detroit_red_wings_\" WHERE \"date\"='april 6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chicago_black_hawks_4_detroit_red_wings_\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the game that led to a 4-3 record?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"chicago_black_hawks_4_detroit_red_wings_\" WHERE \"record\"='4-3';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.