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 \"lpga_tour_wins_7\" (\n \"no\" real,\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: How many tournaments were at sime darby lpga malaysia?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"no\") FROM \"lpga_tour_wins_7\" WHERE \"tournament\"='Sime Darby LPGA Malaysia';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_7\" (\n \"no\" real,\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Margin of victory on no. 4 was?"
},
{
"role": "assistant",
"content": "SELECT \"margin_of_victory\" FROM \"lpga_tour_wins_7\" WHERE \"no\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_7\" (\n \"no\" real,\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Who was the runner up when the won by 4 strokes?"
},
{
"role": "assistant",
"content": "SELECT \"runner_s_up\" FROM \"lpga_tour_wins_7\" WHERE \"margin_of_victory\"='4 strokes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21655290_1\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: Which film title used in nomination has the year (ceremony) 1990 (63rd)?"
},
{
"role": "assistant",
"content": "SELECT \"film_title_used_in_nomination\" FROM \"table1_21655290_1\" WHERE \"year_ceremony\"='1990 (63rd)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21655290_1\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: Who is the director of kon-tiki original title?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"table1_21655290_1\" WHERE \"original_title\"='Kon-Tiki';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21655290_1\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: Which film title used in nomination has vinterkyss as the original title?"
},
{
"role": "assistant",
"content": "SELECT \"film_title_used_in_nomination\" FROM \"table1_21655290_1\" WHERE \"original_title\"='Vinterkyss';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ladies_european_tour_wins_6\" (\n \"no\" real,\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text,\n \"winners_share\" real\n);\n\nQuestion: What is the date for the tournament McDonald's wpga championship?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"ladies_european_tour_wins_6\" WHERE \"tournament\"='McDonald''s WPGA Championship';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ladies_european_tour_wins_6\" (\n \"no\" real,\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text,\n \"winners_share\" real\n);\n\nQuestion: What is the winning score when 5 strokes is the margin of victory?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"ladies_european_tour_wins_6\" WHERE \"margin_of_victory\"='5 strokes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ladies_european_tour_wins_6\" (\n \"no\" real,\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text,\n \"winners_share\" real\n);\n\nQuestion: What is the to par with the winning score of 74-67-71-73=285?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"ladies_european_tour_wins_6\" WHERE \"winning_score\"='74-67-71-73=285';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ladies_european_tour_wins_6\" (\n \"no\" real,\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"to_par\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text,\n \"winners_share\" real\n);\n\nQuestion: What is the date of the winning score 74-67-71-73=285?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"ladies_european_tour_wins_6\" WHERE \"winning_score\"='74-67-71-73=285';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21666472_1\" (\n \"no_in_total\" text,\n \"no_in_series\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: What number in series is \"Diamonds\"?"
},
{
"role": "assistant",
"content": "SELECT \"no_in_series\" FROM \"table1_21666472_1\" WHERE \"title\"='\\\"Diamonds\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21666472_1\" (\n \"no_in_total\" text,\n \"no_in_series\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: Who directed \"A Tale of Two Hitmen\"?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_21666472_1\" WHERE \"title\"='\\\"A Tale of Two Hitmen\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21666472_1\" (\n \"no_in_total\" text,\n \"no_in_series\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: How many number in series's are written by Greg Haddrick?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"no_in_series\") FROM \"table1_21666472_1\" WHERE \"written_by\"='Greg Haddrick';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21666472_1\" (\n \"no_in_total\" text,\n \"no_in_series\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: What number in series is \"Judas Kiss\"?"
},
{
"role": "assistant",
"content": "SELECT \"no_in_series\" FROM \"table1_21666472_1\" WHERE \"title\"='\\\"Judas Kiss\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21666472_1\" (\n \"no_in_total\" text,\n \"no_in_series\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: What was the original airdate of \"A Nice Little Earner\"?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_21666472_1\" WHERE \"title\"='\\\"A Nice Little Earner\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_216655_1\" (\n \"university\" text,\n \"established_as_a_university\" real,\n \"first_establishment\" real,\n \"student_population_fte_2009\" real,\n \"research_grants_2009_in_billion_sek\" text\n);\n\nQuestion: whatis the year the first establishment had research grants in the amount of 4.027?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"first_establishment\") FROM \"table1_216655_1\" WHERE \"research_grants_2009_in_billion_sek\"='4.027';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_216655_1\" (\n \"university\" text,\n \"established_as_a_university\" real,\n \"first_establishment\" real,\n \"student_population_fte_2009\" real,\n \"research_grants_2009_in_billion_sek\" text\n);\n\nQuestion: what is the total number of established univeristy receiving research grants in the amount of 2.203?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"established_as_a_university\") FROM \"table1_216655_1\" WHERE \"research_grants_2009_in_billion_sek\"='2.203';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_216655_1\" (\n \"university\" text,\n \"established_as_a_university\" real,\n \"first_establishment\" real,\n \"student_population_fte_2009\" real,\n \"research_grants_2009_in_billion_sek\" text\n);\n\nQuestion: what are the student population where research grants is 1.812?"
},
{
"role": "assistant",
"content": "SELECT \"student_population_fte_2009\" FROM \"table1_216655_1\" WHERE \"research_grants_2009_in_billion_sek\"='1.812';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_216655_1\" (\n \"university\" text,\n \"established_as_a_university\" real,\n \"first_establishment\" real,\n \"student_population_fte_2009\" real,\n \"research_grants_2009_in_billion_sek\" text\n);\n\nQuestion: what is the first establishement where research grants is 2.033?"
},
{
"role": "assistant",
"content": "SELECT \"first_establishment\" FROM \"table1_216655_1\" WHERE \"research_grants_2009_in_billion_sek\"='2.033';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_216655_1\" (\n \"university\" text,\n \"established_as_a_university\" real,\n \"first_establishment\" real,\n \"student_population_fte_2009\" real,\n \"research_grants_2009_in_billion_sek\" text\n);\n\nQuestion: what is the minimum student population where the research grants is 2.203?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"student_population_fte_2009\") FROM \"table1_216655_1\" WHERE \"research_grants_2009_in_billion_sek\"='2.203';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_winners_of_olympiatravet\" (\n \"year\" real,\n \"horse\" text,\n \"driver\" text,\n \"trainer\" text,\n \"country_of_owner\" text,\n \"odds_of_winner\" text,\n \"winning_time_km_rate\" text\n);\n\nQuestion: When were the odds of winner 16.66?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"all_winners_of_olympiatravet\" WHERE \"odds_of_winner\"='16.66';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_winners_of_olympiatravet\" (\n \"year\" real,\n \"horse\" text,\n \"driver\" text,\n \"trainer\" text,\n \"country_of_owner\" text,\n \"odds_of_winner\" text,\n \"winning_time_km_rate\" text\n);\n\nQuestion: What was the winning time in the year when the odds of the winner were 2.94?"
},
{
"role": "assistant",
"content": "SELECT \"winning_time_km_rate\" FROM \"all_winners_of_olympiatravet\" WHERE \"odds_of_winner\"='2.94';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_winners_of_olympiatravet\" (\n \"year\" real,\n \"horse\" text,\n \"driver\" text,\n \"trainer\" text,\n \"country_of_owner\" text,\n \"odds_of_winner\" text,\n \"winning_time_km_rate\" text\n);\n\nQuestion: What were Gentleman's odds of winner?"
},
{
"role": "assistant",
"content": "SELECT \"odds_of_winner\" FROM \"all_winners_of_olympiatravet\" WHERE \"horse\"='Gentleman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_winners_of_olympiatravet\" (\n \"year\" real,\n \"horse\" text,\n \"driver\" text,\n \"trainer\" text,\n \"country_of_owner\" text,\n \"odds_of_winner\" text,\n \"winning_time_km_rate\" text\n);\n\nQuestion: How many countries did Utah Bulwark's owner come from?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"country_of_owner\") FROM \"all_winners_of_olympiatravet\" WHERE \"horse\"='Utah Bulwark';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"all_winners_of_olympiatravet\" (\n \"year\" real,\n \"horse\" text,\n \"driver\" text,\n \"trainer\" text,\n \"country_of_owner\" text,\n \"odds_of_winner\" text,\n \"winning_time_km_rate\" text\n);\n\nQuestion: How many horses are mentioned competing in 1985?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"horse\") FROM \"all_winners_of_olympiatravet\" WHERE \"year\"=1985;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2168295_1\" (\n \"district\" text,\n \"headquarters\" text,\n \"area_km\" real,\n \"population_2011\" real,\n \"division\" text\n);\n\nQuestion: If the headquarters is Bharatpur, what is the maximum area?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"area_km\") FROM \"table1_2168295_1\" WHERE \"headquarters\"='Bharatpur';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2168295_1\" (\n \"district\" text,\n \"headquarters\" text,\n \"area_km\" real,\n \"population_2011\" real,\n \"division\" text\n);\n\nQuestion: If the district is Chittorgarh, what is the area?"
},
{
"role": "assistant",
"content": "SELECT \"area_km\" FROM \"table1_2168295_1\" WHERE \"district\"='Chittorgarh';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2168295_1\" (\n \"district\" text,\n \"headquarters\" text,\n \"area_km\" real,\n \"population_2011\" real,\n \"division\" text\n);\n\nQuestion: If the 2011 population is 3685681, what is the name of the headquarters?"
},
{
"role": "assistant",
"content": "SELECT \"headquarters\" FROM \"table1_2168295_1\" WHERE \"population_2011\"=3685681;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2168295_1\" (\n \"district\" text,\n \"headquarters\" text,\n \"area_km\" real,\n \"population_2011\" real,\n \"division\" text\n);\n\nQuestion: What is the minimum area id the 2011 population is 3067549?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"area_km\") FROM \"table1_2168295_1\" WHERE \"population_2011\"=3067549;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2168295_1\" (\n \"district\" text,\n \"headquarters\" text,\n \"area_km\" real,\n \"population_2011\" real,\n \"division\" text\n);\n\nQuestion: What is the 2011 population if the headquarters is Chittorgarh?"
},
{
"role": "assistant",
"content": "SELECT \"population_2011\" FROM \"table1_2168295_1\" WHERE \"headquarters\"='Chittorgarh';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"municipalities\" (\n \"municipality\" text,\n \"type\" text,\n \"district\" text,\n \"area_km\" text,\n \"population_2010\" real,\n \"pop_density_per_km\" text,\n \"no_of_barangays\" real,\n \"municipal_mayor\" text\n);\n\nQuestion: How many different municipal mayors were there in the municipality with an area of 42.66 km2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"municipal_mayor\") FROM \"municipalities\" WHERE \"area_km\"='42.66';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"municipalities\" (\n \"municipality\" text,\n \"type\" text,\n \"district\" text,\n \"area_km\" text,\n \"population_2010\" real,\n \"pop_density_per_km\" text,\n \"no_of_barangays\" real,\n \"municipal_mayor\" text\n);\n\nQuestion: What municipality had 26839 people living in it in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"municipality\" FROM \"municipalities\" WHERE \"population_2010\"=26839;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"municipalities\" (\n \"municipality\" text,\n \"type\" text,\n \"district\" text,\n \"area_km\" text,\n \"population_2010\" real,\n \"pop_density_per_km\" text,\n \"no_of_barangays\" real,\n \"municipal_mayor\" text\n);\n\nQuestion: In what municipality were there 757.5 people per km2?"
},
{
"role": "assistant",
"content": "SELECT \"municipality\" FROM \"municipalities\" WHERE \"pop_density_per_km\"='757.5';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"municipalities\" (\n \"municipality\" text,\n \"type\" text,\n \"district\" text,\n \"area_km\" text,\n \"population_2010\" real,\n \"pop_density_per_km\" text,\n \"no_of_barangays\" real,\n \"municipal_mayor\" text\n);\n\nQuestion: How many different counts of the population in Cavinti in 2010 are there?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"population_2010\") FROM \"municipalities\" WHERE \"municipality\"='Cavinti';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"municipalities\" (\n \"municipality\" text,\n \"type\" text,\n \"district\" text,\n \"area_km\" text,\n \"population_2010\" real,\n \"pop_density_per_km\" text,\n \"no_of_barangays\" real,\n \"municipal_mayor\" text\n);\n\nQuestion: How many people per km2 are there in the municipality whose mayor is Boy Quiat?"
},
{
"role": "assistant",
"content": "SELECT \"pop_density_per_km\" FROM \"municipalities\" WHERE \"municipal_mayor\"='Boy Quiat';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21696800_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What's the number of the episode seen by 2.24 million people in the US?"
},
{
"role": "assistant",
"content": "SELECT \"num\" FROM \"table1_21696800_1\" WHERE \"u_s_viewers_million\"='2.24';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21696800_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: How many millions of people in the US saw the episode titled \"Rabid\"?"
},
{
"role": "assistant",
"content": "SELECT \"u_s_viewers_million\" FROM \"table1_21696800_1\" WHERE \"title\"='\\\"Rabid\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21696800_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: How many different episode numbers are there for episodes directed by Wayne Rose?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"num\") FROM \"table1_21696800_1\" WHERE \"directed_by\"='Wayne Rose';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21696800_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: How many millions of people in the US saw the episode titled \"Kandor\"?"
},
{
"role": "assistant",
"content": "SELECT \"u_s_viewers_million\" FROM \"table1_21696800_1\" WHERE \"title\"='\\\"Kandor\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: How many wins does he get when he starts at 10?"
},
{
"role": "assistant",
"content": "SELECT \"wins\" FROM \"nascar_sprint_cup_series\" WHERE \"starts\"=10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nascar_sprint_cup_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: How many wins does he have?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"nascar_sprint_cup_series\";"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21690339_1\" (\n \"country\" text,\n \"pct_of_imports_from_russia\" text,\n \"pct_cut\" text,\n \"diversification\" text,\n \"gas_storage\" text,\n \"alternative_fuel\" text\n);\n\nQuestion: What wast the percent cut for the nation with an 80% full gas storage?"
},
{
"role": "assistant",
"content": "SELECT \"pct_cut\" FROM \"table1_21690339_1\" WHERE \"gas_storage\"='80% full';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21690339_1\" (\n \"country\" text,\n \"pct_of_imports_from_russia\" text,\n \"pct_cut\" text,\n \"diversification\" text,\n \"gas_storage\" text,\n \"alternative_fuel\" text\n);\n\nQuestion: What was the gas storage status for the nation that had \"yes\" for alternative fuel?"
},
{
"role": "assistant",
"content": "SELECT \"gas_storage\" FROM \"table1_21690339_1\" WHERE \"alternative_fuel\"='Yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21690339_1\" (\n \"country\" text,\n \"pct_of_imports_from_russia\" text,\n \"pct_cut\" text,\n \"diversification\" text,\n \"gas_storage\" text,\n \"alternative_fuel\" text\n);\n\nQuestion: What was the percent cunt for the nation that had fuel oil stocks need only for industry as their fuel alternative?"
},
{
"role": "assistant",
"content": "SELECT \"pct_cut\" FROM \"table1_21690339_1\" WHERE \"alternative_fuel\"='Fuel oil stocks need only for industry';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21690339_1\" (\n \"country\" text,\n \"pct_of_imports_from_russia\" text,\n \"pct_cut\" text,\n \"diversification\" text,\n \"gas_storage\" text,\n \"alternative_fuel\" text\n);\n\nQuestion: What country had 20% imports from russia?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"table1_21690339_1\" WHERE \"pct_of_imports_from_russia\"='20%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21690339_1\" (\n \"country\" text,\n \"pct_of_imports_from_russia\" text,\n \"pct_cut\" text,\n \"diversification\" text,\n \"gas_storage\" text,\n \"alternative_fuel\" text\n);\n\nQuestion: What country had a 100% cut?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"table1_21690339_1\" WHERE \"pct_cut\"='100%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"season\" real,\n \"network\" text,\n \"timeslot\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank_rank_denotes_the_relative_position_of_the_television_series_with_respect_to_other_prime_time_shows_on_the_cw_fox_nbc_cbs_and_abc\" text,\n \"viewers_in_millions\" text,\n \"rating_rating_is_the_percentage_of_all_households_tuned_into_the_program\" text\n);\n\nQuestion: What network garnered 2.74 million viewers for Supernatural?"
},
{
"role": "assistant",
"content": "SELECT \"network\" FROM \"ratings\" WHERE \"viewers_in_millions\"='2.74';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"season\" real,\n \"network\" text,\n \"timeslot\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"rank_rank_denotes_the_relative_position_of_the_television_series_with_respect_to_other_prime_time_shows_on_the_cw_fox_nbc_cbs_and_abc\" text,\n \"viewers_in_millions\" text,\n \"rating_rating_is_the_percentage_of_all_households_tuned_into_the_program\" text\n);\n\nQuestion: What season had 2.52 million viewers?"
},
{
"role": "assistant",
"content": "SELECT \"tv_season\" FROM \"ratings\" WHERE \"viewers_in_millions\"='2.52';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"important_originating_express_trains\" (\n \"train_no\" text,\n \"train_name\" text,\n \"destination\" text,\n \"category\" text,\n \"frequency\" text\n);\n\nQuestion: What is the category for trains numbered 16609/16610?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"important_originating_express_trains\" WHERE \"train_no\"='16609/16610';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"important_originating_express_trains\" (\n \"train_no\" text,\n \"train_name\" text,\n \"destination\" text,\n \"category\" text,\n \"frequency\" text\n);\n\nQuestion: What trains have a category of express and a weekly frequency?"
},
{
"role": "assistant",
"content": "SELECT \"train_name\" FROM \"important_originating_express_trains\" WHERE \"category\"='Express' AND \"frequency\"='Weekly';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"important_originating_express_trains\" (\n \"train_no\" text,\n \"train_name\" text,\n \"destination\" text,\n \"category\" text,\n \"frequency\" text\n);\n\nQuestion: What is the train name that has a destination of Tuticorin?"
},
{
"role": "assistant",
"content": "SELECT \"train_name\" FROM \"important_originating_express_trains\" WHERE \"destination\"='Tuticorin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"important_originating_express_trains\" (\n \"train_no\" text,\n \"train_name\" text,\n \"destination\" text,\n \"category\" text,\n \"frequency\" text\n);\n\nQuestion: What is the frequency of trains numbered 12671/12672?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"important_originating_express_trains\" WHERE \"train_no\"='12671/12672';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"important_originating_express_trains\" (\n \"train_no\" text,\n \"train_name\" text,\n \"destination\" text,\n \"category\" text,\n \"frequency\" text\n);\n\nQuestion: How many destinations have a weekly frequency and are named AC Express?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"destination\") FROM \"important_originating_express_trains\" WHERE \"frequency\"='Weekly' AND \"train_name\"='AC Express';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"important_originating_express_trains\" (\n \"train_no\" text,\n \"train_name\" text,\n \"destination\" text,\n \"category\" text,\n \"frequency\" text\n);\n\nQuestion: What is the number of frequencies that have a destination of Jaipur?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"frequency\") FROM \"important_originating_express_trains\" WHERE \"destination\"='Jaipur';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What is the pick # for player david grannis?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick_num\") FROM \"draft_picks\" WHERE \"player\"='David Grannis';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which player belongs to deerfield academy (Massachusetts) college/junior/club team?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"college_junior_club_team\"='Deerfield Academy (Massachusetts)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which nationality is kitchener rangers (ohl) college/junior/club team?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"college_junior_club_team\"='Kitchener Rangers (OHL)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which nationality is player Brian Wilks?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"player\"='Brian Wilks';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: How many positions is player Tom Glavine?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"position\") FROM \"draft_picks\" WHERE \"player\"='Tom Glavine';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21726793_1\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: who directed the production code 2t5710?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"table1_21726793_1\" WHERE \"production_code\"='2T5710';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21726793_1\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: what is the total number o production code where us viewers is 2.76?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"production_code\") FROM \"table1_21726793_1\" WHERE \"u_s_viewers_million\"='2.76';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21726793_1\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: who wrote the no 2?"
},
{
"role": "assistant",
"content": "SELECT \"written_by\" FROM \"table1_21726793_1\" WHERE \"no\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year_statistics\" (\n \"year\" text,\n \"maac\" text,\n \"overall\" text,\n \"regular_season_results\" text,\n \"maac_tournament_result\" text,\n \"ncaa_seed\" text,\n \"ncaa_round\" text\n);\n\nQuestion: What is the maac in the macc tournament results is quarterfinals?"
},
{
"role": "assistant",
"content": "SELECT \"maac\" FROM \"year_by_year_statistics\" WHERE \"maac_tournament_result\"='Quarterfinals';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year_statistics\" (\n \"year\" text,\n \"maac\" text,\n \"overall\" text,\n \"regular_season_results\" text,\n \"maac_tournament_result\" text,\n \"ncaa_seed\" text,\n \"ncaa_round\" text\n);\n\nQuestion: What is the maac when the overall is 26-8?"
},
{
"role": "assistant",
"content": "SELECT \"maac\" FROM \"year_by_year_statistics\" WHERE \"overall\"='26-8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year_statistics\" (\n \"year\" text,\n \"maac\" text,\n \"overall\" text,\n \"regular_season_results\" text,\n \"maac_tournament_result\" text,\n \"ncaa_seed\" text,\n \"ncaa_round\" text\n);\n\nQuestion: How many maac are there that have 14th as the ncaa and the overall is 20-10?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"maac\") FROM \"year_by_year_statistics\" WHERE \"ncaa_seed\"='14th' AND \"overall\"='20-10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year_statistics\" (\n \"year\" text,\n \"maac\" text,\n \"overall\" text,\n \"regular_season_results\" text,\n \"maac_tournament_result\" text,\n \"ncaa_seed\" text,\n \"ncaa_round\" text\n);\n\nQuestion: How many overall in the year 2010-2011?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"overall\") FROM \"year_by_year_statistics\" WHERE \"year\"='2010-2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year_statistics\" (\n \"year\" text,\n \"maac\" text,\n \"overall\" text,\n \"regular_season_results\" text,\n \"maac_tournament_result\" text,\n \"ncaa_seed\" text,\n \"ncaa_round\" text\n);\n\nQuestion: In which year is the overall 29-4?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"year_by_year_statistics\" WHERE \"overall\"='29-4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year_statistics\" (\n \"year\" text,\n \"maac\" text,\n \"overall\" text,\n \"regular_season_results\" text,\n \"maac_tournament_result\" text,\n \"ncaa_seed\" text,\n \"ncaa_round\" text\n);\n\nQuestion: What is the regular season results for the year 2011-2012?"
},
{
"role": "assistant",
"content": "SELECT \"regular_season_results\" FROM \"year_by_year_statistics\" WHERE \"year\"='2011-2012';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2175858_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text,\n \"report\" text\n);\n\nQuestion: How many drivers had a time of 3:09:45?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"driver\") FROM \"table1_2175858_1\" WHERE \"race_time\"='3:09:45';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2175858_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text,\n \"report\" text\n);\n\nQuestion: How many drivers drove 300 laps at average speed of 103.594?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"driver\") FROM \"table1_2175858_1\" WHERE \"laps\"='300' AND \"average_speed_mph\"='103.594';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2175858_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text,\n \"report\" text\n);\n\nQuestion: How many dates had an average speed of 102.003?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"date\") FROM \"table1_2175858_1\" WHERE \"average_speed_mph\"='102.003';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2175858_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text,\n \"report\" text\n);\n\nQuestion: How many laps were driven in 2009?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"table1_2175858_1\" WHERE \"year\"=2009;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2175858_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text,\n \"report\" text\n);\n\nQuestion: How many laps were completed in the race with time of 3:03:50?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"table1_2175858_1\" WHERE \"race_time\"='3:03:50';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_2175858_1\" (\n \"year\" real,\n \"date\" text,\n \"driver\" text,\n \"team\" text,\n \"manufacturer\" text,\n \"laps\" text,\n \"miles_km\" text,\n \"race_time\" text,\n \"average_speed_mph\" text,\n \"report\" text\n);\n\nQuestion: How many miles were driven with the average speed at 116.81?"
},
{
"role": "assistant",
"content": "SELECT \"miles_km\" FROM \"table1_2175858_1\" WHERE \"average_speed_mph\"='116.81';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21781578_2\" (\n \"season_no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What was the season number for production code E2110?"
},
{
"role": "assistant",
"content": "SELECT \"season_no\" FROM \"table1_21781578_2\" WHERE \"production_code\"='E2110';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21781578_2\" (\n \"season_no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What was the original air date for season number 2?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"table1_21781578_2\" WHERE \"season_no\"=2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21781578_2\" (\n \"season_no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What was the season number episode directed by John David Coles?"
},
{
"role": "assistant",
"content": "SELECT \"season_no\" FROM \"table1_21781578_2\" WHERE \"directed_by\"='John David Coles';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21781578_2\" (\n \"season_no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What was the number of US Viewers in the episode directed by Steve Shill and having a production code of E2102?"
},
{
"role": "assistant",
"content": "SELECT \"u_s_viewers_millions\" FROM \"table1_21781578_2\" WHERE \"directed_by\"='Steve Shill' AND \"production_code\"='E2102';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table1_21781578_2\" (\n \"season_no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What was the number of season number entries that had US Viewers of 12.30 million?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"season_no\") FROM \"table1_21781578_2\" WHERE \"u_s_viewers_millions\"='12.30';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the date of the game in week 3?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"regular_season\" WHERE \"week\"=3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the final score when the game was @ roughriders?"
},
{
"role": "assistant",
"content": "SELECT \"final_score\" FROM \"regular_season\" WHERE \"opponent\"='@ Roughriders';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the total number of weeks where the game played Ivor Wynne Stadium?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"regular_season\" WHERE \"location\"='Ivor Wynne Stadium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the location for when the opponent was @ roughriders?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"regular_season\" WHERE \"opponent\"='@ Roughriders';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the final score when the attendance was 25598?"
},
{
"role": "assistant",
"content": "SELECT \"final_score\" FROM \"regular_season\" WHERE \"attendance\"=25598;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What location was the game on October 6?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"regular_season\" WHERE \"date\"='October 6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nielsen_ratings\" (\n \"season\" text,\n \"timeslot_times_listed_are_eastern_time\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"ranking\" real,\n \"viewers_in_millions_of_households\" text\n);\n\nQuestion: What's the lowest rating with 11.2 million viewers?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"ranking\") FROM \"nielsen_ratings\" WHERE \"viewers_in_millions_of_households\"='11.2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nielsen_ratings\" (\n \"season\" text,\n \"timeslot_times_listed_are_eastern_time\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"ranking\" real,\n \"viewers_in_millions_of_households\" text\n);\n\nQuestion: When did was the start of the season that ended May 19, 1997?"
},
{
"role": "assistant",
"content": "SELECT \"season_premiere\" FROM \"nielsen_ratings\" WHERE \"season_finale\"='May 19, 1997';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nielsen_ratings\" (\n \"season\" text,\n \"timeslot_times_listed_are_eastern_time\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"ranking\" real,\n \"viewers_in_millions_of_households\" text\n);\n\nQuestion: When did the season finale ranked at 73 first air?"
},
{
"role": "assistant",
"content": "SELECT \"season_finale\" FROM \"nielsen_ratings\" WHERE \"ranking\"=73;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nielsen_ratings\" (\n \"season\" text,\n \"timeslot_times_listed_are_eastern_time\" text,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"ranking\" real,\n \"viewers_in_millions_of_households\" text\n);\n\nQuestion: Which season received 10.2 million viewers?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"tv_season\") FROM \"nielsen_ratings\" WHERE \"viewers_in_millions_of_households\"='10.2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"names_and_fleet_details\" (\n \"original_number\" text,\n \"uic_number\" text,\n \"name\" text,\n \"constructer\" text,\n \"constructor_number\" real,\n \"year\" real,\n \"withdrawn\" text,\n \"kilometers_worked\" real\n);\n\nQuestion: When 19/05/2002 is the date of withdrawn what is the name?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"names_and_fleet_details\" WHERE \"withdrawn\"='19/05/2002';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"names_and_fleet_details\" (\n \"original_number\" text,\n \"uic_number\" text,\n \"name\" text,\n \"constructer\" text,\n \"constructor_number\" real,\n \"year\" real,\n \"withdrawn\" text,\n \"kilometers_worked\" real\n);\n\nQuestion: When \"virgen del perpetuo socorro\" is the name what is the highest year?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"names_and_fleet_details\" WHERE \"name\"='\\\"Virgen del Perpetuo Socorro\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"names_and_fleet_details\" (\n \"original_number\" text,\n \"uic_number\" text,\n \"name\" text,\n \"constructer\" text,\n \"constructor_number\" real,\n \"year\" real,\n \"withdrawn\" text,\n \"kilometers_worked\" real\n);\n\nQuestion: When 2008 t is the original number what is the lowest year?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"names_and_fleet_details\" WHERE \"original_number\"='2008 T';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"names_and_fleet_details\" (\n \"original_number\" text,\n \"uic_number\" text,\n \"name\" text,\n \"constructer\" text,\n \"constructor_number\" real,\n \"year\" real,\n \"withdrawn\" text,\n \"kilometers_worked\" real\n);\n\nQuestion: When \"virgen de gracia\" is the name what is the date of withdrawn?"
},
{
"role": "assistant",
"content": "SELECT \"withdrawn\" FROM \"names_and_fleet_details\" WHERE \"name\"='\\\"Virgen de Gracia\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"names_and_fleet_details\" (\n \"original_number\" text,\n \"uic_number\" text,\n \"name\" text,\n \"constructer\" text,\n \"constructor_number\" real,\n \"year\" real,\n \"withdrawn\" text,\n \"kilometers_worked\" real\n);\n\nQuestion: When 9/07/1999 is the date of withdrawn what is the original number?"
},
{
"role": "assistant",
"content": "SELECT \"original_number\" FROM \"names_and_fleet_details\" WHERE \"withdrawn\"='9/07/1999';"
}
]
|
[
{
"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 \"points_classification\" text,\n \"mountains_classification\" text,\n \"metas_volantes_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: WHO WAS THE STAGE WINNER IN THE STAGE WHERE MICHAEL ALBASINI WON THE METAS VOLANTES CLASSIFICATION?"
},
{
"role": "assistant",
"content": "SELECT \"stage_winner\" FROM \"jersey_progress\" WHERE \"metas_volantes_classification\"='Michael Albasini';"
}
]
|
[
{
"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 \"points_classification\" text,\n \"mountains_classification\" text,\n \"metas_volantes_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Who got the mountains classification when Michael Albasini won the stage?"
},
{
"role": "assistant",
"content": "SELECT \"mountains_classification\" FROM \"jersey_progress\" WHERE \"metas_volantes_classification\"='Michael Albasini';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: How many people were present at the July 10 game?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"regular_season\" WHERE \"date\"='July 10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the final score of the game played on July 10?"
},
{
"role": "assistant",
"content": "SELECT \"final_score\" FROM \"regular_season\" WHERE \"date\"='July 10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What's the record achieved in the gamed played at BC Place Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"location\"='BC Place Stadium';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: During what week was the July 10 game played?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"regular_season\" WHERE \"date\"='July 10';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.