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 \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: If the US Open tournament had 2r in 2012, what was it in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"2010\" FROM \"singles_performance_timeline\" WHERE \"2012\"='2r' AND \"tournament\"='us open';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_regular_season_football_standings\" (\n \"school\" text,\n \"team\" text,\n \"division_record\" text,\n \"overall_record\" text,\n \"season_outcome\" text\n);\n\nQuestion: What is the school, when the Team is Senators?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"2005_regular_season_football_standings\" WHERE \"team\"='senators';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_regular_season_football_standings\" (\n \"school\" text,\n \"team\" text,\n \"division_record\" text,\n \"overall_record\" text,\n \"season_outcome\" text\n);\n\nQuestion: What is the Season Outcome, when the School is Sussex Tech?"
},
{
"role": "assistant",
"content": "SELECT \"season_outcome\" FROM \"2005_regular_season_football_standings\" WHERE \"school\"='sussex tech';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_regular_season_football_standings\" (\n \"school\" text,\n \"team\" text,\n \"division_record\" text,\n \"overall_record\" text,\n \"season_outcome\" text\n);\n\nQuestion: What is the School, when the Team is Golden Knights?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"2005_regular_season_football_standings\" WHERE \"team\"='golden knights';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mohamed_al_zeno_international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the Venue where the Result is 5\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"mohamed_al_zeno_international_goals\" WHERE \"result\"='5\u20131';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mohamed_al_zeno_international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the Score where Goal is larger than 11, and a Competition of 2009 nehru cup, and had a Date of 24 august 2009?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"mohamed_al_zeno_international_goals\" WHERE \"goal\">11 AND \"competition\"='2009 nehru cup' AND \"date\"='24 august 2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mohamed_al_zeno_international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the Result where Goal is 9?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"mohamed_al_zeno_international_goals\" WHERE \"goal\"=9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mohamed_al_zeno_international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was Goal that where Competition of international friendly, and a Result of 2\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"goal\" FROM \"mohamed_al_zeno_international_goals\" WHERE \"competition\"='international friendly' AND \"result\"='2\u20131';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mohamed_al_zeno_international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the Competition where the Score was 3\u20130, and the was Goal larger than 4?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"mohamed_al_zeno_international_goals\" WHERE \"score\"='3\u20130' AND \"goal\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_five_regions\" (\n \"name\" text,\n \"population_2009_estimate\" text,\n \"largest_city\" text,\n \"largest_metropolitan_area\" text,\n \"number_of_states\" text\n);\n\nQuestion: What is the 2009 estimate population of the Northeast?"
},
{
"role": "assistant",
"content": "SELECT \"population_2009_estimate\" FROM \"the_five_regions\" WHERE \"name\"='northeast';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_five_regions\" (\n \"name\" text,\n \"population_2009_estimate\" text,\n \"largest_city\" text,\n \"largest_metropolitan_area\" text,\n \"number_of_states\" text\n);\n\nQuestion: What is the 2009 estimate population of the region with Manaus as the largest city?"
},
{
"role": "assistant",
"content": "SELECT \"population_2009_estimate\" FROM \"the_five_regions\" WHERE \"largest_city\"='manaus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_five_regions\" (\n \"name\" text,\n \"population_2009_estimate\" text,\n \"largest_city\" text,\n \"largest_metropolitan_area\" text,\n \"number_of_states\" text\n);\n\nQuestion: How many states has a 2009 estimate population of 27,3 million?"
},
{
"role": "assistant",
"content": "SELECT \"number_of_states\" FROM \"the_five_regions\" WHERE \"population_2009_estimate\"='27,3 million';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_five_regions\" (\n \"name\" text,\n \"population_2009_estimate\" text,\n \"largest_city\" text,\n \"largest_metropolitan_area\" text,\n \"number_of_states\" text\n);\n\nQuestion: What is the largest metropolitan area of the Central-West?"
},
{
"role": "assistant",
"content": "SELECT \"largest_metropolitan_area\" FROM \"the_five_regions\" WHERE \"name\"='central-west';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_five_regions\" (\n \"name\" text,\n \"population_2009_estimate\" text,\n \"largest_city\" text,\n \"largest_metropolitan_area\" text,\n \"number_of_states\" text\n);\n\nQuestion: What is the 2009 estimate population of the region with Manaus as the largest city?"
},
{
"role": "assistant",
"content": "SELECT \"population_2009_estimate\" FROM \"the_five_regions\" WHERE \"largest_city\"='manaus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_in_tour_de_france\" (\n \"year\" real,\n \"stage\" real,\n \"category\" real,\n \"start\" text,\n \"finish\" text,\n \"leader_at_the_summit\" text\n);\n\nQuestion: Who was the leader at the summit when the stage was larger than 14, the category was 1, the start was Saint-Girons, and the finish was Cauterets?"
},
{
"role": "assistant",
"content": "SELECT \"leader_at_the_summit\" FROM \"appearances_in_tour_de_france\" WHERE \"stage\">14 AND \"category\"=1 AND \"start\"='saint-girons' AND \"finish\"='cauterets';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"appearances_in_tour_de_france\" (\n \"year\" real,\n \"stage\" real,\n \"category\" real,\n \"start\" text,\n \"finish\" text,\n \"leader_at_the_summit\" text\n);\n\nQuestion: What was the earliest year that had a start of Saint-Gaudens and a stage smaller than 15?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"appearances_in_tour_de_france\" WHERE \"start\"='saint-gaudens' AND \"stage\"<15;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"four_abreast_cabin\" (\n \"model\" text,\n \"seats\" text,\n \"period\" text,\n \"built\" real,\n \"country\" text\n);\n\nQuestion: Which Model had 37-78 seats?"
},
{
"role": "assistant",
"content": "SELECT \"model\" FROM \"four_abreast_cabin\" WHERE \"seats\"='37-78';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1936\" (\n \"title\" text,\n \"studio\" text,\n \"role\" text,\n \"leading_lady\" text,\n \"director\" text\n);\n\nQuestion: Which studio did The Oregon Trail?"
},
{
"role": "assistant",
"content": "SELECT \"studio\" FROM \"1936\" WHERE \"title\"='the oregon trail';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1936\" (\n \"title\" text,\n \"studio\" text,\n \"role\" text,\n \"leading_lady\" text,\n \"director\" text\n);\n\nQuestion: Which title had Muriel Evans as leading lady?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"1936\" WHERE \"leading_lady\"='muriel evans';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1936\" (\n \"title\" text,\n \"studio\" text,\n \"role\" text,\n \"leading_lady\" text,\n \"director\" text\n);\n\nQuestion: Who is the leading lady in The Lonely Trail?"
},
{
"role": "assistant",
"content": "SELECT \"leading_lady\" FROM \"1936\" WHERE \"title\"='the lonely trail';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1936\" (\n \"title\" text,\n \"studio\" text,\n \"role\" text,\n \"leading_lady\" text,\n \"director\" text\n);\n\nQuestion: Who was the leading lady for Uni studio and Frank Strayer?"
},
{
"role": "assistant",
"content": "SELECT \"leading_lady\" FROM \"1936\" WHERE \"studio\"='uni' AND \"director\"='frank strayer';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1936\" (\n \"title\" text,\n \"studio\" text,\n \"role\" text,\n \"leading_lady\" text,\n \"director\" text\n);\n\nQuestion: In which title was Ann Rutherford the leading lady for Joseph Kane?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"1936\" WHERE \"leading_lady\"='ann rutherford' AND \"director\"='joseph kane';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1936\" (\n \"title\" text,\n \"studio\" text,\n \"role\" text,\n \"leading_lady\" text,\n \"director\" text\n);\n\nQuestion: Who is the leading lady in The Lonely Trail for Joseph Kane?"
},
{
"role": "assistant",
"content": "SELECT \"leading_lady\" FROM \"1936\" WHERE \"director\"='joseph kane' AND \"title\"='the lonely trail';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What was the Chassis with less than 8 points before 1960?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"year\"<1960 AND \"points\"<8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which Chassis has 0 points?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"points\"=0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What were the total Pints after 1957?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"year\">1957;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What was the most recent year for Dean Van Lines?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='dean van lines';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012\" (\n \"auckland\" text,\n \"gold_coast\" text,\n \"sydney\" text,\n \"melbourne\" text,\n \"adelaide\" text,\n \"perth\" text\n);\n\nQuestion: What Gold Coast has Auckland cancelled, and Adelaide yes?"
},
{
"role": "assistant",
"content": "SELECT \"gold_coast\" FROM \"2012\" WHERE \"auckland\"='cancelled' AND \"adelaide\"='yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012\" (\n \"auckland\" text,\n \"gold_coast\" text,\n \"sydney\" text,\n \"melbourne\" text,\n \"adelaide\" text,\n \"perth\" text\n);\n\nQuestion: Which Sydney has Auckland cancelled and Perth yes?"
},
{
"role": "assistant",
"content": "SELECT \"sydney\" FROM \"2012\" WHERE \"auckland\"='cancelled' AND \"perth\"='yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012\" (\n \"auckland\" text,\n \"gold_coast\" text,\n \"sydney\" text,\n \"melbourne\" text,\n \"adelaide\" text,\n \"perth\" text\n);\n\nQuestion: Which Sydney has Gold Coast no, Adelaide no< and Auckland no?"
},
{
"role": "assistant",
"content": "SELECT \"sydney\" FROM \"2012\" WHERE \"gold_coast\"='no' AND \"adelaide\"='no' AND \"auckland\"='no';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012\" (\n \"auckland\" text,\n \"gold_coast\" text,\n \"sydney\" text,\n \"melbourne\" text,\n \"adelaide\" text,\n \"perth\" text\n);\n\nQuestion: Which Gold Coast has Melbourne yes, and Auckland yes?"
},
{
"role": "assistant",
"content": "SELECT \"gold_coast\" FROM \"2012\" WHERE \"melbourne\"='yes' AND \"auckland\"='yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012\" (\n \"auckland\" text,\n \"gold_coast\" text,\n \"sydney\" text,\n \"melbourne\" text,\n \"adelaide\" text,\n \"perth\" text\n);\n\nQuestion: Which Perth has Auckland yes and Gold Coast yes?"
},
{
"role": "assistant",
"content": "SELECT \"perth\" FROM \"2012\" WHERE \"auckland\"='yes' AND \"gold_coast\"='yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2012\" (\n \"auckland\" text,\n \"gold_coast\" text,\n \"sydney\" text,\n \"melbourne\" text,\n \"adelaide\" text,\n \"perth\" text\n);\n\nQuestion: Which Gold Coast has Auckland no, Adelaide yes, and Melbourne no?"
},
{
"role": "assistant",
"content": "SELECT \"gold_coast\" FROM \"2012\" WHERE \"auckland\"='no' AND \"adelaide\"='yes' AND \"melbourne\"='no';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What round was on 7 January 2003?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"league_cup\" WHERE \"date\"='7 january 2003';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What is the result F_A on 17 December 2002?"
},
{
"role": "assistant",
"content": "SELECT \"result_f_a\" FROM \"league_cup\" WHERE \"date\"='17 december 2002';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What attendance was on 7 January 2003?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"league_cup\" WHERE \"date\"='7 january 2003';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" text,\n \"category\" text,\n \"genre\" text,\n \"recording\" text,\n \"result\" text\n);\n\nQuestion: Name the recording for 2012"
},
{
"role": "assistant",
"content": "SELECT \"recording\" FROM \"awards_and_nominations\" WHERE \"year\"='2012';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" text,\n \"category\" text,\n \"genre\" text,\n \"recording\" text,\n \"result\" text\n);\n\nQuestion: Name the year with the best female pop vocal album and result of won"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"awards_and_nominations\" WHERE \"category\"='best female pop vocal album' AND \"result\"='won';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" text,\n \"category\" text,\n \"genre\" text,\n \"recording\" text,\n \"result\" text\n);\n\nQuestion: Name the category for 2013"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"awards_and_nominations\" WHERE \"year\"='2013';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which was the lowest gold when silver was smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"gold\") FROM \"medal_table\" WHERE \"silver\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which is the highest total at rank 6, bronze 2, and gold larger than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"medal_table\" WHERE \"rank\"=6 AND \"bronze\"=2 AND \"gold\">0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which is the highest bronze at Chinese Taipei when the rank was higher than 5 and total was smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"rank\">5 AND \"nation\"='chinese taipei' AND \"total\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"single\" text,\n \"u_s_hot_100\" text,\n \"u_s_dance\" text,\n \"u_s_r_b\" text,\n \"album\" text\n);\n\nQuestion: Name the US dance when the year is more than 1985"
},
{
"role": "assistant",
"content": "SELECT \"u_s_dance\" FROM \"singles\" WHERE \"year\">1985;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"single\" text,\n \"u_s_hot_100\" text,\n \"u_s_dance\" text,\n \"u_s_r_b\" text,\n \"album\" text\n);\n\nQuestion: Name the US Hot 100 for album of I like you"
},
{
"role": "assistant",
"content": "SELECT \"u_s_hot_100\" FROM \"singles\" WHERE \"album\"='i like you';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"single\" text,\n \"u_s_hot_100\" text,\n \"u_s_dance\" text,\n \"u_s_r_b\" text,\n \"album\" text\n);\n\nQuestion: Name the US R&B for 1981"
},
{
"role": "assistant",
"content": "SELECT \"u_s_r_b\" FROM \"singles\" WHERE \"year\"=1981;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_i\" (\n \"director_s\" text,\n \"writer_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: Who was the writer when Parkville Pictures Ltd was the recipient?"
},
{
"role": "assistant",
"content": "SELECT \"writer_s\" FROM \"2008_i\" WHERE \"recipient\"='parkville pictures ltd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_i\" (\n \"director_s\" text,\n \"writer_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: Alex Winckler wrote the film, who was the director?"
},
{
"role": "assistant",
"content": "SELECT \"director_s\" FROM \"2008_i\" WHERE \"writer_s\"='alex winckler';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_i\" (\n \"director_s\" text,\n \"writer_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: On what date was Edward Jeffreys the writer?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2008_i\" WHERE \"writer_s\"='edward jeffreys';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_i\" (\n \"director_s\" text,\n \"writer_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: What date was the award of \u00a36,600 was given?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2008_i\" WHERE \"award\"='\u00a36,600';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_i\" (\n \"director_s\" text,\n \"writer_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: Who was the director that had a recipient of Redbag Pictures Ltd?"
},
{
"role": "assistant",
"content": "SELECT \"director_s\" FROM \"2008_i\" WHERE \"recipient\"='redbag pictures ltd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_i\" (\n \"director_s\" text,\n \"writer_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: What's the name of the award that Edward Jeffreys was the writer?"
},
{
"role": "assistant",
"content": "SELECT \"award\" FROM \"2008_i\" WHERE \"writer_s\"='edward jeffreys';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fiba_euro_basket_2007_squads\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born\" real,\n \"current_club\" text\n);\n\nQuestion: Who is the Player born in 1981?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"fiba_euro_basket_2007_squads\" WHERE \"year_born\"=1981;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fiba_euro_basket_2007_squads\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born\" real,\n \"current_club\" text\n);\n\nQuestion: What is the Height that has a year born before 1977"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"height\") FROM \"fiba_euro_basket_2007_squads\" WHERE \"year_born\"<1977;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"total_region\" real,\n \"belyando\" real,\n \"broadsound\" real,\n \"nebo\" real\n);\n\nQuestion: What is the lowest Total Region that has a Year after 2001, and a Broadsound greater than 6,843?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total_region\") FROM \"population\" WHERE \"year\">2001 AND \"broadsound\">'6,843';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"total_region\" real,\n \"belyando\" real,\n \"broadsound\" real,\n \"nebo\" real\n);\n\nQuestion: What is the highest Total Region that has a Broadsound greater than 1,590, a Year after 1966, a Belyando greater than 11,362, and a Nebo of 914?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total_region\") FROM \"population\" WHERE \"broadsound\">'1,590' AND \"year\">1966 AND \"belyando\">'11,362' AND \"nebo\"=914;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"total_region\" real,\n \"belyando\" real,\n \"broadsound\" real,\n \"nebo\" real\n);\n\nQuestion: What is the sum of Total Regions that have the Year 1954, and a Nebo greater than 447?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total_region\") FROM \"population\" WHERE \"year\"=1954 AND \"nebo\">447;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"total_region\" real,\n \"belyando\" real,\n \"broadsound\" real,\n \"nebo\" real\n);\n\nQuestion: Before the Year 1947, what is the sum of Broadsound that have a Belyando greater than 11,362, and a Total Region equal to 5,016?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"broadsound\") FROM \"population\" WHERE \"belyando\">'11,362' AND \"total_region\"='5,016' AND \"year\"<1947;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"total_region\" real,\n \"belyando\" real,\n \"broadsound\" real,\n \"nebo\" real\n);\n\nQuestion: After 2001, what is the sum of Belyando that have a Nebo greater than 2,522?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"belyando\") FROM \"population\" WHERE \"nebo\">'2,522' AND \"year\">2001;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the number of Bronze for the Nation of Uganda with less than 2 Gold and Total medals?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"bronze\") FROM \"medal_table\" WHERE \"gold\"<2 AND \"nation\"='uganda' AND \"total\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: With less than 7 Silver medals, how many Gold medals did Canada receive?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"nation\"='canada' AND \"silver\"<7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_2_3\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the outcome of a score that is 6\u20131, 6\u20134?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_2_3\" WHERE \"score\"='6\u20131, 6\u20134';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_2_3\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the surface of the score, 7\u20136 (7\u20133) , 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_2_3\" WHERE \"score\"='7\u20136 (7\u20133) , 6\u20133';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What venue did he play in before 2008 and finished 14th (q)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"year\"<2008 AND \"position\"='14th (q)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What competition did he compete in before 2007 in gothenburg, sweden?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"achievements\" WHERE \"year\"<2007 AND \"venue\"='gothenburg, sweden';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What venue did he finish 7th?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"position\"='7th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"theatre\" (\n \"opening_date\" text,\n \"closing_date\" text,\n \"performances\" real,\n \"role\" text,\n \"theatre\" text\n);\n\nQuestion: Name the most performances for geoffrey fitton"
},
{
"role": "assistant",
"content": "SELECT MAX(\"performances\") FROM \"theatre\" WHERE \"role\"='geoffrey fitton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"theatre\" (\n \"opening_date\" text,\n \"closing_date\" text,\n \"performances\" real,\n \"role\" text,\n \"theatre\" text\n);\n\nQuestion: Name the role for Feb 4, 1961 closing date"
},
{
"role": "assistant",
"content": "SELECT \"role\" FROM \"theatre\" WHERE \"closing_date\"='feb 4, 1961';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"theatre\" (\n \"opening_date\" text,\n \"closing_date\" text,\n \"performances\" real,\n \"role\" text,\n \"theatre\" text\n);\n\nQuestion: Name the theatre for aaron jablonski schuyler grogan with performances more than 49"
},
{
"role": "assistant",
"content": "SELECT \"theatre\" FROM \"theatre\" WHERE \"performances\">49 AND \"role\"='aaron jablonski schuyler grogan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_gossip_girl_episodes\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: What are the titles for episodes prior to episode 4?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"list_of_gossip_girl_episodes\" WHERE \"no_in_series\"<4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_gossip_girl_episodes\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: What are the titles for episodes prior to episode 4?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"list_of_gossip_girl_episodes\" WHERE \"no_in_series\"<4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_gossip_girl_episodes\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: What the air dates for the episodes are episode 3 in the series?"
},
{
"role": "assistant",
"content": "SELECT \"original_air_date\" FROM \"list_of_gossip_girl_episodes\" WHERE \"no_in_series\">3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: How many laps resulted from a Qual of 165.229?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"indy_500_results\" WHERE \"qual\"='165.229';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: Whent he start was 15, what was the Qual?"
},
{
"role": "assistant",
"content": "SELECT \"qual\" FROM \"indy_500_results\" WHERE \"start\"='15';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What was the start result with a Rank of 7 and more than 100 laps?"
},
{
"role": "assistant",
"content": "SELECT \"start\" FROM \"indy_500_results\" WHERE \"rank\"='7' AND \"laps\">100;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager_1\" text,\n \"captain\" text,\n \"kit_manufacturer\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: Who was the shirt sponsor for the Blackburn Rovers?"
},
{
"role": "assistant",
"content": "SELECT \"shirt_sponsor\" FROM \"personnel_and_kits\" WHERE \"team\"='blackburn rovers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager_1\" text,\n \"captain\" text,\n \"kit_manufacturer\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: Who was the team captain of the Bolton Wanderers?"
},
{
"role": "assistant",
"content": "SELECT \"captain\" FROM \"personnel_and_kits\" WHERE \"team\"='bolton wanderers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager_1\" text,\n \"captain\" text,\n \"kit_manufacturer\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: For which team did Adidas manufacture kits and TDK sponsor shirts?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"personnel_and_kits\" WHERE \"kit_manufacturer\"='adidas' AND \"shirt_sponsor\"='tdk';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager_1\" text,\n \"captain\" text,\n \"kit_manufacturer\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: On which team was Robbie Earle the captain?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"personnel_and_kits\" WHERE \"captain\"='robbie earle';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager_1\" text,\n \"captain\" text,\n \"kit_manufacturer\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: Who was the manager for the team with captain Neil Redfearn?"
},
{
"role": "assistant",
"content": "SELECT \"manager_1\" FROM \"personnel_and_kits\" WHERE \"captain\"='neil redfearn';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager_1\" text,\n \"captain\" text,\n \"kit_manufacturer\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: Who was the team captain for Crystal Palace?"
},
{
"role": "assistant",
"content": "SELECT \"captain\" FROM \"personnel_and_kits\" WHERE \"team\"='crystal palace';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_five_scoring_international_players_t\" (\n \"number\" real,\n \"player\" text,\n \"years_active\" text,\n \"caps\" real,\n \"tries\" real,\n \"conversions\" real,\n \"penalties\" real,\n \"drop_goals\" real,\n \"average_score\" real,\n \"score\" real\n);\n\nQuestion: drop goals larger than 0, and a Penalties of 52, and a Number larger than 5 had what lowest score?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"score\") FROM \"top_five_scoring_international_players_t\" WHERE \"drop_goals\">0 AND \"penalties\"=52 AND \"number\">5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_five_scoring_international_players_t\" (\n \"number\" real,\n \"player\" text,\n \"years_active\" text,\n \"caps\" real,\n \"tries\" real,\n \"conversions\" real,\n \"penalties\" real,\n \"drop_goals\" real,\n \"average_score\" real,\n \"score\" real\n);\n\nQuestion: Player of jaco coetzee, and a Tries larger than 6 had what total number of score?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"score\") FROM \"top_five_scoring_international_players_t\" WHERE \"player\"='jaco coetzee' AND \"tries\">6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"june_secondary_phase\" (\n \"round\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text,\n \"signed\" text\n);\n\nQuestion: What is the highest round that has a draftee from Washington State University?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"june_secondary_phase\" WHERE \"school\"='washington state university';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"june_secondary_phase\" (\n \"round\" real,\n \"name\" text,\n \"position\" text,\n \"school\" text,\n \"signed\" text\n);\n\nQuestion: What round was Bob Randall selected in?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"june_secondary_phase\" WHERE \"name\"='bob randall';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"change_in_number_of_senators_over_time\" (\n \"date_enacted\" text,\n \"normal_total\" text,\n \"26_total\" text,\n \"ont\" text,\n \"que\" text,\n \"n_s\" text,\n \"n_b\" text\n);\n\nQuestion: Name the Ont of N.B. of 10 and normal total of 77"
},
{
"role": "assistant",
"content": "SELECT \"ont\" FROM \"change_in_number_of_senators_over_time\" WHERE \"n_b\"='10' AND \"normal_total\"='77';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"change_in_number_of_senators_over_time\" (\n \"date_enacted\" text,\n \"normal_total\" text,\n \"26_total\" text,\n \"ont\" text,\n \"que\" text,\n \"n_s\" text,\n \"n_b\" text\n);\n\nQuestion: Name the date enacted for N.S. of 10 and normal total of 104"
},
{
"role": "assistant",
"content": "SELECT \"date_enacted\" FROM \"change_in_number_of_senators_over_time\" WHERE \"n_s\"='10' AND \"normal_total\"='104';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"change_in_number_of_senators_over_time\" (\n \"date_enacted\" text,\n \"normal_total\" text,\n \"26_total\" text,\n \"ont\" text,\n \"que\" text,\n \"n_s\" text,\n \"n_b\" text\n);\n\nQuestion: Name the NS with normal total of 102"
},
{
"role": "assistant",
"content": "SELECT \"n_s\" FROM \"change_in_number_of_senators_over_time\" WHERE \"normal_total\"='102';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"change_in_number_of_senators_over_time\" (\n \"date_enacted\" text,\n \"normal_total\" text,\n \"26_total\" text,\n \"ont\" text,\n \"que\" text,\n \"n_s\" text,\n \"n_b\" text\n);\n\nQuestion: Name the normal with que of 24"
},
{
"role": "assistant",
"content": "SELECT \"normal_total\" FROM \"change_in_number_of_senators_over_time\" WHERE \"que\"='24';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the sum of all the points won by Peter Whitehead in an alta f2 Chassis?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"complete_world_championship_results\" WHERE \"entrant\"='peter whitehead' AND \"chassis\"='alta f2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many points does g a vandervell have?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"complete_world_championship_results\" WHERE \"entrant\"='g a vandervell';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many total points were earned with ferrari 125 Chassis after 1952?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"complete_world_championship_results\" WHERE \"chassis\"='ferrari 125' AND \"year\">1952;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_world_championship_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the total number of Points that Peter Whitehead earned in a Ferrari 125?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"complete_world_championship_results\" WHERE \"entrant\"='peter whitehead' AND \"chassis\"='ferrari 125';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43_o\" text,\n \"d_42_o\" text,\n \"d_41\" text,\n \"d_40\" text\n);\n\nQuestion: Name the D 44 when it has a D 40\u221a of r 16"
},
{
"role": "assistant",
"content": "SELECT \"d_44\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_40\"='r 16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43_o\" text,\n \"d_42_o\" text,\n \"d_41\" text,\n \"d_40\" text\n);\n\nQuestion: Name the D 41 \u221a for having D 43 of r 13"
},
{
"role": "assistant",
"content": "SELECT \"d_41\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_43_o\"='r 13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43_o\" text,\n \"d_42_o\" text,\n \"d_41\" text,\n \"d_40\" text\n);\n\nQuestion: Name the D 45+ which has D 42 of r 14"
},
{
"role": "assistant",
"content": "SELECT \"d_45\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_42_o\"='r 14';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43_o\" text,\n \"d_42_o\" text,\n \"d_41\" text,\n \"d_40\" text\n);\n\nQuestion: Name the D 44 which has D 42 O of d 33"
},
{
"role": "assistant",
"content": "SELECT \"d_44\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_42_o\"='d 33';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43_o\" text,\n \"d_42_o\" text,\n \"d_41\" text,\n \"d_40\" text\n);\n\nQuestion: Name the D 46 which has D 44 of r 25"
},
{
"role": "assistant",
"content": "SELECT \"d_46\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_44\"='r 25';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"incoming_transfers\" (\n \"rank\" real,\n \"player\" text,\n \"from\" text,\n \"transfer_fee_million\" real,\n \"year\" real\n);\n\nQuestion: What was the rank of a transfer fee larger than 13 million, and after 2008?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"incoming_transfers\" WHERE \"transfer_fee_million\">13 AND \"year\">2008;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ukraine_1991_present\" (\n \"president\" text,\n \"elected\" real,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text\n);\n\nQuestion: What president was elected in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"president\" FROM \"ukraine_1991_present\" WHERE \"elected\"=2010;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"community_council\" (\n \"parties_and_voter_communities\" text,\n \"pct_2006\" real,\n \"seats_2006\" real,\n \"pct_2001\" real,\n \"seats_2001\" real\n);\n\nQuestion: When seats for 2001 is greater than 15 and % 2001 is greater than 100, what is the % 2006?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pct_2006\") FROM \"community_council\" WHERE \"seats_2001\">15 AND \"pct_2001\">100;"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.