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 \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What's the smallest amount of Laps that had a finish of 7 with a start of 6?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"indy_500_results\" WHERE \"finish\"='7' AND \"start\"='6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the smallest bronze with a Gold smaller than 3, and a Silver larger than 1, and a Rank of 6, and a Nation of hungary?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"gold\"<3 AND \"silver\">1 AND \"rank\"=6 AND \"nation\"='hungary';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average bronze with a rank of 4 and less than 1 silver?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"rank\"=4 AND \"silver\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which silver has a Gold larger than 4, and a Rank of 1?"
},
{
"role": "assistant",
"content": "SELECT \"silver\" FROM \"medal_table\" WHERE \"gold\">4 AND \"rank\"=1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What lowest bronze has a total of 3, a Nation of hungary, and a Gold smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"total\"=3 AND \"nation\"='hungary' AND \"gold\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many gold have a Rank of 7, and a Bronze of 1, and a Silver smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"gold\") FROM \"medal_table\" WHERE \"rank\"=7 AND \"bronze\"=1 AND \"silver\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Totals have a Silver smaller than 2, and a Nation of ukraine, and a Gold smaller than 3?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"medal_table\" WHERE \"silver\"<2 AND \"nation\"='ukraine' AND \"gold\"<3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"best_figures_in_an_innings\" (\n \"bowling\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Which player played in 2007?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"best_figures_in_an_innings\" WHERE \"season\"='2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"best_figures_in_an_innings\" (\n \"bowling\" text,\n \"player\" text,\n \"opponent\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: What was Min Patel's bowling?"
},
{
"role": "assistant",
"content": "SELECT \"bowling\" FROM \"best_figures_in_an_innings\" WHERE \"player\"='min patel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_of_nominations\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_6\" text,\n \"week_9\" text,\n \"week_12\" text\n);\n\nQuestion: Who was the week 1 nomination when the week 2 nomination was Piia Jarkko?"
},
{
"role": "assistant",
"content": "SELECT \"week_1\" FROM \"table_of_nominations\" WHERE \"week_2\"='piia jarkko';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_of_nominations\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_6\" text,\n \"week_9\" text,\n \"week_12\" text\n);\n\nQuestion: Who was the week 12 nomination when the week 9 nomination walked (day 11)?"
},
{
"role": "assistant",
"content": "SELECT \"week_12\" FROM \"table_of_nominations\" WHERE \"week_9\"='walked (day 11)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_of_nominations\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_6\" text,\n \"week_9\" text,\n \"week_12\" text\n);\n\nQuestion: What is the week 12 nomination that had a week 1 nomination of Maria Maxine and a week 2 nomination of Henri Satu?"
},
{
"role": "assistant",
"content": "SELECT \"week_12\" FROM \"table_of_nominations\" WHERE \"week_1\"='maria maxine' AND \"week_2\"='henri satu';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"call_sign\" text,\n \"frequency\" text,\n \"city_of_license\" text,\n \"facility_id\" real,\n \"erp_power_w\" real,\n \"height_m_ft\" text,\n \"class\" text\n);\n\nQuestion: Name the heightfor city of license of malone, ny"
},
{
"role": "assistant",
"content": "SELECT \"height_m_ft\" FROM \"stations\" WHERE \"city_of_license\"='malone, ny';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"call_sign\" text,\n \"frequency\" text,\n \"city_of_license\" text,\n \"facility_id\" real,\n \"erp_power_w\" real,\n \"height_m_ft\" text,\n \"class\" text\n);\n\nQuestion: Name the class with call sign of wmhn"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"stations\" WHERE \"call_sign\"='wmhn';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"call_sign\" text,\n \"frequency\" text,\n \"city_of_license\" text,\n \"facility_id\" real,\n \"erp_power_w\" real,\n \"height_m_ft\" text,\n \"class\" text\n);\n\nQuestion: Name the frequency with class of b"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"stations\" WHERE \"class\"='b';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"call_sign\" text,\n \"frequency\" text,\n \"city_of_license\" text,\n \"facility_id\" real,\n \"erp_power_w\" real,\n \"height_m_ft\" text,\n \"class\" text\n);\n\nQuestion: Name the city of license with frequency of 90.1 fm"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"stations\" WHERE \"frequency\"='90.1 fm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stations\" (\n \"call_sign\" text,\n \"frequency\" text,\n \"city_of_license\" text,\n \"facility_id\" real,\n \"erp_power_w\" real,\n \"height_m_ft\" text,\n \"class\" text\n);\n\nQuestion: Name the total number of ERP/Power W for frequency of 89.3 fm and facility ID less than 40430"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"erp_power_w\") FROM \"stations\" WHERE \"frequency\"='89.3 fm' AND \"facility_id\"<40430;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"chassis\" text,\n \"engine_s\" text,\n \"tyres\" text,\n \"points\" text\n);\n\nQuestion: What is the Engine(s) that has f Tyres in 1971?"
},
{
"role": "assistant",
"content": "SELECT \"engine_s\" FROM \"complete_world_championship_formula_one_\" WHERE \"tyres\"='f' AND \"year\"=1971;"
}
]
|
[
{
"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 \"time\" text,\n \"att\" real,\n \"record\" text\n);\n\nQuestion: What was the attendance on June 27?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"att\") FROM \"game_log\" WHERE \"date\"='june 27';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Name the surface for 12 september 2006"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_titles\" WHERE \"date\"='12 september 2006';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Name the score for opponent in the final being paul baccanello"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_titles\" WHERE \"opponent_in_the_final\"='paul baccanello';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Name the surface for 20 march 2007"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_titles\" WHERE \"date\"='20 march 2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Name the date for opponent in the final being ignasi villacampa"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_titles\" WHERE \"opponent_in_the_final\"='ignasi villacampa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Name the tournament for grass surface and opponent in the final being paul baccanello"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_titles\" WHERE \"surface\"='grass' AND \"opponent_in_the_final\"='paul baccanello';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"location\" text,\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: When is the earliest year in milan that guillermo vilas was champion?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"singles\" WHERE \"location\"='milan' AND \"champion\"='guillermo vilas';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"location\" text,\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: Where in 1985 was tim mayotte runner up?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"singles\" WHERE \"year\">1985 AND \"runner_up\"='tim mayotte';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"location\" text,\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: What was the score when stefan edberg won after 1978?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles\" WHERE \"year\">1978 AND \"champion\"='stefan edberg';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_wpby\" (\n \"station\" text,\n \"city_of_license\" text,\n \"channel\" text,\n \"erp_k_w\" real,\n \"haat_m_ft\" text,\n \"facility_id\" real\n);\n\nQuestion: What is the Facility ID that has a City of license of wheeling, and a ERP kW less than 4.5?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"facility_id\") FROM \"broadcast_translators_of_wpby\" WHERE \"city_of_license\"='wheeling' AND \"erp_k_w\"<4.5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"broadcast_translators_of_wpby\" (\n \"station\" text,\n \"city_of_license\" text,\n \"channel\" text,\n \"erp_k_w\" real,\n \"haat_m_ft\" text,\n \"facility_id\" real\n);\n\nQuestion: What is the City of license that has a ERP kW more than 4.5 and w23dr-d?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"broadcast_translators_of_wpby\" WHERE \"erp_k_w\">4.5 AND \"station\"='w23dr-d';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tower_remains\" (\n \"church_name\" text,\n \"location\" text,\n \"rebuilt\" text,\n \"date_of_demolition\" real,\n \"subsuming_parish\" text\n);\n\nQuestion: What is the location that has a date of demolition of 1940 and has a church named Christ Church Greyfriars?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"tower_remains\" WHERE \"date_of_demolition\"=1940 AND \"church_name\"='christ church greyfriars';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tower_remains\" (\n \"church_name\" text,\n \"location\" text,\n \"rebuilt\" text,\n \"date_of_demolition\" real,\n \"subsuming_parish\" text\n);\n\nQuestion: How many dates of demolition are located on Wood Street?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"date_of_demolition\") FROM \"tower_remains\" WHERE \"location\"='wood street';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_12_8_titles_4_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was Olga Govortsova's score when she played on a clay surface on 19 May 2008?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_12_8_titles_4_runners_up\" WHERE \"surface\"='clay' AND \"date\"='19 may 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_12_8_titles_4_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was Olga Govortsova's outcome when she played on a grass surface?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles_12_8_titles_4_runners_up\" WHERE \"surface\"='grass';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_12_8_titles_4_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was Olga Govortsova's goal when she played on a clay surface on 26 May 2012?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles_12_8_titles_4_runners_up\" WHERE \"surface\"='clay' AND \"date\"='26 may 2012';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_50_most_topographically_prominent_mo\" (\n \"rank\" real,\n \"mountain_peak\" text,\n \"province\" text,\n \"mountain_range\" text,\n \"location\" text\n);\n\nQuestion: Which mountain range has a rank of 19?"
},
{
"role": "assistant",
"content": "SELECT \"mountain_range\" FROM \"the_50_most_topographically_prominent_mo\" WHERE \"rank\"=19;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_50_most_topographically_prominent_mo\" (\n \"rank\" real,\n \"mountain_peak\" text,\n \"province\" text,\n \"mountain_range\" text,\n \"location\" text\n);\n\nQuestion: Which location includes Coast Mountains with a rank less than 18 at Skihist Mountain?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"the_50_most_topographically_prominent_mo\" WHERE \"mountain_range\"='coast mountains' AND \"rank\"<18 AND \"mountain_peak\"='skihist mountain';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_50_most_topographically_prominent_mo\" (\n \"rank\" real,\n \"mountain_peak\" text,\n \"province\" text,\n \"mountain_range\" text,\n \"location\" text\n);\n\nQuestion: Which mountain range includes Mount Hubbard?"
},
{
"role": "assistant",
"content": "SELECT \"mountain_range\" FROM \"the_50_most_topographically_prominent_mo\" WHERE \"mountain_peak\"='mount hubbard';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_50_most_topographically_prominent_mo\" (\n \"rank\" real,\n \"mountain_peak\" text,\n \"province\" text,\n \"mountain_range\" text,\n \"location\" text\n);\n\nQuestion: Which province includes Axel Heiberg Island?"
},
{
"role": "assistant",
"content": "SELECT \"province\" FROM \"the_50_most_topographically_prominent_mo\" WHERE \"mountain_range\"='axel heiberg island';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What are the notes of events that finished in 12th position?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"achievements\" WHERE \"position\"='12th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: Which venue was finished in 2nd position in 1985?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"position\"='2nd' AND \"year\"=1985;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What is the average year of events that took place in Antwerp, Belgium?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"achievements\" WHERE \"venue\"='antwerp, belgium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What's the year of the event that took place most recently in Antwerp, Belgium with team competition notes?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"achievements\" WHERE \"notes\"='team competition' AND \"venue\"='antwerp, belgium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" real,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What was the label's format LP and catalog of CH-9192?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"format\"='lp' AND \"catalog\"='ch-9192';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" real,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: When was Catalog CHD-9192 published?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalog\"='chd-9192';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: I need the FCC info on the radio Frequency MHz 107.5?"
},
{
"role": "assistant",
"content": "SELECT \"fcc_info\" FROM \"translators\" WHERE \"frequency_m_hz\"=107.5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Give me the MHz Frequency of Allapattah, Florida."
},
{
"role": "assistant",
"content": "SELECT \"frequency_m_hz\" FROM \"translators\" WHERE \"city_of_license\"='allapattah, florida';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What class does the w298ak sign belong to?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"translators\" WHERE \"call_sign\"='w298ak';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What class is ERP W of 800?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"translators\" WHERE \"erp_w\"=800;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"apertura_2002_standings\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the total of Goals Conceded that has Points smaller than 21 and a Lost thats smaller than 8?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"goals_conceded\") FROM \"apertura_2002_standings\" WHERE \"points\"<21 AND \"lost\"<8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"apertura_2002_standings\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What's the total of Lost that's got Points larger than 28, Draw of 5, and Place that's smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lost\") FROM \"apertura_2002_standings\" WHERE \"points\">28 AND \"draw\"=5 AND \"place\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"apertura_2002_standings\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What's the total of Goals Scored with Points that's smaller than 27, and a Team of C.D. Atl\u00e9tico Balboa?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"goals_scored\") FROM \"apertura_2002_standings\" WHERE \"points\"<27 AND \"team\"='c.d. atl\u00e9tico balboa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"apertura_2002_standings\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What is listed as the Highest Played and that has a Place that is larger than 10?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"played\") FROM \"apertura_2002_standings\" WHERE \"place\">10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"apertura_2002_standings\" (\n \"place\" real,\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What is listed as the Highest Played, has Points of 17, and Draw that is smaller than 5?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"played\") FROM \"apertura_2002_standings\" WHERE \"points\"=17 AND \"draw\"<5;"
}
]
|
[
{
"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: When was the game that ended with a score of 6-4?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"score\"='6-4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score on April 8?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"april\" WHERE \"date\"='april 8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the decision in Minnesota?"
},
{
"role": "assistant",
"content": "SELECT \"decision\" FROM \"april\" WHERE \"home\"='minnesota';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which score has a record of 58\u201315\u20138?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"april\" WHERE \"record\"='58\u201315\u20138';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_to_season\" (\n \"season\" text,\n \"level\" text,\n \"division\" text,\n \"section\" text,\n \"position\" text\n);\n\nQuestion: Which section has a level of Tier 3, is in the 6th position, and is in the 1937-38 season?"
},
{
"role": "assistant",
"content": "SELECT \"section\" FROM \"season_to_season\" WHERE \"level\"='tier 3' AND \"position\"='6th' AND \"season\"='1937-38';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_to_season\" (\n \"season\" text,\n \"level\" text,\n \"division\" text,\n \"section\" text,\n \"position\" text\n);\n\nQuestion: Which section is in the 6th position?"
},
{
"role": "assistant",
"content": "SELECT \"section\" FROM \"season_to_season\" WHERE \"position\"='6th';"
}
]
|
[
{
"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: Name the attendance with date of june 11"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"date\"='june 11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_partnerships_for_each_wicket\" (\n \"wicket\" text,\n \"runs\" text,\n \"partnerships\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Which partnership has a run number of 27?"
},
{
"role": "assistant",
"content": "SELECT \"partnerships\" FROM \"highest_partnerships_for_each_wicket\" WHERE \"runs\"='27';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_partnerships_for_each_wicket\" (\n \"wicket\" text,\n \"runs\" text,\n \"partnerships\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What venue did the parntership of shoaib malik / misbah-ul-haq occur?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"highest_partnerships_for_each_wicket\" WHERE \"partnerships\"='shoaib malik / misbah-ul-haq';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_partnerships_for_each_wicket\" (\n \"wicket\" text,\n \"runs\" text,\n \"partnerships\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What venue did the partnership of herschelle gibbs / justin kemp happen?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"highest_partnerships_for_each_wicket\" WHERE \"partnerships\"='herschelle gibbs / justin kemp';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_2011_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);\n\nQuestion: What is the number Played that has 310 Points for?"
},
{
"role": "assistant",
"content": "SELECT \"played\" FROM \"2010_2011_table\" WHERE \"points_for\"='310';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_2011_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);\n\nQuestion: What Losing bonus has a Points against of 588?"
},
{
"role": "assistant",
"content": "SELECT \"losing_bonus\" FROM \"2010_2011_table\" WHERE \"points_against\"='588';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_2011_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);\n\nQuestion: What Tries against has a Losing bonus of 7?"
},
{
"role": "assistant",
"content": "SELECT \"tries_against\" FROM \"2010_2011_table\" WHERE \"losing_bonus\"='7';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_2011_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);\n\nQuestion: What Try bonus has a Points against of 488?"
},
{
"role": "assistant",
"content": "SELECT \"try_bonus\" FROM \"2010_2011_table\" WHERE \"points_against\"='488';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_2011_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);\n\nQuestion: What Points for has a Try bonus of 140?"
},
{
"role": "assistant",
"content": "SELECT \"points_for\" FROM \"2010_2011_table\" WHERE \"try_bonus\"='140';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_2011_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);\n\nQuestion: What Drawn has a Tries against of 0?"
},
{
"role": "assistant",
"content": "SELECT \"drawn\" FROM \"2010_2011_table\" WHERE \"tries_against\"='0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_champions\" (\n \"name\" text,\n \"reign\" real,\n \"days_held\" text,\n \"location\" text,\n \"defenses\" real\n);\n\nQuestion: What is the days held the champion with a reign larger than 3 and 1 defense has?"
},
{
"role": "assistant",
"content": "SELECT \"days_held\" FROM \"list_of_champions\" WHERE \"reign\">3 AND \"defenses\"=1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_champions\" (\n \"name\" text,\n \"reign\" real,\n \"days_held\" text,\n \"location\" text,\n \"defenses\" real\n);\n\nQuestion: What is the days held the champion with a reign larger than 3 and less than 1 defense has?"
},
{
"role": "assistant",
"content": "SELECT \"days_held\" FROM \"list_of_champions\" WHERE \"reign\">3 AND \"defenses\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_champions\" (\n \"name\" text,\n \"reign\" real,\n \"days_held\" text,\n \"location\" text,\n \"defenses\" real\n);\n\nQuestion: What is the average defenses a champion with 404 days held and a reign larger than 1 has?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"defenses\") FROM \"list_of_champions\" WHERE \"days_held\"='404' AND \"reign\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_champions\" (\n \"name\" text,\n \"reign\" real,\n \"days_held\" text,\n \"location\" text,\n \"defenses\" real\n);\n\nQuestion: What is the lowest defense a champion with 345 days held has?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"defenses\") FROM \"list_of_champions\" WHERE \"days_held\"='345';"
}
]
|
[
{
"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: On what date was there a record of 76-72?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='76-72';"
}
]
|
[
{
"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 that had a loss of Ponson (1-5)?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"loss\"='ponson (1-5)';"
}
]
|
[
{
"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: On which day was there a record of 36-39?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='36-39';"
}
]
|
[
{
"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: On what day was the record 30-31?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='30-31';"
}
]
|
[
{
"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: Who was the opponent at the game that had a loss of Leonard (7\u20138)?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"loss\"='leonard (7\u20138)';"
}
]
|
[
{
"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: What was the score of the game when the record was 18\u201343?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='18\u201343';"
}
]
|
[
{
"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: What was the score of the game against the Royals when the record was 24\u201352?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='royals' AND \"record\"='24\u201352';"
}
]
|
[
{
"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: What was the score of the game when the record was 22\u201346?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='22\u201346';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"code_name\" text,\n \"function_figure\" text,\n \"real_name\" text,\n \"birthplace\" text,\n \"serial_number\" text,\n \"primary_military_speciality\" text,\n \"secondary_military_speciality\" text\n);\n\nQuestion: What is the real name of the person whose primary military specialty is shock paratrooper?"
},
{
"role": "assistant",
"content": "SELECT \"real_name\" FROM \"characters\" WHERE \"primary_military_speciality\"='shock paratrooper';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"code_name\" text,\n \"function_figure\" text,\n \"real_name\" text,\n \"birthplace\" text,\n \"serial_number\" text,\n \"primary_military_speciality\" text,\n \"secondary_military_speciality\" text\n);\n\nQuestion: What is the birthplace of Pete Sanderson?"
},
{
"role": "assistant",
"content": "SELECT \"birthplace\" FROM \"characters\" WHERE \"real_name\"='pete sanderson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"code_name\" text,\n \"function_figure\" text,\n \"real_name\" text,\n \"birthplace\" text,\n \"serial_number\" text,\n \"primary_military_speciality\" text,\n \"secondary_military_speciality\" text\n);\n\nQuestion: What role did Jean-Luc Bouvier serve?"
},
{
"role": "assistant",
"content": "SELECT \"function_figure\" FROM \"characters\" WHERE \"real_name\"='jean-luc bouvier';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"code_name\" text,\n \"function_figure\" text,\n \"real_name\" text,\n \"birthplace\" text,\n \"serial_number\" text,\n \"primary_military_speciality\" text,\n \"secondary_military_speciality\" text\n);\n\nQuestion: What is the real name of the person who is a pilot of the silent attack kayak?"
},
{
"role": "assistant",
"content": "SELECT \"real_name\" FROM \"characters\" WHERE \"function_figure\"='pilot of the silent attack kayak';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"characters\" (\n \"code_name\" text,\n \"function_figure\" text,\n \"real_name\" text,\n \"birthplace\" text,\n \"serial_number\" text,\n \"primary_military_speciality\" text,\n \"secondary_military_speciality\" text\n);\n\nQuestion: What is the code name of the person born in Liverpool?"
},
{
"role": "assistant",
"content": "SELECT \"code_name\" FROM \"characters\" WHERE \"birthplace\"='liverpool';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: What is the names for the medalist in the sport of canoeing?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"list_of_medalists\" WHERE \"sport\"='canoeing';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: What games had the women's half middleweight event?"
},
{
"role": "assistant",
"content": "SELECT \"games\" FROM \"list_of_medalists\" WHERE \"event\"='women''s half middleweight';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: Who received the bronze medal in the 2000 Sydney games?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"list_of_medalists\" WHERE \"medal\"='bronze' AND \"games\"='2000 sydney';"
}
]
|
[
{
"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: How many people attended when opponent was twins?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"game_log\" WHERE \"opponent\"='twins';"
}
]
|
[
{
"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: Which date has a Record of 41-46?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='41-46';"
}
]
|
[
{
"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: Which score has a Record of 48-55?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='48-55';"
}
]
|
[
{
"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: Which score has a Record of 44-49?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='44-49';"
}
]
|
[
{
"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: Which score has an Attendance larger than 16,571, and a Loss of mcdowell (0-1)?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"attendance\">'16,571' AND \"loss\"='mcdowell (0-1)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which score has an Opponent of white sox, and a Record of 2-0?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='white sox' AND \"record\"='2-0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_in_federal_elections\" (\n \"year\" real,\n \"office\" text,\n \"candidate\" text,\n \"popular_votes\" real,\n \"percentage\" text\n);\n\nQuestion: How many votes did candice sjostrom receive?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"popular_votes\") FROM \"results_in_federal_elections\" WHERE \"candidate\"='candice sjostrom';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_in_federal_elections\" (\n \"year\" real,\n \"office\" text,\n \"candidate\" text,\n \"popular_votes\" real,\n \"percentage\" text\n);\n\nQuestion: What percentage did chris wright receive?"
},
{
"role": "assistant",
"content": "SELECT \"percentage\" FROM \"results_in_federal_elections\" WHERE \"candidate\"='chris wright';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_in_federal_elections\" (\n \"year\" real,\n \"office\" text,\n \"candidate\" text,\n \"popular_votes\" real,\n \"percentage\" text\n);\n\nQuestion: How many votes for the candidate after 1992, 1.59% of the vote, and the office of us representative 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"popular_votes\") FROM \"results_in_federal_elections\" WHERE \"office\"='us representative 4' AND \"percentage\"='1.59%' AND \"year\">1992;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"representative\" text,\n \"years\" text,\n \"state\" text,\n \"party\" text,\n \"lifespan\" text\n);\n\nQuestion: What years did J. Smith Young serve as a Representative?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"external_links\" WHERE \"representative\"='j. smith young';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"representative\" text,\n \"years\" text,\n \"state\" text,\n \"party\" text,\n \"lifespan\" text\n);\n\nQuestion: Which party did Thomas L. Young belong to?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"external_links\" WHERE \"representative\"='thomas l. young';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.