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 \"growth_personnel\" (\n \"date\" text,\n \"total_usaaf\" real,\n \"tot_officers\" real,\n \"tot_enlisted\" real,\n \"num_overseas\" real,\n \"officers_o_s\" real,\n \"enlisted_o_s\" real\n);\n\nQuestion: How many different numbers of Tot enlisted are there on the dates when the number of Enlisted o/s was 801471?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"tot_enlisted\") FROM \"growth_personnel\" WHERE \"enlisted_o_s\"=801471;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"growth_personnel\" (\n \"date\" text,\n \"total_usaaf\" real,\n \"tot_officers\" real,\n \"tot_enlisted\" real,\n \"num_overseas\" real,\n \"officers_o_s\" real,\n \"enlisted_o_s\" real\n);\n\nQuestion: How many tot officers were there on the date when the number of tot enlisted was 329640?"
},
{
"role": "assistant",
"content": "SELECT \"tot_officers\" FROM \"growth_personnel\" WHERE \"tot_enlisted\"=329640;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"growth_personnel\" (\n \"date\" text,\n \"total_usaaf\" real,\n \"tot_officers\" real,\n \"tot_enlisted\" real,\n \"num_overseas\" real,\n \"officers_o_s\" real,\n \"enlisted_o_s\" real\n);\n\nQuestion: How many Tot enlisted were there on the day when the number of total USAAF was 2329534?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"tot_enlisted\") FROM \"growth_personnel\" WHERE \"total_usaaf\"=2329534;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_delegates\" (\n \"represent\" text,\n \"contestant\" text,\n \"age\" real,\n \"height_ft\" text,\n \"height_mtr\" text,\n \"hometown\" text\n);\n\nQuestion: How many contestants where from mitteldeutschland?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"age\") FROM \"official_delegates\" WHERE \"represent\"='Mitteldeutschland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_delegates\" (\n \"represent\" text,\n \"contestant\" text,\n \"age\" real,\n \"height_ft\" text,\n \"height_mtr\" text,\n \"hometown\" text\n);\n\nQuestion: How many meters tall is Ulrike Wolful?"
},
{
"role": "assistant",
"content": "SELECT \"height_mtr\" FROM \"official_delegates\" WHERE \"contestant\"='Ulrike Wolful';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_delegates\" (\n \"represent\" text,\n \"contestant\" text,\n \"age\" real,\n \"height_ft\" text,\n \"height_mtr\" text,\n \"hometown\" text\n);\n\nQuestion: Which country had a contestant that was 1.76 meters tall?"
},
{
"role": "assistant",
"content": "SELECT \"represent\" FROM \"official_delegates\" WHERE \"height_mtr\"='1.76';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_delegates\" (\n \"represent\" text,\n \"contestant\" text,\n \"age\" real,\n \"height_ft\" text,\n \"height_mtr\" text,\n \"hometown\" text\n);\n\nQuestion: What country had a contestant that was 1.70 meters tall?"
},
{
"role": "assistant",
"content": "SELECT \"represent\" FROM \"official_delegates\" WHERE \"height_mtr\"='1.70';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_wimbledon_championships\" (\n \"seed\" real,\n \"rank\" real,\n \"player\" text,\n \"points\" real,\n \"points_defending\" text,\n \"points_won\" real,\n \"new_points\" real,\n \"status\" text\n);\n\nQuestion: If seed number is 2, what is the maximum amount of points?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"2010_wimbledon_championships\" WHERE \"seed\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_wimbledon_championships\" (\n \"seed\" real,\n \"rank\" real,\n \"player\" text,\n \"points\" real,\n \"points_defending\" text,\n \"points_won\" real,\n \"new_points\" real,\n \"status\" text\n);\n\nQuestion: If new points is 1720, what is the status?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"2010_wimbledon_championships\" WHERE \"new_points\"=1720;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23512864_4\" (\n \"election_year\" real,\n \"assembly\" text,\n \"winning_party_coalition\" text,\n \"chief_minister\" text,\n \"speaker\" text\n);\n\nQuestion: Who is the winning party/coalition name in election year 1980?"
},
{
"role": "assistant",
"content": "SELECT \"winning_party_coalition\" FROM \"table1_23512864_4\" WHERE \"election_year\"=1980;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23512864_4\" (\n \"election_year\" real,\n \"assembly\" text,\n \"winning_party_coalition\" text,\n \"chief_minister\" text,\n \"speaker\" text\n);\n\nQuestion: If the speaker is Munu Adhi (2) K. Rajaram, what is the election year maximum?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"election_year\") FROM \"table1_23512864_4\" WHERE \"speaker\"='Munu Adhi (2) K. Rajaram';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23512864_4\" (\n \"election_year\" real,\n \"assembly\" text,\n \"winning_party_coalition\" text,\n \"chief_minister\" text,\n \"speaker\" text\n);\n\nQuestion: If the speaker is R. Muthiah, what is the election year maximum?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"election_year\") FROM \"table1_23512864_4\" WHERE \"speaker\"='R. Muthiah';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23512864_4\" (\n \"election_year\" real,\n \"assembly\" text,\n \"winning_party_coalition\" text,\n \"chief_minister\" text,\n \"speaker\" text\n);\n\nQuestion: What is the name of the speaker if the chief minister is M.G. Ramachandran?"
},
{
"role": "assistant",
"content": "SELECT \"speaker\" FROM \"table1_23512864_4\" WHERE \"chief_minister\"='M.G. Ramachandran';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23512864_4\" (\n \"election_year\" real,\n \"assembly\" text,\n \"winning_party_coalition\" text,\n \"chief_minister\" text,\n \"speaker\" text\n);\n\nQuestion: If the assembly is the sixth assembly, what is the maximum election year?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"election_year\") FROM \"table1_23512864_4\" WHERE \"assembly\"='Sixth Assembly';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tactical_organization\" (\n \"type_of_unit\" text,\n \"type_of_aircraft\" text,\n \"number_of_aircraft\" text,\n \"number_of_crews\" text,\n \"men_per_crew\" text,\n \"total_personnel\" real,\n \"officers\" real,\n \"enlisted\" real\n);\n\nQuestion: Name the number of crews for light bombardment group"
},
{
"role": "assistant",
"content": "SELECT \"number_of_crews\" FROM \"tactical_organization\" WHERE \"type_of_unit\"='Light bombardment group';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tactical_organization\" (\n \"type_of_unit\" text,\n \"type_of_aircraft\" text,\n \"number_of_aircraft\" text,\n \"number_of_crews\" text,\n \"men_per_crew\" text,\n \"total_personnel\" real,\n \"officers\" real,\n \"enlisted\" real\n);\n\nQuestion: What is the aircraft for 21 crews?"
},
{
"role": "assistant",
"content": "SELECT \"type_of_aircraft\" FROM \"tactical_organization\" WHERE \"number_of_crews\"='21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tactical_organization\" (\n \"type_of_unit\" text,\n \"type_of_aircraft\" text,\n \"number_of_aircraft\" text,\n \"number_of_crews\" text,\n \"men_per_crew\" text,\n \"total_personnel\" real,\n \"officers\" real,\n \"enlisted\" real\n);\n\nQuestion: Nam ethe enlisted for troop carrier group"
},
{
"role": "assistant",
"content": "SELECT \"enlisted\" FROM \"tactical_organization\" WHERE \"type_of_unit\"='Troop carrier group';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23513241_5\" (\n \"series_episode\" real,\n \"season_episode\" real,\n \"title\" text,\n \"u_s_viewers_millions\" text,\n \"original_u_s_airdate\" text,\n \"prod_code\" real\n);\n\nQuestion: What was the title when 1.121 million US people watched it?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_23513241_5\" WHERE \"u_s_viewers_millions\"='1.121';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23513241_5\" (\n \"series_episode\" real,\n \"season_episode\" real,\n \"title\" text,\n \"u_s_viewers_millions\" text,\n \"original_u_s_airdate\" text,\n \"prod_code\" real\n);\n\nQuestion: What is the lowest series episode with a production code of 406?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"series_episode\") FROM \"table1_23513241_5\" WHERE \"prod_code\"=406;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23513241_5\" (\n \"series_episode\" real,\n \"season_episode\" real,\n \"title\" text,\n \"u_s_viewers_millions\" text,\n \"original_u_s_airdate\" text,\n \"prod_code\" real\n);\n\nQuestion: List the title of series episode 38."
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_23513241_5\" WHERE \"series_episode\"=38;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23513241_5\" (\n \"series_episode\" real,\n \"season_episode\" real,\n \"title\" text,\n \"u_s_viewers_millions\" text,\n \"original_u_s_airdate\" text,\n \"prod_code\" real\n);\n\nQuestion: How many millions of U.S. viewers watched the episode \"Here Comes the Neighborhood\"?"
},
{
"role": "assistant",
"content": "SELECT \"u_s_viewers_millions\" FROM \"table1_23513241_5\" WHERE \"title\"='\\\"Here Comes the Neighborhood\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_of_the_danish_grand_prix\" (\n \"year\" real,\n \"driver\" text,\n \"constructor\" text,\n \"location\" text,\n \"formula\" text,\n \"report\" text\n);\n\nQuestion: What type of formula did Stirling Moss drive?"
},
{
"role": "assistant",
"content": "SELECT \"formula\" FROM \"winners_of_the_danish_grand_prix\" WHERE \"driver\"='Stirling Moss';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_of_the_danish_grand_prix\" (\n \"year\" real,\n \"driver\" text,\n \"constructor\" text,\n \"location\" text,\n \"formula\" text,\n \"report\" text\n);\n\nQuestion: What year did Randy Lewis drive?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"winners_of_the_danish_grand_prix\" WHERE \"driver\"='Randy Lewis';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_of_the_danish_grand_prix\" (\n \"year\" real,\n \"driver\" text,\n \"constructor\" text,\n \"location\" text,\n \"formula\" text,\n \"report\" text\n);\n\nQuestion: What was the constructor in 1975?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"winners_of_the_danish_grand_prix\" WHERE \"year\"=1975;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"smartphones\" (\n \"code_name\" text,\n \"market_name\" text,\n \"platform\" text,\n \"release_date\" text,\n \"android_version\" text,\n \"system_on_chip\" text,\n \"ram\" text,\n \"rom\" text,\n \"display\" text,\n \"weight\" text,\n \"battery_m_ah\" real,\n \"bluetooth\" text,\n \"wi_fi\" text,\n \"nfc\" text,\n \"camera\" text,\n \"network\" text\n);\n\nQuestion: If the market name is Xperia U, what is the weight?"
},
{
"role": "assistant",
"content": "SELECT \"weight\" FROM \"smartphones\" WHERE \"market_name\"='Xperia U';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"smartphones\" (\n \"code_name\" text,\n \"market_name\" text,\n \"platform\" text,\n \"release_date\" text,\n \"android_version\" text,\n \"system_on_chip\" text,\n \"ram\" text,\n \"rom\" text,\n \"display\" text,\n \"weight\" text,\n \"battery_m_ah\" real,\n \"bluetooth\" text,\n \"wi_fi\" text,\n \"nfc\" text,\n \"camera\" text,\n \"network\" text\n);\n\nQuestion: What is the release date if the code name is Aoba?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"smartphones\" WHERE \"code_name\"='Aoba';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"smartphones\" (\n \"code_name\" text,\n \"market_name\" text,\n \"platform\" text,\n \"release_date\" text,\n \"android_version\" text,\n \"system_on_chip\" text,\n \"ram\" text,\n \"rom\" text,\n \"display\" text,\n \"weight\" text,\n \"battery_m_ah\" real,\n \"bluetooth\" text,\n \"wi_fi\" text,\n \"nfc\" text,\n \"camera\" text,\n \"network\" text\n);\n\nQuestion: If the weight is 126g and the NFC is yes, what is the battery (MAH)?"
},
{
"role": "assistant",
"content": "SELECT \"battery_m_ah\" FROM \"smartphones\" WHERE \"nfc\"='Yes' AND \"weight\"='126g';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"smartphones\" (\n \"code_name\" text,\n \"market_name\" text,\n \"platform\" text,\n \"release_date\" text,\n \"android_version\" text,\n \"system_on_chip\" text,\n \"ram\" text,\n \"rom\" text,\n \"display\" text,\n \"weight\" text,\n \"battery_m_ah\" real,\n \"bluetooth\" text,\n \"wi_fi\" text,\n \"nfc\" text,\n \"camera\" text,\n \"network\" text\n);\n\nQuestion: What is the platform if the weight is 131.5g?"
},
{
"role": "assistant",
"content": "SELECT \"platform\" FROM \"smartphones\" WHERE \"weight\"='131.5g';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"smartphones\" (\n \"code_name\" text,\n \"market_name\" text,\n \"platform\" text,\n \"release_date\" text,\n \"android_version\" text,\n \"system_on_chip\" text,\n \"ram\" text,\n \"rom\" text,\n \"display\" text,\n \"weight\" text,\n \"battery_m_ah\" real,\n \"bluetooth\" text,\n \"wi_fi\" text,\n \"nfc\" text,\n \"camera\" text,\n \"network\" text\n);\n\nQuestion: What is the Android version is the code name is Lotus?"
},
{
"role": "assistant",
"content": "SELECT \"android_version\" FROM \"smartphones\" WHERE \"code_name\"='Lotus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23537091_1\" (\n \"copper_age\" text,\n \"chalcolithic_4500_bc_3300_bc\" text,\n \"early_chalcolithic\" text,\n \"4500_bc_4000_bc\" text,\n \"ubaid_period_in_mesopotamia\" text\n);\n\nQuestion: When middle assyrian empire is the ubaid period in mesopotamia what is the copper age?"
},
{
"role": "assistant",
"content": "SELECT \"copper_age\" FROM \"table1_23537091_1\" WHERE \"ubaid_period_in_mesopotamia\"='Middle Assyrian Empire';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23537091_1\" (\n \"copper_age\" text,\n \"chalcolithic_4500_bc_3300_bc\" text,\n \"early_chalcolithic\" text,\n \"4500_bc_4000_bc\" text,\n \"ubaid_period_in_mesopotamia\" text\n);\n\nQuestion: When hittite old kingdom , minoan eruption is the ubaid period in mesopotamia what is the copper age?"
},
{
"role": "assistant",
"content": "SELECT \"copper_age\" FROM \"table1_23537091_1\" WHERE \"ubaid_period_in_mesopotamia\"='Hittite Old Kingdom , Minoan eruption';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23537091_1\" (\n \"copper_age\" text,\n \"chalcolithic_4500_bc_3300_bc\" text,\n \"early_chalcolithic\" text,\n \"4500_bc_4000_bc\" text,\n \"ubaid_period_in_mesopotamia\" text\n);\n\nQuestion: When hittite middle kingdom , new kingdom of egypt is the ubaid period in mesopotamia how many early chalcolithics are there?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"early_chalcolithic\") FROM \"table1_23537091_1\" WHERE \"ubaid_period_in_mesopotamia\"='Hittite Middle Kingdom , New Kingdom of Egypt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23537091_1\" (\n \"copper_age\" text,\n \"chalcolithic_4500_bc_3300_bc\" text,\n \"early_chalcolithic\" text,\n \"4500_bc_4000_bc\" text,\n \"ubaid_period_in_mesopotamia\" text\n);\n\nQuestion: When the second intermediate period of egypt is the ubaid period in mesopotamia how many early calcolithics are there?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"early_chalcolithic\") FROM \"table1_23537091_1\" WHERE \"ubaid_period_in_mesopotamia\"='Second Intermediate Period of Egypt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_14\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"against\" text,\n \"surface\" text,\n \"opponent\" text,\n \"w_l\" text,\n \"result\" text\n);\n\nQuestion: What was the score against Loic Didavi?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"singles_14\" WHERE \"opponent\"='Loic Didavi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_14\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"against\" text,\n \"surface\" text,\n \"opponent\" text,\n \"w_l\" text,\n \"result\" text\n);\n\nQuestion: Who was played against when there was a loss and in the gi po round?"
},
{
"role": "assistant",
"content": "SELECT \"against\" FROM \"singles_14\" WHERE \"w_l\"='Loss' AND \"round\"='GI PO';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_14\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"against\" text,\n \"surface\" text,\n \"opponent\" text,\n \"w_l\" text,\n \"result\" text\n);\n\nQuestion: What were the w/l when the final score was 2\u20136, 5\u20137, 7\u20136 (11\u20139) , 1\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"w_l\" FROM \"singles_14\" WHERE \"result\"='2\u20136, 5\u20137, 7\u20136 (11\u20139) , 1\u20136';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: When Cleveland was 2nd, great lakes in the regular season what did they get to in the playoffs?"
},
{
"role": "assistant",
"content": "SELECT \"playoffs\" FROM \"year_by_year\" WHERE \"regular_season\"='2nd, Great Lakes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: What is the lowest numbered division Cleveland played in? "
},
{
"role": "assistant",
"content": "SELECT MIN(\"division\") FROM \"year_by_year\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: How did Cleveland do in the regular season in 2006?"
},
{
"role": "assistant",
"content": "SELECT \"regular_season\" FROM \"year_by_year\" WHERE \"year\"=2006;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: How did Cleveland do in the Open Cup in 2009?"
},
{
"role": "assistant",
"content": "SELECT \"open_cup\" FROM \"year_by_year\" WHERE \"year\"=2009;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23575917_6\" (\n \"episode\" text,\n \"first_broadcast\" text,\n \"davids_team\" text,\n \"lees_team\" text,\n \"scores\" text\n);\n\nQuestion: When victoria coren and rhod gilbert are both on the lees team what is the score?"
},
{
"role": "assistant",
"content": "SELECT \"scores\" FROM \"table1_23575917_6\" WHERE \"lees_team\"='Victoria Coren and Rhod Gilbert';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23575917_6\" (\n \"episode\" text,\n \"first_broadcast\" text,\n \"davids_team\" text,\n \"lees_team\" text,\n \"scores\" text\n);\n\nQuestion: When david o'doherty and katherine parkinson are both on the davids team when is the first broadcast?"
},
{
"role": "assistant",
"content": "SELECT \"first_broadcast\" FROM \"table1_23575917_6\" WHERE \"davids_team\"='David O''Doherty and Katherine Parkinson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23575917_6\" (\n \"episode\" text,\n \"first_broadcast\" text,\n \"davids_team\" text,\n \"lees_team\" text,\n \"scores\" text\n);\n\nQuestion: When bill oddie and frank skinner are both on the davids team what is the episode?"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"table1_23575917_6\" WHERE \"davids_team\"='Bill Oddie and Frank Skinner';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23575917_6\" (\n \"episode\" text,\n \"first_broadcast\" text,\n \"davids_team\" text,\n \"lees_team\" text,\n \"scores\" text\n);\n\nQuestion: When kevin bridges and katy wix are both on the less team what is the score?"
},
{
"role": "assistant",
"content": "SELECT \"scores\" FROM \"table1_23575917_6\" WHERE \"lees_team\"='Kevin Bridges and Katy Wix';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23575917_8\" (\n \"episode\" text,\n \"first_broadcast\" text,\n \"davids_team\" text,\n \"lees_team\" text,\n \"scores\" text\n);\n\nQuestion: How many shows did team David consist of vernon kay and dara \u00f3 briain"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"episode\") FROM \"table1_23575917_8\" WHERE \"davids_team\"='Vernon Kay and Dara \u00d3 Briain';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"represented\" text,\n \"contestant\" text,\n \"age\" real,\n \"height_in\" text,\n \"height_cm\" real,\n \"hometown\" text\n);\n\nQuestion: If the hometown is Windhoek, what is the represented?"
},
{
"role": "assistant",
"content": "SELECT \"represented\" FROM \"contestants\" WHERE \"hometown\"='Windhoek';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"represented\" text,\n \"contestant\" text,\n \"age\" real,\n \"height_in\" text,\n \"height_cm\" real,\n \"hometown\" text\n);\n\nQuestion: If the height in inches is 5'7\", what is the represented?"
},
{
"role": "assistant",
"content": "SELECT \"represented\" FROM \"contestants\" WHERE \"height_in\"='5''7\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"represented\" text,\n \"contestant\" text,\n \"age\" real,\n \"height_in\" text,\n \"height_cm\" real,\n \"hometown\" text\n);\n\nQuestion: If the hometown is Omuthiya, what is the contestant name?"
},
{
"role": "assistant",
"content": "SELECT \"contestant\" FROM \"contestants\" WHERE \"hometown\"='Omuthiya';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"represented\" text,\n \"contestant\" text,\n \"age\" real,\n \"height_in\" text,\n \"height_cm\" real,\n \"hometown\" text\n);\n\nQuestion: What is the height in inches if the represented is Erongo?"
},
{
"role": "assistant",
"content": "SELECT \"height_in\" FROM \"contestants\" WHERE \"represented\"='Erongo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What week did September 29 fall in?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"date\"='September 29';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score on the October 28 game?"
},
{
"role": "assistant",
"content": "SELECT \"final_score\" FROM \"schedule\" WHERE \"date\"='October 28';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score on September 20?"
},
{
"role": "assistant",
"content": "SELECT \"final_score\" FROM \"schedule\" WHERE \"date\"='September 20';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_ironclad_of_chile_and_peru_at_the_begi\" (\n \"warship\" text,\n \"tons_l_ton\" real,\n \"horse_power\" real,\n \"speed_knots\" text,\n \"armour_inch\" text,\n \"main_artillery\" text,\n \"built_year\" real\n);\n\nQuestion: What's Blanco Encalada's main artillery?"
},
{
"role": "assistant",
"content": "SELECT \"main_artillery\" FROM \"s_ironclad_of_chile_and_peru_at_the_begi\" WHERE \"warship\"='Blanco Encalada';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_ironclad_of_chile_and_peru_at_the_begi\" (\n \"warship\" text,\n \"tons_l_ton\" real,\n \"horse_power\" real,\n \"speed_knots\" text,\n \"armour_inch\" text,\n \"main_artillery\" text,\n \"built_year\" real\n);\n\nQuestion: How many different horse-powers does the Cochrane have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"horse_power\") FROM \"s_ironclad_of_chile_and_peru_at_the_begi\" WHERE \"warship\"='Cochrane';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_ironclad_of_chile_and_peru_at_the_begi\" (\n \"warship\" text,\n \"tons_l_ton\" real,\n \"horse_power\" real,\n \"speed_knots\" text,\n \"armour_inch\" text,\n \"main_artillery\" text,\n \"built_year\" real\n);\n\nQuestion: What warship has horse-power of 1500?"
},
{
"role": "assistant",
"content": "SELECT \"warship\" FROM \"s_ironclad_of_chile_and_peru_at_the_begi\" WHERE \"horse_power\"=1500;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_ironclad_of_chile_and_peru_at_the_begi\" (\n \"warship\" text,\n \"tons_l_ton\" real,\n \"horse_power\" real,\n \"speed_knots\" text,\n \"armour_inch\" text,\n \"main_artillery\" text,\n \"built_year\" real\n);\n\nQuestion: How much does the Independencia weight?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"tons_l_ton\") FROM \"s_ironclad_of_chile_and_peru_at_the_begi\" WHERE \"warship\"='Independencia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_ironclad_of_chile_and_peru_at_the_begi\" (\n \"warship\" text,\n \"tons_l_ton\" real,\n \"horse_power\" real,\n \"speed_knots\" text,\n \"armour_inch\" text,\n \"main_artillery\" text,\n \"built_year\" real\n);\n\nQuestion: In how many different years was the warship that weights 1130 tons built?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"built_year\") FROM \"s_ironclad_of_chile_and_peru_at_the_begi\" WHERE \"tons_l_ton\"=1130;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"neighbourhood\" text,\n \"pct_0_19\" text,\n \"pct_20_39\" text,\n \"pct_40_59\" text,\n \"pct_60_74\" text,\n \"pct_75\" text\n);\n\nQuestion: What is every value for % 20-39 if % 60-74 is 10,46%?"
},
{
"role": "assistant",
"content": "SELECT \"pct_20_39\" FROM \"external_links\" WHERE \"pct_60_74\"='10,46%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"neighbourhood\" text,\n \"pct_0_19\" text,\n \"pct_20_39\" text,\n \"pct_40_59\" text,\n \"pct_60_74\" text,\n \"pct_75\" text\n);\n\nQuestion: What is every value for % 40-59 if % 60-74 is 12,42%?"
},
{
"role": "assistant",
"content": "SELECT \"pct_40_59\" FROM \"external_links\" WHERE \"pct_60_74\"='12,42%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"neighbourhood\" text,\n \"pct_0_19\" text,\n \"pct_20_39\" text,\n \"pct_40_59\" text,\n \"pct_60_74\" text,\n \"pct_75\" text\n);\n\nQuestion: What is every value for % 75 + if % 0-19 is 19,75%?"
},
{
"role": "assistant",
"content": "SELECT \"pct_75\" FROM \"external_links\" WHERE \"pct_0_19\"='19,75%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"neighbourhood\" text,\n \"pct_0_19\" text,\n \"pct_20_39\" text,\n \"pct_40_59\" text,\n \"pct_60_74\" text,\n \"pct_75\" text\n);\n\nQuestion: What is every value for % 20-39 if % 0-19 is 21,11%?"
},
{
"role": "assistant",
"content": "SELECT \"pct_20_39\" FROM \"external_links\" WHERE \"pct_0_19\"='21,11%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"neighbourhood\" text,\n \"pct_0_19\" text,\n \"pct_20_39\" text,\n \"pct_40_59\" text,\n \"pct_60_74\" text,\n \"pct_75\" text\n);\n\nQuestion: What is every value for % 20-39 if % 0-19 is 21,11%?"
},
{
"role": "assistant",
"content": "SELECT \"pct_20_39\" FROM \"external_links\" WHERE \"pct_0_19\"='21,11%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"neighbourhood\" text,\n \"pct_0_19\" text,\n \"pct_20_39\" text,\n \"pct_40_59\" text,\n \"pct_60_74\" text,\n \"pct_75\" text\n);\n\nQuestion: What is every value for % 40-59 if % 60-74 is 12,40%?"
},
{
"role": "assistant",
"content": "SELECT \"pct_40_59\" FROM \"external_links\" WHERE \"pct_60_74\"='12,40%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wooden_s_steamboat_of_chile_and_peru_at_\" (\n \"warship\" text,\n \"tons_l_ton\" text,\n \"horse_power\" real,\n \"speed_knots\" real,\n \"main_artillery\" text,\n \"built_year\" real\n);\n\nQuestion: How man horse power did the ship covadonga have?"
},
{
"role": "assistant",
"content": "SELECT \"horse_power\" FROM \"wooden_s_steamboat_of_chile_and_peru_at_\" WHERE \"warship\"='Covadonga';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wooden_s_steamboat_of_chile_and_peru_at_\" (\n \"warship\" text,\n \"tons_l_ton\" text,\n \"horse_power\" real,\n \"speed_knots\" real,\n \"main_artillery\" text,\n \"built_year\" real\n);\n\nQuestion: What is the primary artillery for the 1,051 ships?"
},
{
"role": "assistant",
"content": "SELECT \"main_artillery\" FROM \"wooden_s_steamboat_of_chile_and_peru_at_\" WHERE \"tons_l_ton\"='1,051';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wooden_s_steamboat_of_chile_and_peru_at_\" (\n \"warship\" text,\n \"tons_l_ton\" text,\n \"horse_power\" real,\n \"speed_knots\" real,\n \"main_artillery\" text,\n \"built_year\" real\n);\n\nQuestion: List the maximum speed for the 1.150 ton ships?"
},
{
"role": "assistant",
"content": "SELECT \"speed_knots\" FROM \"wooden_s_steamboat_of_chile_and_peru_at_\" WHERE \"tons_l_ton\"='1.150';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wooden_s_steamboat_of_chile_and_peru_at_\" (\n \"warship\" text,\n \"tons_l_ton\" text,\n \"horse_power\" real,\n \"speed_knots\" real,\n \"main_artillery\" text,\n \"built_year\" real\n);\n\nQuestion: List the ship with 1x115-2x70-2x12-pounders for primary artillery."
},
{
"role": "assistant",
"content": "SELECT \"warship\" FROM \"wooden_s_steamboat_of_chile_and_peru_at_\" WHERE \"main_artillery\"='1x115-2x70-2x12-pounders';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which location has the date of October 28?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"schedule\" WHERE \"date\"='October 28';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the final score when 22210 is the attendance?"
},
{
"role": "assistant",
"content": "SELECT \"final_score\" FROM \"schedule\" WHERE \"attendance\"=22210;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which opponents are on the date July 22?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='July 22';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which opponents are on the date September 5?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='September 5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the final score when July 16 is the date?"
},
{
"role": "assistant",
"content": "SELECT \"final_score\" FROM \"schedule\" WHERE \"date\"='July 16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: On which date is Taylor Field the location?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"location\"='Taylor Field';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: Name the number of regular season for 2007"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"regular_season\") FROM \"year_by_year\" WHERE \"year\"=2007;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: Name the most year for conference finals"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"year_by_year\" WHERE \"playoffs\"='Conference Finals';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: Name the regular season for final playoffs"
},
{
"role": "assistant",
"content": "SELECT \"regular_season\" FROM \"year_by_year\" WHERE \"playoffs\"='Final';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: Name the least division"
},
{
"role": "assistant",
"content": "SELECT MIN(\"division\") FROM \"year_by_year\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: Name the regular season for usisl d-3 pro league did not qualify"
},
{
"role": "assistant",
"content": "SELECT \"regular_season\" FROM \"year_by_year\" WHERE \"league\"='USISL D-3 Pro League' AND \"playoffs\"='Did not qualify';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What was the position of the player from Saskatchewan Roughriders?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_three\" WHERE \"cfl_team\"='Saskatchewan Roughriders';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What CFL team was the player playing on SB position drafted for?"
},
{
"role": "assistant",
"content": "SELECT \"cfl_team\" FROM \"round_three\" WHERE \"position\"='SB';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What was Michael Shaver's position?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_three\" WHERE \"player\"='Michael Shaver';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: How many different players got drafted for the Ottawa Renegades?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"player\") FROM \"round_three\" WHERE \"cfl_team\"='Ottawa Renegades';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What's Doug Borden's position?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_three\" WHERE \"player\"='Doug Borden';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_country\" (\n \"country\" text,\n \"pct_of_all_immigrants_2008\" text,\n \"pct_of_all_immigrants_2007\" text,\n \"pct_of_all_immigrants_2006\" text,\n \"pct_of_all_immigrants_2005\" text,\n \"pct_of_all_immigrants_2004\" text\n);\n\nQuestion: What's the percentage of all immigrants in 2007 in the country with 1.7% of all immigrants in 2008?"
},
{
"role": "assistant",
"content": "SELECT \"pct_of_all_immigrants_2007\" FROM \"by_country\" WHERE \"pct_of_all_immigrants_2008\"='1.7%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_country\" (\n \"country\" text,\n \"pct_of_all_immigrants_2008\" text,\n \"pct_of_all_immigrants_2007\" text,\n \"pct_of_all_immigrants_2006\" text,\n \"pct_of_all_immigrants_2005\" text,\n \"pct_of_all_immigrants_2004\" text\n);\n\nQuestion: How many different percentages of immigrants in 2006 can there be for Morocco?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pct_of_all_immigrants_2006\") FROM \"by_country\" WHERE \"country\"='Morocco';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_country\" (\n \"country\" text,\n \"pct_of_all_immigrants_2008\" text,\n \"pct_of_all_immigrants_2007\" text,\n \"pct_of_all_immigrants_2006\" text,\n \"pct_of_all_immigrants_2005\" text,\n \"pct_of_all_immigrants_2004\" text\n);\n\nQuestion: What's the percentage of immigrants in 2004 in the country with 2.1% of the immigrants in 2006?"
},
{
"role": "assistant",
"content": "SELECT \"pct_of_all_immigrants_2004\" FROM \"by_country\" WHERE \"pct_of_all_immigrants_2006\"='2.1%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_country\" (\n \"country\" text,\n \"pct_of_all_immigrants_2008\" text,\n \"pct_of_all_immigrants_2007\" text,\n \"pct_of_all_immigrants_2006\" text,\n \"pct_of_all_immigrants_2005\" text,\n \"pct_of_all_immigrants_2004\" text\n);\n\nQuestion: What's the percentage of the immigrants in 2007 in the country with 14.1% of the immigrants in 2006?"
},
{
"role": "assistant",
"content": "SELECT \"pct_of_all_immigrants_2007\" FROM \"by_country\" WHERE \"pct_of_all_immigrants_2006\"='14.1%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_country\" (\n \"country\" text,\n \"pct_of_all_immigrants_2008\" text,\n \"pct_of_all_immigrants_2007\" text,\n \"pct_of_all_immigrants_2006\" text,\n \"pct_of_all_immigrants_2005\" text,\n \"pct_of_all_immigrants_2004\" text\n);\n\nQuestion: How many different percentages of immigrants are there for the year of 2007 in the countries with 1.2% of the immigrants in the year of 2005?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pct_of_all_immigrants_2007\") FROM \"by_country\" WHERE \"pct_of_all_immigrants_2005\"='1.2%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_doubles_6_4_titles_2_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What was the outcome in the championship where the final score was 6\u20137(1), 2\u20136, 6\u20134, 7\u20135, 6\u20137(2)?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"men_s_doubles_6_4_titles_2_runner_ups\" WHERE \"score_in_the_final\"='6\u20137(1), 2\u20136, 6\u20134, 7\u20135, 6\u20137(2)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_doubles_6_4_titles_2_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Who were the opponents in the final where the score was 6\u20134, 2\u20136, 6\u20134, 7\u20136(3)?"
},
{
"role": "assistant",
"content": "SELECT \"opponents_in_the_final\" FROM \"men_s_doubles_6_4_titles_2_runner_ups\" WHERE \"score_in_the_final\"='6\u20134, 2\u20136, 6\u20134, 7\u20136(3)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_doubles_6_4_titles_2_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which championship had a final score of 6\u20134, 2\u20136, 6\u20134, 7\u20136(3)?"
},
{
"role": "assistant",
"content": "SELECT \"championship\" FROM \"men_s_doubles_6_4_titles_2_runner_ups\" WHERE \"score_in_the_final\"='6\u20134, 2\u20136, 6\u20134, 7\u20136(3)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_4\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"partnering\" text,\n \"opponents_in_final\" text,\n \"score_in_final\" text\n);\n\nQuestion: What was the score in the final in 1988?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_final\" FROM \"wins_4\" WHERE \"year\"=1988;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"paula_radcliffe_gbr\" text,\n \"2_15_25\" text,\n \"london_great_britain\" text,\n \"13_april_2003\" text\n);\n\nQuestion: Name the london, great britain for 2:20:57"
},
{
"role": "assistant",
"content": "SELECT \"london_great_britain\" FROM \"records\" WHERE \"2_15_25\"='2:20:57';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"paula_radcliffe_gbr\" text,\n \"2_15_25\" text,\n \"london_great_britain\" text,\n \"13_april_2003\" text\n);\n\nQuestion: Name the world record for 26 april 2009"
},
{
"role": "assistant",
"content": "SELECT \"world_record\" FROM \"records\" WHERE \"13_april_2003\"='26 April 2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"paula_radcliffe_gbr\" text,\n \"2_15_25\" text,\n \"london_great_britain\" text,\n \"13_april_2003\" text\n);\n\nQuestion: Name the london great britain for championship record"
},
{
"role": "assistant",
"content": "SELECT \"london_great_britain\" FROM \"records\" WHERE \"world_record\"='Championship record';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"paula_radcliffe_gbr\" text,\n \"2_15_25\" text,\n \"london_great_britain\" text,\n \"13_april_2003\" text\n);\n\nQuestion: Name the total number of african record"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"paula_radcliffe_gbr\") FROM \"records\" WHERE \"world_record\"='African record';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23649244_1\" (\n \"song_1_title\" text,\n \"artist_1\" text,\n \"song_2_title\" text,\n \"artist_2\" text,\n \"mix_artist\" text,\n \"guitar_part\" text,\n \"level\" text\n);\n\nQuestion: Who are thebmix artists when tears for fears is artist 1 and eric prydz is artist 2?"
},
{
"role": "assistant",
"content": "SELECT \"mix_artist\" FROM \"table1_23649244_1\" WHERE \"artist_1\"='Tears for Fears' AND \"artist_2\"='Eric Prydz';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23649244_1\" (\n \"song_1_title\" text,\n \"artist_1\" text,\n \"song_2_title\" text,\n \"artist_2\" text,\n \"mix_artist\" text,\n \"guitar_part\" text,\n \"level\" text\n);\n\nQuestion: Which level has marvin gaye as artist 1 and david bowie as artist 2?"
},
{
"role": "assistant",
"content": "SELECT \"level\" FROM \"table1_23649244_1\" WHERE \"artist_1\"='Marvin Gaye' AND \"artist_2\"='David Bowie';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23649244_1\" (\n \"song_1_title\" text,\n \"artist_1\" text,\n \"song_2_title\" text,\n \"artist_2\" text,\n \"mix_artist\" text,\n \"guitar_part\" text,\n \"level\" text\n);\n\nQuestion: Which level has grandmaster flash as artist 1?"
},
{
"role": "assistant",
"content": "SELECT \"level\" FROM \"table1_23649244_1\" WHERE \"artist_1\"='Grandmaster Flash';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_23649244_1\" (\n \"song_1_title\" text,\n \"artist_1\" text,\n \"song_2_title\" text,\n \"artist_2\" text,\n \"mix_artist\" text,\n \"guitar_part\" text,\n \"level\" text\n);\n\nQuestion: Which level has wale as artist 1?"
},
{
"role": "assistant",
"content": "SELECT \"level\" FROM \"table1_23649244_1\" WHERE \"artist_1\"='Wale';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.