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 \"most_goals_in_a_game\" (\n \"rank\" text,\n \"score\" text,\n \"player\" text,\n \"club\" text,\n \"opponent\" text,\n \"year\" text,\n \"round\" text,\n \"venue\" text\n);\n\nQuestion: In Round 19, where did Tony Lockett play?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"most_goals_in_a_game\" WHERE \"round\"='19' AND \"player\"='tony lockett';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_goals_in_a_game\" (\n \"rank\" text,\n \"score\" text,\n \"player\" text,\n \"club\" text,\n \"opponent\" text,\n \"year\" text,\n \"round\" text,\n \"venue\" text\n);\n\nQuestion: Who is the opponent in 1992?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"most_goals_in_a_game\" WHERE \"year\"='1992';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_goals_in_a_game\" (\n \"rank\" text,\n \"score\" text,\n \"player\" text,\n \"club\" text,\n \"opponent\" text,\n \"year\" text,\n \"round\" text,\n \"venue\" text\n);\n\nQuestion: What club had a score of 18.1?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"most_goals_in_a_game\" WHERE \"score\"='18.1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"br_sr_no\" text,\n \"sr_name\" text,\n \"lswr_no\" real,\n \"builder\" text,\n \"built\" real,\n \"to_io_w\" real,\n \"withdrawn\" real\n);\n\nQuestion: What is the number for year built of W27 that was withdrawn in 1967 with a To LoW year earlier than 1926?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"built\") FROM \"references\" WHERE \"withdrawn\"=1967 AND \"br_sr_no\"='w27' AND \"to_io_w\"<1926;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"br_sr_no\" text,\n \"sr_name\" text,\n \"lswr_no\" real,\n \"builder\" text,\n \"built\" real,\n \"to_io_w\" real,\n \"withdrawn\" real\n);\n\nQuestion: What is the number of the year withdrawn for a LSWR number greater than 210 and a To LoW year of 1923?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"withdrawn\") FROM \"references\" WHERE \"lswr_no\">210 AND \"to_io_w\"=1923;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"br_sr_no\" text,\n \"sr_name\" text,\n \"lswr_no\" real,\n \"builder\" text,\n \"built\" real,\n \"to_io_w\" real,\n \"withdrawn\" real\n);\n\nQuestion: What is the BR/SR number of Freshwater which was withdrawn in 1967 and built before 1892 with a To LoW year after 1927?"
},
{
"role": "assistant",
"content": "SELECT \"br_sr_no\" FROM \"references\" WHERE \"withdrawn\"=1967 AND \"built\"<1892 AND \"to_io_w\">1927 AND \"sr_name\"='freshwater';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" text,\n \"finish\" text\n);\n\nQuestion: Name the engine for year less than 1977"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"indy_500_results\" WHERE \"year\"<1977;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" text,\n \"finish\" text\n);\n\nQuestion: Name the start for year less than 1977"
},
{
"role": "assistant",
"content": "SELECT \"start\" FROM \"indy_500_results\" WHERE \"year\"<1977;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" text,\n \"finish\" text\n);\n\nQuestion: Name the least year for start of 17th"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"indy_500_results\" WHERE \"start\"='17th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" text,\n \"finish\" text\n);\n\nQuestion: Name the start for finish being 21st"
},
{
"role": "assistant",
"content": "SELECT \"start\" FROM \"indy_500_results\" WHERE \"finish\"='21st';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television\" (\n \"digital_channel\" text,\n \"digital_psip\" real,\n \"rogers_cable_ottawa\" real,\n \"vid_otron_gatineau\" real,\n \"call_sign\" text,\n \"network\" text\n);\n\nQuestion: What is the Call sign of the Omni television network with a Digitial PSIP of 14.1?"
},
{
"role": "assistant",
"content": "SELECT \"call_sign\" FROM \"television\" WHERE \"network\"='omni television' AND \"digital_psip\"=14.1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television\" (\n \"digital_channel\" text,\n \"digital_psip\" real,\n \"rogers_cable_ottawa\" real,\n \"vid_otron_gatineau\" real,\n \"call_sign\" text,\n \"network\" text\n);\n\nQuestion: What's the total number of Rogers Cable (Ottawa) channels that have a Digital PSIP greater than 9.1, and a Vid\u00e9otron (Gatineau) of channel 14?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rogers_cable_ottawa\") FROM \"television\" WHERE \"digital_psip\">9.1 AND \"vid_otron_gatineau\"=14;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television\" (\n \"digital_channel\" text,\n \"digital_psip\" real,\n \"rogers_cable_ottawa\" real,\n \"vid_otron_gatineau\" real,\n \"call_sign\" text,\n \"network\" text\n);\n\nQuestion: Which Network is on a Vid\u00e9otron (Gatineau) channel lower than 8 and a Rogers Cable (Ottawa) channel lower than 8 and has a Call Sign of cjoh-dt?"
},
{
"role": "assistant",
"content": "SELECT \"network\" FROM \"television\" WHERE \"vid_otron_gatineau\"<8 AND \"rogers_cable_ottawa\"<8 AND \"call_sign\"='cjoh-dt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the record after the fight that lasted 8:17?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='8:17';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the result of the fight with Tony Halme?"
},
{
"role": "assistant",
"content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='tony halme';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score of the game when the record was 63-59 and the attendance was larger than 32,027?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"attendance\">'32,027' AND \"record\"='63-59';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who did they play on August 26?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='august 26';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the attendance for the game on August 16?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"game_log\" WHERE \"date\"='august 16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What team did Johnson (11-7) play for?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"loss\"='johnson (11-7)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" real\n);\n\nQuestion: What is the highest number of points the cosworth straight-4 engine scored?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pts\") FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='cosworth straight-4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" real\n);\n\nQuestion: What is the latest year that shadow racing team scored more than 0 points?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='shadow racing team' AND \"pts\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What round was held in palavas-les-flots , herault , france?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"location\"='palavas-les-flots , herault , france';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who played in the men's singles during the tournament where Ragna Ingolfsdottir played in the women's singles?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_singles\" FROM \"previous_winners\" WHERE \"women_s_singles\"='ragna ingolfsdottir';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the men's doubles in 1995?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_doubles\" FROM \"previous_winners\" WHERE \"year\"=1995;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_32\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the second leg that Valencia was on?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"round_of_32\" WHERE \"team_2\"='valencia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: Name the loss with record of 14-19"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='14-19';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: Name the score with record of 17-27"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='17-27';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: Name the opponent with record of 12-18"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='12-18';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Who was the General classification when Pascal Richard was the winner?"
},
{
"role": "assistant",
"content": "SELECT \"general_classification\" FROM \"classification_leadership_by_stage\" WHERE \"winner\"='pascal richard';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: Who had the Points classification for Stage 13?"
},
{
"role": "assistant",
"content": "SELECT \"points_classification\" FROM \"classification_leadership_by_stage\" WHERE \"stage\"='13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: What was the Stage when Pascal Richard had the Mountains classification and Vladimir Poulnikov won?"
},
{
"role": "assistant",
"content": "SELECT \"stage\" FROM \"classification_leadership_by_stage\" WHERE \"mountains_classification\"='pascal richard' AND \"winner\"='vladimir poulnikov';"
}
]
|
[
{
"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: What's the total score of Danny Edwards?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"score\") FROM \"first_round\" WHERE \"player\"='danny edwards';"
}
]
|
[
{
"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: Where was the place in Australia that had a score of 70?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"first_round\" WHERE \"score\"=70 AND \"country\"='australia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_8\" (\n \"episode\" text,\n \"first_aired\" text,\n \"entrepreneur_s\" text,\n \"company_or_product_name\" text,\n \"money_requested\" text,\n \"investing_dragon_s\" text\n);\n\nQuestion: The entrepreneur Adam Weaver was featured in which episode?"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"series_8\" WHERE \"entrepreneur_s\"='adam weaver';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_8\" (\n \"episode\" text,\n \"first_aired\" text,\n \"entrepreneur_s\" text,\n \"company_or_product_name\" text,\n \"money_requested\" text,\n \"investing_dragon_s\" text\n);\n\nQuestion: The entrepreneur Layla Bennett was featured in which episode?"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"series_8\" WHERE \"entrepreneur_s\"='layla bennett';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"with_population_above_10_million\" (\n \"rank\" real,\n \"country_region\" text,\n \"population\" real,\n \"area_km_2\" real,\n \"density_pop_per_km_2\" real\n);\n\nQuestion: What is the lowest rank of the region with an area larger than 3,185,263 and a population of 16,760,000?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"with_population_above_10_million\" WHERE \"area_km_2\">'3,185,263' AND \"population\"='16,760,000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"with_population_above_10_million\" (\n \"rank\" real,\n \"country_region\" text,\n \"population\" real,\n \"area_km_2\" real,\n \"density_pop_per_km_2\" real\n);\n\nQuestion: What is the lowest area of the region with a population less than 22,955,395 in Bangladesh with a density less than 1034?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"area_km_2\") FROM \"with_population_above_10_million\" WHERE \"population\"<'22,955,395' AND \"country_region\"='bangladesh' AND \"density_pop_per_km_2\"<1034;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"with_population_above_10_million\" (\n \"rank\" real,\n \"country_region\" text,\n \"population\" real,\n \"area_km_2\" real,\n \"density_pop_per_km_2\" real\n);\n\nQuestion: What is the highest population of the region with a rank bigger than 9?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"population\") FROM \"with_population_above_10_million\" WHERE \"rank\">9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"with_population_above_10_million\" (\n \"rank\" real,\n \"country_region\" text,\n \"population\" real,\n \"area_km_2\" real,\n \"density_pop_per_km_2\" real\n);\n\nQuestion: What is the average population of the region with a density less than 487, a rank of 9, and an area larger than 377,944?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"population\") FROM \"with_population_above_10_million\" WHERE \"density_pop_per_km_2\"<487 AND \"rank\"=9 AND \"area_km_2\">'377,944';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"with_population_above_10_million\" (\n \"rank\" real,\n \"country_region\" text,\n \"population\" real,\n \"area_km_2\" real,\n \"density_pop_per_km_2\" real\n);\n\nQuestion: What is the rank of the region with an area larger than 41,526, a density greater than 345, and a population larger than 48,456,369?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"with_population_above_10_million\" WHERE \"area_km_2\">'41,526' AND \"density_pop_per_km_2\">345 AND \"population\">'48,456,369';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a_link_express\" (\n \"model\" text,\n \"codename\" text,\n \"released\" text,\n \"fab_nm\" real,\n \"sata\" text,\n \"usb_2_0_1_1\" text,\n \"usb_3_0\" text,\n \"parallel_ata_1\" text,\n \"raid\" real,\n \"gb_ethernet_mac\" text,\n \"package\" text,\n \"tdp_w\" real\n);\n\nQuestion: What is the TDP (w) of the chipset with a codename sb850?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"tdp_w\") FROM \"a_link_express\" WHERE \"codename\"='sb850';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"a_link_express\" (\n \"model\" text,\n \"codename\" text,\n \"released\" text,\n \"fab_nm\" real,\n \"sata\" text,\n \"usb_2_0_1_1\" text,\n \"usb_3_0\" text,\n \"parallel_ata_1\" text,\n \"raid\" real,\n \"gb_ethernet_mac\" text,\n \"package\" text,\n \"tdp_w\" real\n);\n\nQuestion: What is the average Fab (nm) of the chipset released in q4 2008 with a RAID larger than 0,1,5,10?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"fab_nm\") FROM \"a_link_express\" WHERE \"released\"='q4 2008' AND \"raid\">'0,1,5,10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campus_superstar_2007\" (\n \"round\" text,\n \"name\" text,\n \"song\" text,\n \"score\" real,\n \"status\" text\n);\n\nQuestion: Which round is a lower score than 21.5?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"campus_superstar_2007\" WHERE \"score\"<21.5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campus_superstar_2007\" (\n \"round\" text,\n \"name\" text,\n \"song\" text,\n \"score\" real,\n \"status\" text\n);\n\nQuestion: Which round status is in with this song: \u53f6\u826f\u4fca - \u7231\u4f60\u4e0d\u662f\u7231\u7ed9\u522b\u4eba\u770b?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"campus_superstar_2007\" WHERE \"status\"='in' AND \"song\"='\u53f6\u826f\u4fca - \u7231\u4f60\u4e0d\u662f\u7231\u7ed9\u522b\u4eba\u770b';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campus_superstar_2007\" (\n \"round\" text,\n \"name\" text,\n \"song\" text,\n \"score\" real,\n \"status\" text\n);\n\nQuestion: Which status accompanies the score 21.5?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"campus_superstar_2007\" WHERE \"score\"=21.5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campus_superstar_2007\" (\n \"round\" text,\n \"name\" text,\n \"song\" text,\n \"score\" real,\n \"status\" text\n);\n\nQuestion: Wjat score is greater than 22 with this song: \u6797\u4fca\u6770 - \u6728\u4e43\u4f0a?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"campus_superstar_2007\" WHERE \"score\">22 AND \"song\"='\u6797\u4fca\u6770 - \u6728\u4e43\u4f0a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campus_superstar_2007\" (\n \"round\" text,\n \"name\" text,\n \"song\" text,\n \"score\" real,\n \"status\" text\n);\n\nQuestion: What round has this song: \u9676\u5586\u3001\u8521\u4f9d\u6797 - \u4eca\u5929\u4f60\u8981\u5ac1\u7ed9\u6211/\u66f9\u683c - \u4e16\u754c\u552f\u4e00\u7684\u4f60?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"campus_superstar_2007\" WHERE \"song\"='\u9676\u5586\u3001\u8521\u4f9d\u6797 - \u4eca\u5929\u4f60\u8981\u5ac1\u7ed9\u6211/\u66f9\u683c - \u4e16\u754c\u552f\u4e00\u7684\u4f60';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"melodifestivalen_1959\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"songwriters\" text,\n \"points\" real,\n \"place\" text\n);\n\nQuestion: What is the artist with less than a 2 draw?"
},
{
"role": "assistant",
"content": "SELECT \"artist\" FROM \"melodifestivalen_1959\" WHERE \"draw\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"twenty_five_cents\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" text,\n \"issue_price\" real,\n \"special_notes\" text\n);\n\nQuestion: What is the average issue price with from Toronto maple leafs gift set, and a Mintage of 3527?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"issue_price\") FROM \"twenty_five_cents\" WHERE \"special_notes\"='from toronto maple leafs gift set' AND \"mintage\"='3527';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"twenty_five_cents\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" text,\n \"issue_price\" real,\n \"special_notes\" text\n);\n\nQuestion: What theme has a mintage of 3527?"
},
{
"role": "assistant",
"content": "SELECT \"theme\" FROM \"twenty_five_cents\" WHERE \"mintage\"='3527';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"twenty_five_cents\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" text,\n \"issue_price\" real,\n \"special_notes\" text\n);\n\nQuestion: When was a mintage of 1264 with more than 24.95 issued?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"twenty_five_cents\" WHERE \"mintage\"='1264' AND \"issue_price\">24.95;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the most year for team motul brm and chassis of brm p201 and points less than 0"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='team motul brm' AND \"chassis\"='brm p201' AND \"points\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the entrant for 1975 and chassis of hill gh1"
},
{
"role": "assistant",
"content": "SELECT \"entrant\" FROM \"complete_formula_one_world_championship_\" WHERE \"year\"=1975 AND \"chassis\"='hill gh1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the chassis for engine of brm v12"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='brm v12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the most year for points more than 0"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"points\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Name the sum of points for chassis of brm p160e and year more than 1974"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='brm p160e' AND \"year\">1974;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the chassis after 1991?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_results\" WHERE \"year\">1991;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What are the average points after 1992?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"complete_formula_one_results\" WHERE \"year\">1992;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the sum of points in 1991, for footwork a11c chassis?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"complete_formula_one_results\" WHERE \"year\"=1991 AND \"chassis\"='footwork a11c';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many points does an entrant of Martini Racing, the engine of an Alfa Romeo flat-12 a chassis of brabham bt45, and the year 1976 have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='martini racing' AND \"engine\"='alfa romeo flat-12' AND \"chassis\"='brabham bt45' AND \"year\"=1976;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which chassis is from 1974 and was an entrant of Goldie Hexagon racing?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"year\"=1974 AND \"entrant\"='goldie hexagon racing';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the average points of a Cosworth v8 engine in 1973."
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='cosworth v8' AND \"year\"=1973;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which chassis has an Alfa Romeo flat-12 engine."
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"engine\"='alfa romeo flat-12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game that had an attendance of 32,036?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"attendance\"='32,036';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: On what date did the result leave the team with a record of 46-34?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='46-34';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Name the opponent with round of 1 and time of n/a"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"round\"='1' AND \"time\"='n/a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Name the record with opponent of christian nielson"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='christian nielson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Name the opponent with decision"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='decision';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" text,\n \"venue\" text,\n \"winners\" text,\n \"runner_up\" text,\n \"3rd_place\" text\n);\n\nQuestion: What was the 3rd place value in 2011?"
},
{
"role": "assistant",
"content": "SELECT \"3rd_place\" FROM \"previous_winners\" WHERE \"year\"='2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Name the tries for points against of 583"
},
{
"role": "assistant",
"content": "SELECT \"tries_for\" FROM \"2009_2010_table\" WHERE \"points_against\"='583';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Nam the points for when tries for is 91 and played of 22"
},
{
"role": "assistant",
"content": "SELECT \"points_for\" FROM \"2009_2010_table\" WHERE \"played\"='22' AND \"tries_for\"='91';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Name the drawn for tries for of 42"
},
{
"role": "assistant",
"content": "SELECT \"drawn\" FROM \"2009_2010_table\" WHERE \"tries_for\"='42';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Name the Drawn for tries against of 36 and points of 66"
},
{
"role": "assistant",
"content": "SELECT \"drawn\" FROM \"2009_2010_table\" WHERE \"tries_against\"='36' AND \"points\"='66';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Name the Try bonus with lost of 10"
},
{
"role": "assistant",
"content": "SELECT \"try_bonus\" FROM \"2009_2010_table\" WHERE \"lost\"='10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_2010_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: Name the points for when points against is of 450"
},
{
"role": "assistant",
"content": "SELECT \"points_for\" FROM \"2009_2010_table\" WHERE \"points_against\"='450';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: who won the women's doubles at the same time the men's doubles had tijs creemers quinten van dalm?"
},
{
"role": "assistant",
"content": "SELECT \"women_s_doubles\" FROM \"past_winners\" WHERE \"men_s_doubles\"='tijs creemers quinten van dalm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: what year saw georgy trouerbach nicole van hooren win the women's doubles?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"past_winners\" WHERE \"women_s_doubles\"='georgy trouerbach nicole van hooren';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: who won the women's singles in 1992?"
},
{
"role": "assistant",
"content": "SELECT \"women_s_singles\" FROM \"past_winners\" WHERE \"year\"='1992';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: who won the women's singles at the same time the men's doubles was won by seno the uun santosa?"
},
{
"role": "assistant",
"content": "SELECT \"women_s_singles\" FROM \"past_winners\" WHERE \"men_s_doubles\"='seno the uun santosa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: who won the men's doubles in 1933?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_doubles\" FROM \"past_winners\" WHERE \"year\"='1933';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the 1st leg when Team 2 was Aurora?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"first_round\" WHERE \"team_2\"='aurora';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What was the 2nd leg when Team 1 was Chicago Croatian?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"first_round\" WHERE \"team_1\"='chicago croatian';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Who was Team 2 when Team 1 was Am\u00e9rica?"
},
{
"role": "assistant",
"content": "SELECT \"team_2\" FROM \"first_round\" WHERE \"team_1\"='am\u00e9rica';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which nationality do the Montreal Canadiens belong to with a pick# of 25?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"round_two\" WHERE \"nhl_team\"='montreal canadiens' AND \"pick_num\"='25';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What is the pick# for the California Golden Seals?"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"round_two\" WHERE \"nhl_team\"='california golden seals';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the Goal in Stade Roi Baudouin, Brussels?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goal\") FROM \"international_goals\" WHERE \"venue\"='stade roi baudouin, brussels';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What Venue had 2 or more Goals in a Friendly Competition?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"competition\"='friendly' AND \"goal\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_2_data_from_all_known_specimens_of\" (\n \"number_cmnh\" real,\n \"number_pnm\" text,\n \"date\" text,\n \"site\" real,\n \"altitude\" text,\n \"sex_and_other_data\" text\n);\n\nQuestion: Which Site that has a Sex and other data of old male?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"site\") FROM \"table_2_data_from_all_known_specimens_of\" WHERE \"sex_and_other_data\"='old male';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"sport\" text,\n \"competition_name\" text,\n \"competing_entities\" text,\n \"age_groups\" text,\n \"held_every\" text\n);\n\nQuestion: What is the age group for figure skating?"
},
{
"role": "assistant",
"content": "SELECT \"age_groups\" FROM \"women\" WHERE \"sport\"='figure skating';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"sport\" text,\n \"competition_name\" text,\n \"competing_entities\" text,\n \"age_groups\" text,\n \"held_every\" text\n);\n\nQuestion: what is the sport when the age group is 21 or younger and the competition name is world youth netball championships?"
},
{
"role": "assistant",
"content": "SELECT \"sport\" FROM \"women\" WHERE \"age_groups\"='21 or younger' AND \"competition_name\"='world youth netball championships';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"sport\" text,\n \"competition_name\" text,\n \"competing_entities\" text,\n \"age_groups\" text,\n \"held_every\" text\n);\n\nQuestion: what is the competition name when the age group is 17 or younger for athletics?"
},
{
"role": "assistant",
"content": "SELECT \"competition_name\" FROM \"women\" WHERE \"age_groups\"='17 or younger' AND \"sport\"='athletics';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"sport\" text,\n \"competition_name\" text,\n \"competing_entities\" text,\n \"age_groups\" text,\n \"held_every\" text\n);\n\nQuestion: what is the competing entities when the age group is 18 or younger, held every is one year and the sport is table tennis?"
},
{
"role": "assistant",
"content": "SELECT \"competing_entities\" FROM \"women\" WHERE \"age_groups\"='18 or younger' AND \"held_every\"='one year' AND \"sport\"='table tennis';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"episode\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What result did Janis Ian have in the episode of top 3?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"performances\" WHERE \"episode\"='top 3' AND \"original_artist\"='janis ian';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"episode\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What was the result of the singer with the top 8?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"performances\" WHERE \"episode\"='top 8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"episode\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: What song was chosen for the episode with the top 8?"
},
{
"role": "assistant",
"content": "SELECT \"song_choice\" FROM \"performances\" WHERE \"episode\"='top 8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"episode\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: Which episode had Hoagy carmichael safe with an order of 5?"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"performances\" WHERE \"result\"='safe' AND \"order_num\"='5' AND \"original_artist\"='hoagy carmichael';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performances\" (\n \"episode\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"order_num\" text,\n \"result\" text\n);\n\nQuestion: In what order were the Bee Gees as the artist when it was a result of bottom 3?"
},
{
"role": "assistant",
"content": "SELECT \"order_num\" FROM \"performances\" WHERE \"result\"='bottom 3' AND \"original_artist\"='bee gees';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"draw\" real,\n \"country\" text,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"result\" text\n);\n\nQuestion: Name the total number of drawn for danish and mathias"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"draw\") FROM \"final\" WHERE \"language\"='danish' AND \"artist\"='mathias';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"draw\" real,\n \"country\" text,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"result\" text\n);\n\nQuestion: Name the result for linn nyg\u00e5rd"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"final\" WHERE \"artist\"='linn nyg\u00e5rd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final\" (\n \"draw\" real,\n \"country\" text,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"result\" text\n);\n\nQuestion: Name the song for draw less than 7 and artists of martin & johannes"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"final\" WHERE \"draw\"<7 AND \"artist\"='martin & johannes';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.