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 \"changes_during_term\" (\n \"by_election\" real,\n \"electorate\" text,\n \"date\" text,\n \"incumbent\" text,\n \"reason\" text,\n \"winner\" text\n);\n\nQuestion: When edward shaw is the winner what is the date?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"changes_during_term\" WHERE \"winner\"='Edward Shaw';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"changes_during_term\" (\n \"by_election\" real,\n \"electorate\" text,\n \"date\" text,\n \"incumbent\" text,\n \"reason\" text,\n \"winner\" text\n);\n\nQuestion: When peninsula is the electorate what is the reason?"
},
{
"role": "assistant",
"content": "SELECT \"reason\" FROM \"changes_during_term\" WHERE \"electorate\"='Peninsula';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"changes_during_term\" (\n \"by_election\" real,\n \"electorate\" text,\n \"date\" text,\n \"incumbent\" text,\n \"reason\" text,\n \"winner\" text\n);\n\nQuestion: When james seaton is the incumbent what is the reason?"
},
{
"role": "assistant",
"content": "SELECT \"reason\" FROM \"changes_during_term\" WHERE \"incumbent\"='James Seaton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"age\" real,\n \"date\" text,\n \"track\" text,\n \"race\" text,\n \"distance_miles\" text,\n \"jockey\" text,\n \"handicap\" text,\n \"field_no_horses\" text,\n \"place\" text,\n \"time\" text,\n \"prize_money\" text,\n \"sweepstake\" text,\n \"archer_s_winnings\" text\n);\n\nQuestion: What was the handicap when the prize money was 120s?"
},
{
"role": "assistant",
"content": "SELECT \"handicap\" FROM \"race_record\" WHERE \"prize_money\"='120s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"age\" real,\n \"date\" text,\n \"track\" text,\n \"race\" text,\n \"distance_miles\" text,\n \"jockey\" text,\n \"handicap\" text,\n \"field_no_horses\" text,\n \"place\" text,\n \"time\" text,\n \"prize_money\" text,\n \"sweepstake\" text,\n \"archer_s_winnings\" text\n);\n\nQuestion: On what date was the handicap 8 st 12 lb?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"race_record\" WHERE \"handicap\"='8 st 12 lb';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_record\" (\n \"age\" real,\n \"date\" text,\n \"track\" text,\n \"race\" text,\n \"distance_miles\" text,\n \"jockey\" text,\n \"handicap\" text,\n \"field_no_horses\" text,\n \"place\" text,\n \"time\" text,\n \"prize_money\" text,\n \"sweepstake\" text,\n \"archer_s_winnings\" text\n);\n\nQuestion: On what date was the track Ballarat? "
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"race_record\" WHERE \"track\"='Ballarat';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_talukas_in_ahmednagar_district_b\" (\n \"taluka_name\" text,\n \"population_2001_census\" real,\n \"pct_of_district_population\" text,\n \"male\" real,\n \"male_pct\" text,\n \"female\" real,\n \"female_pct\" text,\n \"sex_ratio\" real,\n \"literacy\" real,\n \"literacy_pct\" text,\n \"literate_male\" real,\n \"literate_male_pct\" text,\n \"literate_female\" real,\n \"literate_female_pct\" text\n);\n\nQuestion: How many literate females(%) are there where the male(%) is 51.66"
},
{
"role": "assistant",
"content": "SELECT \"literate_female_pct\" FROM \"list_of_talukas_in_ahmednagar_district_b\" WHERE \"male_pct\"='51.66';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_talukas_in_ahmednagar_district_b\" (\n \"taluka_name\" text,\n \"population_2001_census\" real,\n \"pct_of_district_population\" text,\n \"male\" real,\n \"male_pct\" text,\n \"female\" real,\n \"female_pct\" text,\n \"sex_ratio\" real,\n \"literacy\" real,\n \"literacy_pct\" text,\n \"literate_male\" real,\n \"literate_male_pct\" text,\n \"literate_female\" real,\n \"literate_female_pct\" text\n);\n\nQuestion: How many literate males are there in the taluka name nevasa?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"literate_male\") FROM \"list_of_talukas_in_ahmednagar_district_b\" WHERE \"taluka_name\"='Nevasa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_talukas_in_ahmednagar_district_b\" (\n \"taluka_name\" text,\n \"population_2001_census\" real,\n \"pct_of_district_population\" text,\n \"male\" real,\n \"male_pct\" text,\n \"female\" real,\n \"female_pct\" text,\n \"sex_ratio\" real,\n \"literacy\" real,\n \"literacy_pct\" text,\n \"literate_male\" real,\n \"literate_male_pct\" text,\n \"literate_female\" real,\n \"literate_female_pct\" text\n);\n\nQuestion: How many literate male (%) are there in the district that has a population of 3.28?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"literate_male_pct\") FROM \"list_of_talukas_in_ahmednagar_district_b\" WHERE \"pct_of_district_population\"='3.28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_talukas_in_ahmednagar_district_b\" (\n \"taluka_name\" text,\n \"population_2001_census\" real,\n \"pct_of_district_population\" text,\n \"male\" real,\n \"male_pct\" text,\n \"female\" real,\n \"female_pct\" text,\n \"sex_ratio\" real,\n \"literacy\" real,\n \"literacy_pct\" text,\n \"literate_male\" real,\n \"literate_male_pct\" text,\n \"literate_female\" real,\n \"literate_female_pct\" text\n);\n\nQuestion: how many literate males are there that has a district population of 6.65?"
},
{
"role": "assistant",
"content": "SELECT \"literate_male\" FROM \"list_of_talukas_in_ahmednagar_district_b\" WHERE \"pct_of_district_population\"='6.65';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_talukas_in_ahmednagar_district_b\" (\n \"taluka_name\" text,\n \"population_2001_census\" real,\n \"pct_of_district_population\" text,\n \"male\" real,\n \"male_pct\" text,\n \"female\" real,\n \"female_pct\" text,\n \"sex_ratio\" real,\n \"literacy\" real,\n \"literacy_pct\" text,\n \"literate_male\" real,\n \"literate_male_pct\" text,\n \"literate_female\" real,\n \"literate_female_pct\" text\n);\n\nQuestion: How many males are in the group that has an amount of 139361"
},
{
"role": "assistant",
"content": "SELECT \"male\" FROM \"list_of_talukas_in_ahmednagar_district_b\" WHERE \"female\"=139361;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_overview\" (\n \"series\" real,\n \"premiere\" text,\n \"finale\" text,\n \"runners_up\" text,\n \"winner\" text\n);\n\nQuestion: List all the runners-up on 16 October 2012?"
},
{
"role": "assistant",
"content": "SELECT \"runners_up\" FROM \"series_overview\" WHERE \"finale\"='16 October 2012';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_overview\" (\n \"series\" real,\n \"premiere\" text,\n \"finale\" text,\n \"runners_up\" text,\n \"winner\" text\n);\n\nQuestion: What is the date when Miranda Gore Browne was runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"finale\" FROM \"series_overview\" WHERE \"runners_up\"='Miranda Gore Browne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_overview\" (\n \"series\" real,\n \"premiere\" text,\n \"finale\" text,\n \"runners_up\" text,\n \"winner\" text\n);\n\nQuestion: What is the date of the finale where Holly Bell was runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"finale\" FROM \"series_overview\" WHERE \"runners_up\"='Holly Bell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_overview\" (\n \"series\" real,\n \"premiere\" text,\n \"finale\" text,\n \"runners_up\" text,\n \"winner\" text\n);\n\nQuestion: What is the premiere of the season where Holly Bell was the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"premiere\" FROM \"series_overview\" WHERE \"runners_up\"='Holly Bell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_overview\" (\n \"series\" real,\n \"premiere\" text,\n \"finale\" text,\n \"runners_up\" text,\n \"winner\" text\n);\n\nQuestion: How many runners-up were there when Joanne Wheatley won?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"runners_up\") FROM \"series_overview\" WHERE \"winner\"='Joanne Wheatley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_overview\" (\n \"series\" real,\n \"premiere\" text,\n \"finale\" text,\n \"runners_up\" text,\n \"winner\" text\n);\n\nQuestion: Who won the season for which Brendan Lynch is the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"series_overview\" WHERE \"runners_up\"='Brendan Lynch';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What is the pick # when the new jersey devils is the nhl team?"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"round_three\" WHERE \"nhl_team\"='New Jersey Devils';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which college/junior/team has defence as the position with canada as the nationality and the pick # is less than 61.0?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team\" FROM \"round_three\" WHERE \"position\"='Defence' AND \"nationality\"='Canada' AND \"pick_num\"<61.0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which nhl team has kris draper as the player?"
},
{
"role": "assistant",
"content": "SELECT \"nhl_team\" FROM \"round_three\" WHERE \"player\"='Kris Draper';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which position has new Jersey Devils as the nhl team?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_three\" WHERE \"nhl_team\"='New Jersey Devils';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which college/junior/club team has jim mathieson as the player?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team\" FROM \"round_three\" WHERE \"player\"='Jim Mathieson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28967275_2\" (\n \"episode_num\" real,\n \"series_num\" real,\n \"episode_title\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What is the series number of \"the fallen star\"?"
},
{
"role": "assistant",
"content": "SELECT \"series_num\" FROM \"table1_28967275_2\" WHERE \"episode_title\"='\\\"The Fallen Star\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28967275_2\" (\n \"episode_num\" real,\n \"series_num\" real,\n \"episode_title\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What is the production code of the episode with series #8?"
},
{
"role": "assistant",
"content": "SELECT \"production_code\" FROM \"table1_28967275_2\" WHERE \"series_num\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28967275_2\" (\n \"episode_num\" real,\n \"series_num\" real,\n \"episode_title\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: How many episodes are titled \"the suspension\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"episode_num\") FROM \"table1_28967275_2\" WHERE \"episode_title\"='\\\"The Suspension\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28967275_2\" (\n \"episode_num\" real,\n \"series_num\" real,\n \"episode_title\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What is the title of the episode with series number 14?"
},
{
"role": "assistant",
"content": "SELECT \"episode_title\" FROM \"table1_28967275_2\" WHERE \"series_num\"=14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_28967275_2\" (\n \"episode_num\" real,\n \"series_num\" real,\n \"episode_title\" text,\n \"original_air_date\" text,\n \"production_code\" real\n);\n\nQuestion: What is the original airdate of episode #31?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_28967275_2\" WHERE \"episode_num\"=31;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_eight\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Who was drafted to the Vancouver Canucks?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_eight\" WHERE \"nhl_team\"='Vancouver Canucks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_eight\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: How many figures are provided for the team when the position drafted is center?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"nhl_team\") FROM \"round_eight\" WHERE \"position\"='Center';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_eight\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What was the pick number when Paul Krake was selected?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick_num\") FROM \"round_eight\" WHERE \"player\"='Paul Krake';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_eight\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What pick number did the New York Rangers have?"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"round_eight\" WHERE \"nhl_team\"='New York Rangers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_eight\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What pick number was the Boston Bruins selection for defence?"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"round_eight\" WHERE \"position\"='Defence' AND \"nhl_team\"='Boston Bruins';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which player is pick 64?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_four\" WHERE \"pick_num\"=64;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which player is the centre for the Detroit Red Wings?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_four\" WHERE \"position\"='Centre' AND \"nhl_team\"='Detroit Red Wings';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: How many positions drafted for the Minnesota North Stars?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"position\") FROM \"round_four\" WHERE \"nhl_team\"='Minnesota North Stars';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_seven\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What position did Roseau High School (USHS-MN) play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_seven\" WHERE \"college_junior_club_team\"='Roseau High School (USHS-MN)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_seven\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What are Scott Zygulski's pick numbers?"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"round_seven\" WHERE \"player\"='Scott Zygulski';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_seven\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which country is pick# 136 from?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"round_seven\" WHERE \"pick_num\"=136;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_seven\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: How many nationalities does Alex Nikolic come from?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"nationality\") FROM \"round_seven\" WHERE \"player\"='Alex Nikolic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_seven\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: How many NHL teams have a pick number of 128?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"nhl_team\") FROM \"round_seven\" WHERE \"pick_num\"=128;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_7_3_4\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the opponents for anabel medina garrigues"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"opponents\") FROM \"doubles_7_3_4\" WHERE \"partner\"='Anabel Medina Garrigues';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_7_3_4\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Name the parter for w/o"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"doubles_7_3_4\" WHERE \"score\"='w/o';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regional_broadcast_television_networks\" (\n \"network\" text,\n \"flagship\" text,\n \"programming\" text,\n \"region\" text,\n \"origin\" text,\n \"owner\" text\n);\n\nQuestion: Which of the networks originate in Xalapa?"
},
{
"role": "assistant",
"content": "SELECT \"network\" FROM \"regional_broadcast_television_networks\" WHERE \"origin\"='Xalapa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regional_broadcast_television_networks\" (\n \"network\" text,\n \"flagship\" text,\n \"programming\" text,\n \"region\" text,\n \"origin\" text,\n \"owner\" text\n);\n\nQuestion: What are all the programs on the Soy Guerrero network?"
},
{
"role": "assistant",
"content": "SELECT \"programming\" FROM \"regional_broadcast_television_networks\" WHERE \"network\"='Soy Guerrero';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regional_broadcast_television_networks\" (\n \"network\" text,\n \"flagship\" text,\n \"programming\" text,\n \"region\" text,\n \"origin\" text,\n \"owner\" text\n);\n\nQuestion: Which owners originate in Mexico City?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"regional_broadcast_television_networks\" WHERE \"origin\"='Mexico City';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regional_broadcast_television_networks\" (\n \"network\" text,\n \"flagship\" text,\n \"programming\" text,\n \"region\" text,\n \"origin\" text,\n \"owner\" text\n);\n\nQuestion: Which network serves the Guerrero region"
},
{
"role": "assistant",
"content": "SELECT \"network\" FROM \"regional_broadcast_television_networks\" WHERE \"region\"='Guerrero';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regional_broadcast_television_networks\" (\n \"network\" text,\n \"flagship\" text,\n \"programming\" text,\n \"region\" text,\n \"origin\" text,\n \"owner\" text\n);\n\nQuestion: Which regions are owned by estado de tabasco?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"regional_broadcast_television_networks\" WHERE \"owner\"='Estado de Tabasco';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_codes\" (\n \"code\" text,\n \"subdivision_name_be_bgn_pcgn\" text,\n \"subdivision_name_be_gost\" text,\n \"subdivision_name_ru_bgn_pcgn\" text,\n \"subdivision_name_ru_gost\" text,\n \"subdivision_category\" text\n);\n\nQuestion: What subdivision names (RU) have a code of by-hr?"
},
{
"role": "assistant",
"content": "SELECT \"subdivision_name_ru_bgn_pcgn\" FROM \"current_codes\" WHERE \"code\"='BY-HR';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_codes\" (\n \"code\" text,\n \"subdivision_name_be_bgn_pcgn\" text,\n \"subdivision_name_be_gost\" text,\n \"subdivision_name_ru_bgn_pcgn\" text,\n \"subdivision_name_ru_gost\" text,\n \"subdivision_category\" text\n);\n\nQuestion: What cods have a subdivision name (RU) of Grodnenskaya Oblast'?"
},
{
"role": "assistant",
"content": "SELECT \"code\" FROM \"current_codes\" WHERE \"subdivision_name_ru_bgn_pcgn\"='Grodnenskaya oblast''';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_codes\" (\n \"code\" text,\n \"subdivision_name_be_bgn_pcgn\" text,\n \"subdivision_name_be_gost\" text,\n \"subdivision_name_ru_bgn_pcgn\" text,\n \"subdivision_name_ru_gost\" text,\n \"subdivision_category\" text\n);\n\nQuestion: What are the subdivision names (RU) where the subdivision name (BE) is Hrodzenskaya Voblasts'?"
},
{
"role": "assistant",
"content": "SELECT \"subdivision_name_ru_gost\" FROM \"current_codes\" WHERE \"subdivision_name_be_bgn_pcgn\"='Hrodzenskaya voblasts''';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_codes\" (\n \"code\" text,\n \"subdivision_name_be_bgn_pcgn\" text,\n \"subdivision_name_be_gost\" text,\n \"subdivision_name_ru_bgn_pcgn\" text,\n \"subdivision_name_ru_gost\" text,\n \"subdivision_category\" text\n);\n\nQuestion: What is the subdivision name (BE) where subdivision name (RU) (BGN) is Grodnenskaya Oblast'?"
},
{
"role": "assistant",
"content": "SELECT \"subdivision_name_be_bgn_pcgn\" FROM \"current_codes\" WHERE \"subdivision_name_ru_bgn_pcgn\"='Grodnenskaya oblast''';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_codes\" (\n \"code\" text,\n \"subdivision_name_be_bgn_pcgn\" text,\n \"subdivision_name_be_gost\" text,\n \"subdivision_name_ru_bgn_pcgn\" text,\n \"subdivision_name_ru_gost\" text,\n \"subdivision_category\" text\n);\n\nQuestion: Which codes have subdivision names (BE) (BGN) of Homyel'skaya Voblasts'?"
},
{
"role": "assistant",
"content": "SELECT \"code\" FROM \"current_codes\" WHERE \"subdivision_name_be_bgn_pcgn\"='Homyel''skaya voblasts''';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"history\" (\n \"number\" text,\n \"serial_number\" real,\n \"into_service\" text,\n \"withdrawn\" text,\n \"scrapped\" text\n);\n\nQuestion: Name the into service for dh1"
},
{
"role": "assistant",
"content": "SELECT \"into_service\" FROM \"history\" WHERE \"number\"='DH1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"history\" (\n \"number\" text,\n \"serial_number\" real,\n \"into_service\" text,\n \"withdrawn\" text,\n \"scrapped\" text\n);\n\nQuestion: Name the withdrawn for example and serial number 579"
},
{
"role": "assistant",
"content": "SELECT \"withdrawn\" FROM \"history\" WHERE \"into_service\"='Example' AND \"serial_number\"=579;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"history\" (\n \"number\" text,\n \"serial_number\" real,\n \"into_service\" text,\n \"withdrawn\" text,\n \"scrapped\" text\n);\n\nQuestion: Name the into service for dh2"
},
{
"role": "assistant",
"content": "SELECT \"into_service\" FROM \"history\" WHERE \"number\"='DH2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"history\" (\n \"number\" text,\n \"serial_number\" real,\n \"into_service\" text,\n \"withdrawn\" text,\n \"scrapped\" text\n);\n\nQuestion: Name the most serial number for feb 1994"
},
{
"role": "assistant",
"content": "SELECT MAX(\"serial_number\") FROM \"history\" WHERE \"scrapped\"='Feb 1994';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"history\" (\n \"number\" text,\n \"serial_number\" real,\n \"into_service\" text,\n \"withdrawn\" text,\n \"scrapped\" text\n);\n\nQuestion: Name the number for 2004 scapped"
},
{
"role": "assistant",
"content": "SELECT \"number\" FROM \"history\" WHERE \"scrapped\"='2004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"history\" (\n \"number\" text,\n \"serial_number\" real,\n \"into_service\" text,\n \"withdrawn\" text,\n \"scrapped\" text\n);\n\nQuestion: Name the into service for dh1"
},
{
"role": "assistant",
"content": "SELECT \"into_service\" FROM \"history\" WHERE \"number\"='DH1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_year\" (\n \"month_sequence\" real,\n \"numbered_month\" text,\n \"month_name\" text,\n \"regular_year\" text,\n \"defective_year\" real,\n \"excessive_year\" real\n);\n\nQuestion: How many month names are there for the tenth numbered month?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"month_name\") FROM \"the_year\" WHERE \"numbered_month\"='Tenth';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_year\" (\n \"month_sequence\" real,\n \"numbered_month\" text,\n \"month_name\" text,\n \"regular_year\" text,\n \"defective_year\" real,\n \"excessive_year\" real\n);\n\nQuestion: What is the defective year for the eighth numbered month?"
},
{
"role": "assistant",
"content": "SELECT \"defective_year\" FROM \"the_year\" WHERE \"numbered_month\"='Eighth';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_year\" (\n \"month_sequence\" real,\n \"numbered_month\" text,\n \"month_name\" text,\n \"regular_year\" text,\n \"defective_year\" real,\n \"excessive_year\" real\n);\n\nQuestion: What is the month sequence for the month name of av?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"month_sequence\") FROM \"the_year\" WHERE \"month_name\"='Av';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_year\" (\n \"month_sequence\" real,\n \"numbered_month\" text,\n \"month_name\" text,\n \"regular_year\" text,\n \"defective_year\" real,\n \"excessive_year\" real\n);\n\nQuestion: What is the defective year for the regular year of 29 days and month sequence of 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"defective_year\") FROM \"the_year\" WHERE \"regular_year\"='29 days' AND \"month_sequence\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"episode\" real,\n \"first_air_date\" text,\n \"rating_18_49\" text,\n \"share_18_49\" real,\n \"viewers_millions\" text,\n \"rank_timeslot\" text\n);\n\nQuestion: When 4.5 is the rating (18-49) what is the air date?"
},
{
"role": "assistant",
"content": "SELECT \"first_air_date\" FROM \"u_s_nielsen_ratings\" WHERE \"rating_18_49\"='4.5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"episode\" real,\n \"first_air_date\" text,\n \"rating_18_49\" text,\n \"share_18_49\" real,\n \"viewers_millions\" text,\n \"rank_timeslot\" text\n);\n\nQuestion: When 13 is the share (18-49) what is the rank (timeslot)?"
},
{
"role": "assistant",
"content": "SELECT \"rank_timeslot\" FROM \"u_s_nielsen_ratings\" WHERE \"share_18_49\"=13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"episode\" real,\n \"first_air_date\" text,\n \"rating_18_49\" text,\n \"share_18_49\" real,\n \"viewers_millions\" text,\n \"rank_timeslot\" text\n);\n\nQuestion: When 11 is the episode what is the air date?"
},
{
"role": "assistant",
"content": "SELECT \"first_air_date\" FROM \"u_s_nielsen_ratings\" WHERE \"episode\"=11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"episode\" real,\n \"first_air_date\" text,\n \"rating_18_49\" text,\n \"share_18_49\" real,\n \"viewers_millions\" text,\n \"rank_timeslot\" text\n);\n\nQuestion: When there are 10.02 million viewers what is the rating (18-49)?"
},
{
"role": "assistant",
"content": "SELECT \"rating_18_49\" FROM \"u_s_nielsen_ratings\" WHERE \"viewers_millions\"='10.02';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"episode\" real,\n \"first_air_date\" text,\n \"rating_18_49\" text,\n \"share_18_49\" real,\n \"viewers_millions\" text,\n \"rank_timeslot\" text\n);\n\nQuestion: When there are 9.28 million viewers what is the share (18-49)?"
},
{
"role": "assistant",
"content": "SELECT \"share_18_49\" FROM \"u_s_nielsen_ratings\" WHERE \"viewers_millions\"='9.28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"episode\" real,\n \"first_air_date\" text,\n \"rating_18_49\" text,\n \"share_18_49\" real,\n \"viewers_millions\" text,\n \"rank_timeslot\" text\n);\n\nQuestion: When 4 is the episode what is the air date?"
},
{
"role": "assistant",
"content": "SELECT \"first_air_date\" FROM \"u_s_nielsen_ratings\" WHERE \"episode\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_21_10_titles_11_runners_up\" (\n \"result\" text,\n \"no\" real,\n \"date\" text,\n \"category\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: How many different results were there for the scores 6\u20137 (2\u20137) , 6\u20132, 7\u20136 (7\u20133)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"result\") FROM \"singles_21_10_titles_11_runners_up\" WHERE \"score\"='6\u20137 (2\u20137) , 6\u20132, 7\u20136 (7\u20133)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episode_information\" (\n \"episode\" real,\n \"title\" text,\n \"writer\" text,\n \"director\" text,\n \"original_airdate\" text,\n \"ratings_kanto\" text\n);\n\nQuestion: Who was the writer for episode 3?"
},
{
"role": "assistant",
"content": "SELECT \"writer\" FROM \"episode_information\" WHERE \"episode\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episode_information\" (\n \"episode\" real,\n \"title\" text,\n \"writer\" text,\n \"director\" text,\n \"original_airdate\" text,\n \"ratings_kanto\" text\n);\n\nQuestion: What was the original airdate for the episode written by daisuke habara and directed by akimitsu sasaki"
},
{
"role": "assistant",
"content": "SELECT \"original_airdate\" FROM \"episode_information\" WHERE \"writer\"='Daisuke Habara' AND \"director\"='Akimitsu Sasaki';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episode_information\" (\n \"episode\" real,\n \"title\" text,\n \"writer\" text,\n \"director\" text,\n \"original_airdate\" text,\n \"ratings_kanto\" text\n);\n\nQuestion: What episode did tomoyuki furumaya"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"episode_information\" WHERE \"director\"='Tomoyuki Furumaya';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_home_and_away_season\" (\n \"round\" real,\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"score_collingwoods_score_is_in_bold\" text,\n \"result_includes_margin\" text,\n \"venue\" text,\n \"position_on_ladder\" text\n);\n\nQuestion: What is the earliest round where collingswood lost by 36 points?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"regular_home_and_away_season\" WHERE \"result_includes_margin\"='Lost by 36 points';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_home_and_away_season\" (\n \"round\" real,\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"score_collingwoods_score_is_in_bold\" text,\n \"result_includes_margin\" text,\n \"venue\" text,\n \"position_on_ladder\" text\n);\n\nQuestion: What was the score on saturday, 26 june 7:10pm?"
},
{
"role": "assistant",
"content": "SELECT \"score_collingwoods_score_is_in_bold\" FROM \"regular_home_and_away_season\" WHERE \"date\"='Saturday, 26 June 7:10pm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_home_and_away_season\" (\n \"round\" real,\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"score_collingwoods_score_is_in_bold\" text,\n \"result_includes_margin\" text,\n \"venue\" text,\n \"position_on_ladder\" text\n);\n\nQuestion: What is the round number of the round against melbourne on saturday, 4 april 2:10pm?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"regular_home_and_away_season\" WHERE \"opponent\"='Melbourne' AND \"date\"='Saturday, 4 April 2:10pm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_home_and_away_season\" (\n \"round\" real,\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"score_collingwoods_score_is_in_bold\" text,\n \"result_includes_margin\" text,\n \"venue\" text,\n \"position_on_ladder\" text\n);\n\nQuestion: Which venue did collingsworth play essendon in when they had the 3rd position on the ladder?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"regular_home_and_away_season\" WHERE \"opponent\"='Essendon' AND \"position_on_ladder\"='3rd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_home_and_away_season\" (\n \"round\" real,\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"score_collingwoods_score_is_in_bold\" text,\n \"result_includes_margin\" text,\n \"venue\" text,\n \"position_on_ladder\" text\n);\n\nQuestion: Was the round where they were in 6th at home or away?"
},
{
"role": "assistant",
"content": "SELECT \"home_away\" FROM \"regular_home_and_away_season\" WHERE \"position_on_ladder\"='6th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"num\" real,\n \"position\" text,\n \"height\" text,\n \"weight_lb\" real,\n \"year\" text,\n \"hometown\" text,\n \"previous_school\" text\n);\n\nQuestion: What was the previous school for the forward with a height of ft5in (m)?"
},
{
"role": "assistant",
"content": "SELECT \"previous_school\" FROM \"roster\" WHERE \"height\"='ft5in (m)' AND \"position\"='Forward';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"num\" real,\n \"position\" text,\n \"height\" text,\n \"weight_lb\" real,\n \"year\" text,\n \"hometown\" text,\n \"previous_school\" text\n);\n\nQuestion: What is the lowest listed number for a player?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"num\") FROM \"roster\";"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"num\" real,\n \"position\" text,\n \"height\" text,\n \"weight_lb\" real,\n \"year\" text,\n \"hometown\" text,\n \"previous_school\" text\n);\n\nQuestion: Who previously attended south kent school / brentwood hs?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"roster\" WHERE \"previous_school\"='South Kent School / Brentwood HS';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"num\" real,\n \"position\" text,\n \"height\" text,\n \"weight_lb\" real,\n \"year\" text,\n \"hometown\" text,\n \"previous_school\" text\n);\n\nQuestion: What is the highest number a guard from brophy college prep wore?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"num\") FROM \"roster\" WHERE \"position\"='Guard' AND \"previous_school\"='Brophy College Prep';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29063233_1\" (\n \"no_overall\" real,\n \"no_for_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"uk_viewers_million\" text\n);\n\nQuestion: How many directed by entries have UK viewership over 6.16 million?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"directed_by\") FROM \"table1_29063233_1\" WHERE \"uk_viewers_million\"='6.16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29063233_1\" (\n \"no_overall\" real,\n \"no_for_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"uk_viewers_million\" text\n);\n\nQuestion: Who directed the episode with a UK viewership of exactly 5.77 million?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_29063233_1\" WHERE \"uk_viewers_million\"='5.77';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29063233_1\" (\n \"no_overall\" real,\n \"no_for_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"uk_viewers_million\" text\n);\n\nQuestion: What was the airdate of the episode with a UK viewership of 6.02 million?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_29063233_1\" WHERE \"uk_viewers_million\"='6.02';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29063233_1\" (\n \"no_overall\" real,\n \"no_for_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"uk_viewers_million\" text\n);\n\nQuestion: Who directed the episode with UK viewership of 6.09 million?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_29063233_1\" WHERE \"uk_viewers_million\"='6.09';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leadership_classification\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Name the general classification for mauricio soler"
},
{
"role": "assistant",
"content": "SELECT \"general_classification\" FROM \"leadership_classification\" WHERE \"winner\"='Mauricio Soler';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leadership_classification\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Name the general classification for steven kruijswijk"
},
{
"role": "assistant",
"content": "SELECT \"general_classification\" FROM \"leadership_classification\" WHERE \"winner\"='Steven Kruijswijk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leadership_classification\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Name the points classification for levi leipheimer"
},
{
"role": "assistant",
"content": "SELECT \"points_classification\" FROM \"leadership_classification\" WHERE \"general_classification\"='Levi Leipheimer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leadership_classification\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Name the mountains classification for rabobank and damiano cunego"
},
{
"role": "assistant",
"content": "SELECT \"mountains_classification\" FROM \"leadership_classification\" WHERE \"team_classification\"='Rabobank' AND \"general_classification\"='Damiano Cunego';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leadership_classification\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Name the team classification for thomas de gendt"
},
{
"role": "assistant",
"content": "SELECT \"team_classification\" FROM \"leadership_classification\" WHERE \"winner\"='Thomas De Gendt';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"class_34_500_ge_type_u26_c\" (\n \"ge_dl_works_no\" real,\n \"year_built\" text,\n \"built_for\" text,\n \"original_no\" text,\n \"new_owner\" text,\n \"new_no\" text\n);\n\nQuestion: What is listed in built for when the original number is 24d?"
},
{
"role": "assistant",
"content": "SELECT \"built_for\" FROM \"class_34_500_ge_type_u26_c\" WHERE \"original_no\"='24D';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29102612_1\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What is the original air date when the title is \"be prepared\"?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_29102612_1\" WHERE \"title\"='\\\"Be Prepared\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29102612_1\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"prod_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What is the season # when ther are 5.3 million U.S viewers?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"season_num\") FROM \"table1_29102612_1\" WHERE \"u_s_viewers_millions\"='5.3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29106680_1\" (\n \"no_overall\" real,\n \"no_for_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"uk_viewers_million\" text\n);\n\nQuestion: What dat did \"The changeling\" originally air?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_29106680_1\" WHERE \"title\"='\\\"The Changeling\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29106680_1\" (\n \"no_overall\" real,\n \"no_for_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"uk_viewers_million\" text\n);\n\nQuestion: What date did \"the eye of the phoenix\" originally air?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_29106680_1\" WHERE \"title\"='\\\"The Eye of the Phoenix\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29106680_1\" (\n \"no_overall\" real,\n \"no_for_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"uk_viewers_million\" text\n);\n\nQuestion: What episode number of the series is \"the coming of arthur (part 1)\"?"
},
{
"role": "assistant",
"content": "SELECT \"no_for_series\" FROM \"table1_29106680_1\" WHERE \"title\"='\\\"The Coming of Arthur (Part 1)\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29087004_3\" (\n \"series_num\" real,\n \"production_code\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"united_states_original_airdate\" text,\n \"canada_original_airdate\" text\n);\n\nQuestion: What are the titles of episodes written by Eric Trueheart?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"table1_29087004_3\" WHERE \"written_by\"='Eric Trueheart';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29087004_3\" (\n \"series_num\" real,\n \"production_code\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"united_states_original_airdate\" text,\n \"canada_original_airdate\" text\n);\n\nQuestion: What is the highest numbered episode where the title is \"The Ruff Ruff Bunch\"?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"series_num\") FROM \"table1_29087004_3\" WHERE \"title\"='\\\"The Ruff Ruff Bunch\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29087004_3\" (\n \"series_num\" real,\n \"production_code\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"united_states_original_airdate\" text,\n \"canada_original_airdate\" text\n);\n\nQuestion: Who were the writers of episode/s first aired in the US on June 9, 2012?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_29087004_3\" WHERE \"united_states_original_airdate\"='June 9, 2012';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_29087004_3\" (\n \"series_num\" real,\n \"production_code\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"united_states_original_airdate\" text,\n \"canada_original_airdate\" text\n);\n\nQuestion: When was the episode titled \"The Fraud Princess\" first aired in the United States?"
},
{
"role": "assistant",
"content": "SELECT \"united_states_original_airdate\" FROM \"table1_29087004_3\" WHERE \"title\"='\\\"The Fraud Princess\\\"';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.