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 \"calendar\" (\n \"round\" real,\n \"race_name\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner_s\" text,\n \"team\" text\n);\n\nQuestion: Which circuit had a round larger than 5?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"calendar\" WHERE \"round\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"conan_dark_horse_comics\" (\n \"issue\" text,\n \"date\" text,\n \"title\" text,\n \"story\" text,\n \"color\" text\n);\n\nQuestion: What is the title of the story published on October 19, 2011?"
},
{
"role": "assistant",
"content": "SELECT \"story\" FROM \"conan_dark_horse_comics\" WHERE \"date\"='october 19, 2011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"conan_dark_horse_comics\" (\n \"issue\" text,\n \"date\" text,\n \"title\" text,\n \"story\" text,\n \"color\" text\n);\n\nQuestion: What Issue number was released on August 17, 2011?"
},
{
"role": "assistant",
"content": "SELECT \"issue\" FROM \"conan_dark_horse_comics\" WHERE \"date\"='august 17, 2011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"conan_dark_horse_comics\" (\n \"issue\" text,\n \"date\" text,\n \"title\" text,\n \"story\" text,\n \"color\" text\n);\n\nQuestion: What story title was included in Issue #8?"
},
{
"role": "assistant",
"content": "SELECT \"story\" FROM \"conan_dark_horse_comics\" WHERE \"issue\"='#8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage_winner\" text,\n \"general_classification\" text,\n \"young_classification\" text,\n \"mountains_classification\" text,\n \"sprint_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Which young classification has general classification of Christian Vande Velde for Team Columbia and Mark Cavendish?"
},
{
"role": "assistant",
"content": "SELECT \"young_classification\" FROM \"jersey_progress\" WHERE \"general_classification\"='christian vande velde' AND \"team_classification\"='team columbia' AND \"sprint_classification\"='mark cavendish';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage_winner\" text,\n \"general_classification\" text,\n \"young_classification\" text,\n \"mountains_classification\" text,\n \"sprint_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What mountains classification corresponds to Mark Cavendish and the Garmin-Chipotle-H30?"
},
{
"role": "assistant",
"content": "SELECT \"mountains_classification\" FROM \"jersey_progress\" WHERE \"general_classification\"='mark cavendish' AND \"team_classification\"='garmin-chipotle-h30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage_winner\" text,\n \"general_classification\" text,\n \"young_classification\" text,\n \"mountains_classification\" text,\n \"sprint_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Who was the winner for a Sprint Classification and Young Classification to Mark Cavendish and Garmin-Chipotle-H30 for team?"
},
{
"role": "assistant",
"content": "SELECT \"stage_winner\" FROM \"jersey_progress\" WHERE \"sprint_classification\"='mark cavendish' AND \"team_classification\"='garmin-chipotle-h30' AND \"young_classification\"='mark cavendish';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_cities\" (\n \"rank\" real,\n \"municipality\" text,\n \"population_2010_census\" real,\n \"population_2005_census\" real,\n \"population_2000_census\" real\n);\n\nQuestion: What is the lowest population (2010 Census) that has a rank smaller than 45, municipality of gimpo, and populaion (2000 Census) larger than 117,594?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"population_2010_census\") FROM \"list_of_cities\" WHERE \"population_2000_census\">'117,594' AND \"municipality\"='gimpo' AND \"rank\"<45;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_cities\" (\n \"rank\" real,\n \"municipality\" text,\n \"population_2010_census\" real,\n \"population_2005_census\" real,\n \"population_2000_census\" real\n);\n\nQuestion: What is the lowest population (2000 Census) that has a population (2010 Census) larger than 1,071,913 and municipality of Suwon?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"population_2000_census\") FROM \"list_of_cities\" WHERE \"municipality\"='suwon' AND \"population_2010_census\">'1,071,913';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_cities\" (\n \"rank\" real,\n \"municipality\" text,\n \"population_2010_census\" real,\n \"population_2005_census\" real,\n \"population_2000_census\" real\n);\n\nQuestion: What is the highest population (2000 Census) that has a rank of 43, population (2010 Census) larger than 231,271, and population (2005 Census) larger than 157,632?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"population_2000_census\") FROM \"list_of_cities\" WHERE \"population_2005_census\">'157,632' AND \"rank\"=43 AND \"population_2010_census\">'231,271';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_cities\" (\n \"rank\" real,\n \"municipality\" text,\n \"population_2010_census\" real,\n \"population_2005_census\" real,\n \"population_2000_census\" real\n);\n\nQuestion: What is the total number of rank that has population (2005 Census) smaller than 193,398 and population (2000 Census) of 167,231?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"list_of_cities\" WHERE \"population_2000_census\"='167,231' AND \"population_2005_census\"<'193,398';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_s_40_busiest_airports_by_passenge\" (\n \"rank\" real,\n \"location\" text,\n \"total_passengers\" real,\n \"annual_change\" text,\n \"capacity\" real,\n \"capacity_in_use\" text\n);\n\nQuestion: Who had the lowest rank for a capacity of 197,13% and a capacity larger than 1,010,000?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"brazil_s_40_busiest_airports_by_passenge\" WHERE \"capacity_in_use\"='197,13%' AND \"capacity\">'1,010,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_s_40_busiest_airports_by_passenge\" (\n \"rank\" real,\n \"location\" text,\n \"total_passengers\" real,\n \"annual_change\" text,\n \"capacity\" real,\n \"capacity_in_use\" text\n);\n\nQuestion: What is the average capacity for less than 8,261,355 passengers, and 126,06% in use?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"capacity\") FROM \"brazil_s_40_busiest_airports_by_passenge\" WHERE \"total_passengers\"<'8,261,355' AND \"capacity_in_use\"='126,06%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_10\" (\n \"outcome\" text,\n \"date\" text,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which outcome has a partner named Mark Dickson, with the opponents of Hans Gildemeister Belus Prajoux?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles_10\" WHERE \"partner\"='mark dickson' AND \"opponents_in_the_final\"='hans gildemeister belus prajoux';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Format with a Catalog that is vcrd 103?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"catalog\"='vcrd 103';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Region with a Catalog that is vlmx 1087-3?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"release_history\" WHERE \"catalog\"='vlmx 1087-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What is the Format with a Label of electropolis and a Date that is 2002?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"label\"='electropolis' AND \"date\"='2002';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which result's attendance was more than 60,705 when the week number is less than 13?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\">'60,705' AND \"week\"<13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"composition_of_the_9th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: How many in the cultural and educational panel have a university of Dublin of 3 & A labor panel larger than 11?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"cultural_and_educational_panel\") FROM \"composition_of_the_9th_seanad\" WHERE \"university_of_dublin\"=3 AND \"labour_panel\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"one_day_international\" (\n \"s_no\" real,\n \"team_a\" text,\n \"team_b\" text,\n \"winner\" text,\n \"margin\" text,\n \"match_date\" text\n);\n\nQuestion: What is Margin, when Match Date is Oct 17, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"margin\" FROM \"one_day_international\" WHERE \"match_date\"='oct 17, 2007';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"one_day_international\" (\n \"s_no\" real,\n \"team_a\" text,\n \"team_b\" text,\n \"winner\" text,\n \"margin\" text,\n \"match_date\" text\n);\n\nQuestion: What is Team (B), when S No is greater than 17?"
},
{
"role": "assistant",
"content": "SELECT \"team_b\" FROM \"one_day_international\" WHERE \"s_no\">17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"one_day_international\" (\n \"s_no\" real,\n \"team_a\" text,\n \"team_b\" text,\n \"winner\" text,\n \"margin\" text,\n \"match_date\" text\n);\n\nQuestion: What is the total number of S No(s), when the Margin is 16 runs?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"s_no\") FROM \"one_day_international\" WHERE \"margin\"='16 runs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"one_day_international\" (\n \"s_no\" real,\n \"team_a\" text,\n \"team_b\" text,\n \"winner\" text,\n \"margin\" text,\n \"match_date\" text\n);\n\nQuestion: What is the highest S No, when the Match Date is Nov 1, 2003?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"s_no\") FROM \"one_day_international\" WHERE \"match_date\"='nov 1, 2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"one_day_international\" (\n \"s_no\" real,\n \"team_a\" text,\n \"team_b\" text,\n \"winner\" text,\n \"margin\" text,\n \"match_date\" text\n);\n\nQuestion: What is Team (B), when S No is less than 18, when Margin is 8 Wickets, and when Match Date is Oct 30, 1989?"
},
{
"role": "assistant",
"content": "SELECT \"team_b\" FROM \"one_day_international\" WHERE \"s_no\"<18 AND \"margin\"='8 wickets' AND \"match_date\"='oct 30, 1989';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: When was the last time, since December 14, 1986, that the attendance was lower than 47,096?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"date\"='december 14, 1986' AND \"attendance\"<'47,096';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_finals\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Surface of indoor/carpet Outcome on 13 October 1996"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles_finals\" WHERE \"surface\"='indoor/carpet' AND \"date\"='13 october 1996';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_finals\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What the Outcome for the Tournament of Johannesburg, South Africa"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles_finals\" WHERE \"tournament\"='johannesburg, south africa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"block_iif\" (\n \"date\" text,\n \"rocket\" text,\n \"type\" text,\n \"launch_site\" text,\n \"satellite\" text\n);\n\nQuestion: What is the launch site of the delta iv rocket?"
},
{
"role": "assistant",
"content": "SELECT \"launch_site\" FROM \"block_iif\" WHERE \"rocket\"='delta iv';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"block_iif\" (\n \"date\" text,\n \"rocket\" text,\n \"type\" text,\n \"launch_site\" text,\n \"satellite\" text\n);\n\nQuestion: What is the type of the gps iif-10 satellite with an unknown date?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"block_iif\" WHERE \"date\"='unknown' AND \"satellite\"='gps iif-10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"block_iif\" (\n \"date\" text,\n \"rocket\" text,\n \"type\" text,\n \"launch_site\" text,\n \"satellite\" text\n);\n\nQuestion: What is the type of the gps iif-10 satellite?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"block_iif\" WHERE \"satellite\"='gps iif-10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"block_iif\" (\n \"date\" text,\n \"rocket\" text,\n \"type\" text,\n \"launch_site\" text,\n \"satellite\" text\n);\n\nQuestion: What is the launch site of the delta iv rocket with an unknown date and a gps iif-10 satellite?"
},
{
"role": "assistant",
"content": "SELECT \"launch_site\" FROM \"block_iif\" WHERE \"date\"='unknown' AND \"rocket\"='delta iv' AND \"satellite\"='gps iif-10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"block_iif\" (\n \"date\" text,\n \"rocket\" text,\n \"type\" text,\n \"launch_site\" text,\n \"satellite\" text\n);\n\nQuestion: What is the date of the gps iif-7 satellite?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"block_iif\" WHERE \"satellite\"='gps iif-7';"
}
] |
[
{
"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: What was the finish for 1992?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"indy_500_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 \"indy_500_results\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" text,\n \"finish\" text\n);\n\nQuestion: What was Andretti's finish for the year he had a Buick engine and started 16th?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"indy_500_results\" WHERE \"engine\"='buick' AND \"start\"='16th';"
}
] |
[
{
"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: What was Andretti's finish the year he started 16th with a Buick engine?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"indy_500_results\" WHERE \"engine\"='buick' AND \"start\"='16th';"
}
] |
[
{
"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\" 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: How many years were there a men's double of gy\u00f6rgy v\u00f6r\u00f6s g\u00e1bor petrovits and a men's single of gy\u00f6rgy v\u00f6r\u00f6s?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"past_winners\" WHERE \"men_s_doubles\"='gy\u00f6rgy v\u00f6r\u00f6s g\u00e1bor petrovits' AND \"men_s_singles\"='gy\u00f6rgy v\u00f6r\u00f6s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which Drawn has a Points of 6, and a Against larger than 16?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"drawn\") FROM \"campeonato_paulista\" WHERE \"points\"=6 AND \"against\">16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which Points has a Difference of 3, and a Played smaller than 10?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"campeonato_paulista\" WHERE \"difference\"='3' AND \"played\"<10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which Points has a Team of s\u00e3o paulo athletic, and a Position larger than 5?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"campeonato_paulista\" WHERE \"team\"='s\u00e3o paulo athletic' AND \"position\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which Position has a Played larger than 9, and a Points smaller than 11, and a Drawn smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"position\") FROM \"campeonato_paulista\" WHERE \"played\">9 AND \"points\"<11 AND \"drawn\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1997_reissue_bonus_tracks\" (\n \"track\" real,\n \"recorded\" text,\n \"catalogue\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: What track has a catalogue of 47-9465?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"track\") FROM \"1997_reissue_bonus_tracks\" WHERE \"catalogue\"='47-9465';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1997_reissue_bonus_tracks\" (\n \"track\" real,\n \"recorded\" text,\n \"catalogue\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: What track has a time of 2:30?"
},
{
"role": "assistant",
"content": "SELECT \"track\" FROM \"1997_reissue_bonus_tracks\" WHERE \"time\"='2:30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1997_reissue_bonus_tracks\" (\n \"track\" real,\n \"recorded\" text,\n \"catalogue\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: What catalogue was recorded on 9/10/67 and a release date of 1/9/68?"
},
{
"role": "assistant",
"content": "SELECT \"catalogue\" FROM \"1997_reissue_bonus_tracks\" WHERE \"recorded\"='9/10/67' AND \"release_date\"='1/9/68';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_time_medal_tables\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Where does Norway rank in total medals among countries with fewer than 7 bronzes?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"all_time_medal_tables\" WHERE \"bronze\"<7 AND \"nation\"='norway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"best_batting_strike_rate\" (\n \"player\" text,\n \"team\" text,\n \"inns\" real,\n \"runs\" real,\n \"balls\" real\n);\n\nQuestion: What is the Inns of 435 Runs?"
},
{
"role": "assistant",
"content": "SELECT \"inns\" FROM \"best_batting_strike_rate\" WHERE \"runs\"=435;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"total_team_ranking_open_section\" (\n \"rank\" real,\n \"country\" text,\n \"1st_place\" real,\n \"2nd_place\" real,\n \"3rd_place\" real,\n \"total\" real\n);\n\nQuestion: What is the average 1st place with a Rank that is larger than 10?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"1st_place\") FROM \"total_team_ranking_open_section\" WHERE \"rank\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\n \"week_of\" text,\n \"tier\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"semi_finalists\" text\n);\n\nQuestion: What week was the Runner-up Lori McNeil?"
},
{
"role": "assistant",
"content": "SELECT \"week_of\" FROM \"november\" WHERE \"runner_up\"='lori mcneil';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\n \"week_of\" text,\n \"tier\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"semi_finalists\" text\n);\n\nQuestion: When the runner-up was Jing-qian Yi, who was the winner?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"november\" WHERE \"runner_up\"='jing-qian yi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_2\" (\n \"episode_number\" real,\n \"air_date\" text,\n \"guest_host\" text,\n \"musical_guest_song_performed\" text,\n \"who_knows_the_most_about_the_guest_host_panelists\" text\n);\n\nQuestion: Who was the musical guest when the panelists were Nancy Sorrell and Samia Smith?"
},
{
"role": "assistant",
"content": "SELECT \"musical_guest_song_performed\" FROM \"series_2\" WHERE \"who_knows_the_most_about_the_guest_host_panelists\"='nancy sorrell and samia smith';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_2\" (\n \"episode_number\" real,\n \"air_date\" text,\n \"guest_host\" text,\n \"musical_guest_song_performed\" text,\n \"who_knows_the_most_about_the_guest_host_panelists\" text\n);\n\nQuestion: Who was the guest host for episode numbers under 6 and panelists of Jade Goody and Kenzie?"
},
{
"role": "assistant",
"content": "SELECT \"guest_host\" FROM \"series_2\" WHERE \"episode_number\"<6 AND \"who_knows_the_most_about_the_guest_host_panelists\"='jade goody and kenzie';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_2\" (\n \"episode_number\" real,\n \"air_date\" text,\n \"guest_host\" text,\n \"musical_guest_song_performed\" text,\n \"who_knows_the_most_about_the_guest_host_panelists\" text\n);\n\nQuestion: Who were the panelists on episode number 4?"
},
{
"role": "assistant",
"content": "SELECT \"who_knows_the_most_about_the_guest_host_panelists\" FROM \"series_2\" WHERE \"episode_number\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_2\" (\n \"episode_number\" real,\n \"air_date\" text,\n \"guest_host\" text,\n \"musical_guest_song_performed\" text,\n \"who_knows_the_most_about_the_guest_host_panelists\" text\n);\n\nQuestion: What is the highest episode number in which Jamie Oliver guest-hosted?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"episode_number\") FROM \"series_2\" WHERE \"guest_host\"='jamie oliver';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the home game for the Cavaliers where Lebron James (46) was the lead scorer?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"march\" WHERE \"home\"='cavaliers' AND \"leading_scorer\"='lebron james (46)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: Who was the leading scorer against the visiting team Bulls?"
},
{
"role": "assistant",
"content": "SELECT \"leading_scorer\" FROM \"march\" WHERE \"visitor\"='bulls';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: What date was the game played against the home team Rockets?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"march\" WHERE \"home\"='rockets';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"conan_dark_horse_comics\" (\n \"issue\" text,\n \"date\" text,\n \"title\" text,\n \"penciller\" text,\n \"color\" text\n);\n\nQuestion: What was the Date of the Cimmeria Issue for which the Penciller was Tom\u00e1s Giorello?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"conan_dark_horse_comics\" WHERE \"penciller\"='tom\u00e1s giorello' AND \"title\"='cimmeria';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"conan_dark_horse_comics\" (\n \"issue\" text,\n \"date\" text,\n \"title\" text,\n \"penciller\" text,\n \"color\" text\n);\n\nQuestion: When did the Issue with the Title Homecoming come out?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"conan_dark_horse_comics\" WHERE \"title\"='homecoming';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_league\" (\n \"team\" text,\n \"match\" real,\n \"points\" real,\n \"draw\" real,\n \"lost\" real\n);\n\nQuestion: Which average match has a lost greater than 0, points greater than 6, legia warszawa as the team, and a draw less than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"match\") FROM \"first_league\" WHERE \"lost\">0 AND \"points\">6 AND \"team\"='legia warszawa' AND \"draw\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_league\" (\n \"team\" text,\n \"match\" real,\n \"points\" real,\n \"draw\" real,\n \"lost\" real\n);\n\nQuestion: What draw has a lost less than 6 with 28 as the points?"
},
{
"role": "assistant",
"content": "SELECT \"draw\" FROM \"first_league\" WHERE \"lost\"<6 AND \"points\"=28;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_league\" (\n \"team\" text,\n \"match\" real,\n \"points\" real,\n \"draw\" real,\n \"lost\" real\n);\n\nQuestion: Which average lost that has a match less than 14?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lost\") FROM \"first_league\" WHERE \"match\"<14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_league\" (\n \"team\" text,\n \"match\" text,\n \"points\" text,\n \"draw\" text,\n \"lost\" text\n);\n\nQuestion: What is the Match for skra warszawa?"
},
{
"role": "assistant",
"content": "SELECT \"match\" FROM \"second_league\" WHERE \"team\"='skra warszawa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_league\" (\n \"team\" text,\n \"match\" text,\n \"points\" text,\n \"draw\" text,\n \"lost\" text\n);\n\nQuestion: What is the Draw for skra warszawa?"
},
{
"role": "assistant",
"content": "SELECT \"draw\" FROM \"second_league\" WHERE \"team\"='skra warszawa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_league\" (\n \"team\" text,\n \"match\" text,\n \"points\" text,\n \"draw\" text,\n \"lost\" text\n);\n\nQuestion: What is the Lost when the points were dissolved?"
},
{
"role": "assistant",
"content": "SELECT \"lost\" FROM \"second_league\" WHERE \"points\"='dissolved';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_league\" (\n \"team\" text,\n \"match\" text,\n \"points\" text,\n \"draw\" text,\n \"lost\" text\n);\n\nQuestion: What is the Draw for match 10, and the team was skra warszawa?"
},
{
"role": "assistant",
"content": "SELECT \"draw\" FROM \"second_league\" WHERE \"match\"='10' AND \"team\"='skra warszawa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_league\" (\n \"team\" text,\n \"match\" text,\n \"points\" text,\n \"draw\" text,\n \"lost\" text\n);\n\nQuestion: What is the Draw for the team of tramwajarz \u0142\u00f3d\u017a?"
},
{
"role": "assistant",
"content": "SELECT \"draw\" FROM \"second_league\" WHERE \"team\"='tramwajarz \u0142\u00f3d\u017a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_league\" (\n \"team\" text,\n \"match\" text,\n \"points\" text,\n \"draw\" text,\n \"lost\" text\n);\n\nQuestion: What is the Draw for the team tramwajarz \u0142\u00f3d\u017a?"
},
{
"role": "assistant",
"content": "SELECT \"draw\" FROM \"second_league\" WHERE \"team\"='tramwajarz \u0142\u00f3d\u017a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"newly_named_dinosaurs\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text\n);\n\nQuestion: What is the Location when the novelty is gen?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"newly_named_dinosaurs\" WHERE \"novelty\"='gen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"newly_named_dinosaurs\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text\n);\n\nQuestion: What shows for Unit with a status of nomen oblitum?"
},
{
"role": "assistant",
"content": "SELECT \"unit\" FROM \"newly_named_dinosaurs\" WHERE \"status\"='nomen oblitum';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"newly_named_dinosaurs\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text\n);\n\nQuestion: What is the Location when the name is telmatosaurus?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"newly_named_dinosaurs\" WHERE \"name\"='telmatosaurus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"newly_named_dinosaurs\" (\n \"name\" text,\n \"novelty\" text,\n \"status\" text,\n \"authors\" text,\n \"unit\" text,\n \"location\" text\n);\n\nQuestion: What is the Status with a novelty of gen et sp, and the name is haplocanthosaurus?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"newly_named_dinosaurs\" WHERE \"novelty\"='gen et sp' AND \"name\"='haplocanthosaurus';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers_in_order_of_league_goals\" (\n \"player\" text,\n \"club\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"fa_trophy\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: How many League cups had a total less than 25 and a league larger than 19?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"league_cup\") FROM \"top_scorers_in_order_of_league_goals\" WHERE \"total\"<25 AND \"league\">19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_scorers_in_order_of_league_goals\" (\n \"player\" text,\n \"club\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"fa_trophy\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: How many FA trophies did Ceri Williams get with a smaller total than 19?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"fa_trophy\") FROM \"top_scorers_in_order_of_league_goals\" WHERE \"player\"='ceri williams' AND \"total\"<19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mutual_intelligibility\" (\n \"city\" text,\n \"comprehension_of_danish\" text,\n \"comprehension_of_swedish\" text,\n \"comprehension_of_norwegian\" text,\n \"average\" real\n);\n\nQuestion: Which City has an Average of 6.85?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"mutual_intelligibility\" WHERE \"average\"=6.85;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mutual_intelligibility\" (\n \"city\" text,\n \"comprehension_of_danish\" text,\n \"comprehension_of_swedish\" text,\n \"comprehension_of_norwegian\" text,\n \"average\" real\n);\n\nQuestion: What is the Average of bergen, norway?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"average\") FROM \"mutual_intelligibility\" WHERE \"city\"='bergen, norway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mutual_intelligibility\" (\n \"city\" text,\n \"comprehension_of_danish\" text,\n \"comprehension_of_swedish\" text,\n \"comprehension_of_norwegian\" text,\n \"average\" real\n);\n\nQuestion: Which Comprehension of Danish has an Average smaller than 6.85, and a Comprehension of Norwegian of 4.13?"
},
{
"role": "assistant",
"content": "SELECT \"comprehension_of_danish\" FROM \"mutual_intelligibility\" WHERE \"average\"<6.85 AND \"comprehension_of_norwegian\"='4.13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: What are the Attendance numbers for november 18, 1990?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"date\"='november 18, 1990';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Date for a week higher than 7 with a record of 9\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\">7 AND \"record\"='9\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the result of the game with an attendance over 53,731 after week 5?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\">'53,731' AND \"week\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the average week of a game on November 12, 1989?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"date\"='november 12, 1989';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_b\" (\n \"game\" real,\n \"date\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"result_sets\" text,\n \"result_pts\" text\n);\n\nQuestion: What is the Set 5 with a Set 3 that is 25-23 and a Set 4 that is 23-25?"
},
{
"role": "assistant",
"content": "SELECT \"set_5\" FROM \"pool_b\" WHERE \"set_3\"='25-23' AND \"set_4\"='23-25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_b\" (\n \"game\" real,\n \"date\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"result_sets\" text,\n \"result_pts\" text\n);\n\nQuestion: What is the sum of the Game with a Set 4 of 25-21 and a Set 3 of 25-23?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"game\") FROM \"pool_b\" WHERE \"set_4\"='25-21' AND \"set_3\"='25-23';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_b\" (\n \"game\" real,\n \"date\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"result_sets\" text,\n \"result_pts\" text\n);\n\nQuestion: What is the Set 5 with a Game that is 59?"
},
{
"role": "assistant",
"content": "SELECT \"set_5\" FROM \"pool_b\" WHERE \"game\"=59;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_results\" (\n \"year\" real,\n \"competition\" text,\n \"club\" text,\n \"nation\" text,\n \"result\" text\n);\n\nQuestion: What shows for nation when the Competition is preseason, Year less than 2011, and a Club of chivas de guadalajara?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"international_results\" WHERE \"competition\"='preseason' AND \"year\"<2011 AND \"club\"='chivas de guadalajara';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_results\" (\n \"year\" real,\n \"competition\" text,\n \"club\" text,\n \"nation\" text,\n \"result\" text\n);\n\nQuestion: What was the Result for the club universidad de guadalajara?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_results\" WHERE \"club\"='club universidad de guadalajara';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_results\" (\n \"year\" real,\n \"competition\" text,\n \"club\" text,\n \"nation\" text,\n \"result\" text\n);\n\nQuestion: What is the Nation with 2012 as the year, and a Competition of preseason, and a Result of w 0\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"international_results\" WHERE \"year\"=2012 AND \"competition\"='preseason' AND \"result\"='w 0\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_results\" (\n \"year\" real,\n \"competition\" text,\n \"club\" text,\n \"nation\" text,\n \"result\" text\n);\n\nQuestion: What is the average Year when the Competition was friendly, and a Club of everton?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"international_results\" WHERE \"competition\"='friendly' AND \"club\"='everton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_results\" (\n \"year\" real,\n \"competition\" text,\n \"club\" text,\n \"nation\" text,\n \"result\" text\n);\n\nQuestion: What is the Competition when the Club was costa rica u-20?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_results\" WHERE \"club\"='costa rica u-20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_results\" (\n \"year\" real,\n \"competition\" text,\n \"club\" text,\n \"nation\" text,\n \"result\" text\n);\n\nQuestion: What is the Club of mexico, Year of 2010, and a Competition of preseason, and a Result of w 0\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"international_results\" WHERE \"nation\"='mexico' AND \"year\"=2010 AND \"competition\"='preseason' AND \"result\"='w 0\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest total when the nation is Sweden?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"nation\"='sweden';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average Total when silver is less than 1, and the rank is 15?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"medal_table\" WHERE \"silver\"<1 AND \"rank\"='15';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of Bronze when rank is 11, and the total is less than 1?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"bronze\") FROM \"medal_table\" WHERE \"rank\"='11' AND \"total\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"olympic_roster\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2012_club\" text\n);\n\nQuestion: Which name's 2012 club was deportivo nacional?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"olympic_roster\" WHERE \"2012_club\"='deportivo nacional';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"olympic_roster\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2012_club\" text\n);\n\nQuestion: Which name's 2012 club was deportivo nacional?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"olympic_roster\" WHERE \"2012_club\"='deportivo nacional';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"olympic_roster\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2012_club\" text\n);\n\nQuestion: Which weight was attached to the 2012 club San Pedro?"
},
{
"role": "assistant",
"content": "SELECT \"weight\" FROM \"olympic_roster\" WHERE \"2012_club\"='san pedro';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"filmography\" (\n \"year\" real,\n \"film\" text,\n \"director\" text,\n \"producer\" text,\n \"writer\" text\n);\n\nQuestion: What year is the latest year that has no under director?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"filmography\" WHERE \"director\"='no';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"filmography\" (\n \"year\" real,\n \"film\" text,\n \"director\" text,\n \"producer\" text,\n \"writer\" text\n);\n\nQuestion: With yes under writer and in 2014, what is the director?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"filmography\" WHERE \"year\"=2014 AND \"writer\"='yes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"filmography\" (\n \"year\" real,\n \"film\" text,\n \"director\" text,\n \"producer\" text,\n \"writer\" text\n);\n\nQuestion: Who is the writer of the film Run?"
},
{
"role": "assistant",
"content": "SELECT \"writer\" FROM \"filmography\" WHERE \"film\"='run';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: What is the most goals made for a person with less than 208 matches and ranked lower than 12?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals\") FROM \"list_of_top_association_football_goal_sc\" WHERE \"matches\"<208 AND \"rank\">12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: In what years was there a rank lower than 9, under 84 goals, and more than 158 matches?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"list_of_top_association_football_goal_sc\" WHERE \"matches\">158 AND \"rank\">9 AND \"goals\"<84;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"conto_tv_teleitalia\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What is the HDTV status of the r-light television service?"
},
{
"role": "assistant",
"content": "SELECT \"hdtv\" FROM \"conto_tv_teleitalia\" WHERE \"television_service\"='r-light';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.