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 \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many people attended the September 14, 1968 game?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"season_schedule\" WHERE \"date\"='september 14, 1968';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1940\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_number\" text,\n \"release_date\" text\n);\n\nQuestion: Who is the director of the production number 9368?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"1940\" WHERE \"production_number\"='9368';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1940\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_number\" text,\n \"release_date\" text\n);\n\nQuestion: What is the title with chuck jones as the director and the production number 9537?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"1940\" WHERE \"director\"='chuck jones' AND \"production_number\"='9537';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1940\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_number\" text,\n \"release_date\" text\n);\n\nQuestion: What is the release date of the mm series, which has the title tom thumb in trouble?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"1940\" WHERE \"series\"='mm' AND \"title\"='tom thumb in trouble';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1940\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_number\" text,\n \"release_date\" text\n);\n\nQuestion: What is the release date of the mm series which has the title confederate honey?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"1940\" WHERE \"series\"='mm' AND \"title\"='confederate honey';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indianapolis_500\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: What is the start of the Team of Andretti Green Racing with a finish higher than 3 in a year before 2007?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"start\") FROM \"indianapolis_500\" WHERE \"team\"='andretti green racing' AND \"finish\">3 AND \"year\"<2007;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indianapolis_500\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: What is the lowest start in a year after 2008?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"start\") FROM \"indianapolis_500\" WHERE \"year\">2008;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indianapolis_500\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: What finish has a start smaller than 25?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"indianapolis_500\" WHERE \"start\"<25;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indianapolis_500\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: Where did the team of Rahal Letterman in 2006 start?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"start\") FROM \"indianapolis_500\" WHERE \"team\"='rahal letterman' AND \"year\"=2006;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indianapolis_500\" (\n \"year\" real,\n \"chassis\" text,\n \"engine\" text,\n \"start\" real,\n \"finish\" real,\n \"team\" text\n);\n\nQuestion: What year did Team of Andretti Green Racing have a finish smaller than 8 with a Dallara chassis?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"indianapolis_500\" WHERE \"chassis\"='dallara' AND \"team\"='andretti green racing' AND \"finish\"<8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"planned_for_theatrical_release_but_never\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"characters\" text,\n \"release_date\" text\n);\n\nQuestion: What director has 2004-03-31 as the release date, with daffy (as duck dodgers) as the character?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"planned_for_theatrical_release_but_never\" WHERE \"release_date\"='2004-03-31' AND \"characters\"='daffy (as duck dodgers)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"planned_for_theatrical_release_but_never\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"characters\" text,\n \"release_date\" text\n);\n\nQuestion: What title has daffy (as duck dodgers) as the character?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"planned_for_theatrical_release_but_never\" WHERE \"characters\"='daffy (as duck dodgers)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"planned_for_theatrical_release_but_never\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"characters\" text,\n \"release_date\" text\n);\n\nQuestion: What series has dan povenmire as the director, with museum scream as the title?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"planned_for_theatrical_release_but_never\" WHERE \"director\"='dan povenmire' AND \"title\"='museum scream';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What was the highest number of 2009 electorates for Raisen when the consituency number was 142?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"number_of_electorates_2009\") FROM \"assembly_segments\" WHERE \"district\"='raisen' AND \"constituency_number\"='142';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"northern_villages\" (\n \"name\" text,\n \"population_2011\" real,\n \"population_2006\" real,\n \"change_pct\" real,\n \"land_area_km\" real,\n \"population_density_per_km\" real\n);\n\nQuestion: How much Population density (per km\u00b2) has a Name of total northern villages, and a Population (2006) larger than 11414?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"population_density_per_km\") FROM \"northern_villages\" WHERE \"name\"='total northern villages' AND \"population_2006\">11414;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"northern_villages\" (\n \"name\" text,\n \"population_2011\" real,\n \"population_2006\" real,\n \"change_pct\" real,\n \"land_area_km\" real,\n \"population_density_per_km\" real\n);\n\nQuestion: Which Population density (per km\u00b2) has a Change (%) larger than 4.9, and a Land area (km\u00b2) smaller than 15.59, and a Population (2011) larger than 790?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"population_density_per_km\") FROM \"northern_villages\" WHERE \"change_pct\">4.9 AND \"land_area_km\"<15.59 AND \"population_2011\">790;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"northern_villages\" (\n \"name\" text,\n \"population_2011\" real,\n \"population_2006\" real,\n \"change_pct\" real,\n \"land_area_km\" real,\n \"population_density_per_km\" real\n);\n\nQuestion: How much Population (2011) has a Land area (km\u00b2) larger than 15.69, and a Population density (per km\u00b2) larger than 57.3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"population_2011\") FROM \"northern_villages\" WHERE \"land_area_km\">15.69 AND \"population_density_per_km\">57.3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"northern_villages\" (\n \"name\" text,\n \"population_2011\" real,\n \"population_2006\" real,\n \"change_pct\" real,\n \"land_area_km\" real,\n \"population_density_per_km\" real\n);\n\nQuestion: Which Land area (km\u00b2) has a Population density (per km\u00b2) larger than 112.6, and a Population (2006) larger than 785, and a Name of pinehouse?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"land_area_km\") FROM \"northern_villages\" WHERE \"population_density_per_km\">112.6 AND \"population_2006\">785 AND \"name\"='pinehouse';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"great_northern_section\" (\n \"number\" text,\n \"previous_number_s\" real,\n \"previous_class\" text,\n \"converted\" real,\n \"withdrawn\" real,\n \"disposal\" text\n);\n\nQuestion: With a number of 30, what would be listed for previous number(s)?"
},
{
"role": "assistant",
"content": "SELECT \"previous_number_s\" FROM \"great_northern_section\" WHERE \"number\"='30';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"great_northern_section\" (\n \"number\" text,\n \"previous_number_s\" real,\n \"previous_class\" text,\n \"converted\" real,\n \"withdrawn\" real,\n \"disposal\" text\n);\n\nQuestion: With a previous number of 68165, what is the oldest converted date?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"converted\") FROM \"great_northern_section\" WHERE \"previous_number_s\"=68165;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"great_northern_section\" (\n \"number\" text,\n \"previous_number_s\" real,\n \"previous_class\" text,\n \"converted\" real,\n \"withdrawn\" real,\n \"disposal\" text\n);\n\nQuestion: With a converted less than 1966 and a number of 32 (2nd), what is the largest number listed for withdrawn?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"withdrawn\") FROM \"great_northern_section\" WHERE \"number\"='32 (2nd)' AND \"converted\"<1966;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_wickets\" (\n \"player\" text,\n \"matches\" text,\n \"overs\" text,\n \"wickets\" text,\n \"economy_rate\" text,\n \"average\" text,\n \"strike_rate\" text\n);\n\nQuestion: What is the average when the matches are 11?"
},
{
"role": "assistant",
"content": "SELECT \"average\" FROM \"most_wickets\" WHERE \"matches\"='11';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_wickets\" (\n \"player\" text,\n \"matches\" text,\n \"overs\" text,\n \"wickets\" text,\n \"economy_rate\" text,\n \"average\" text,\n \"strike_rate\" text\n);\n\nQuestion: What is the overs when the matches are 10?"
},
{
"role": "assistant",
"content": "SELECT \"overs\" FROM \"most_wickets\" WHERE \"matches\"='10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chevy_rock_roll_400\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: Which Car # has a Driver of ryan newman, and a Position larger than 10?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"car_num\") FROM \"chevy_rock_roll_400\" WHERE \"driver\"='ryan newman' AND \"pos\">10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chevy_rock_roll_400\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: Which Car # has a Team of hendrick motorsports, and a Driver of mark martin, and a Position larger than 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"car_num\") FROM \"chevy_rock_roll_400\" WHERE \"team\"='hendrick motorsports' AND \"driver\"='mark martin' AND \"pos\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"saturday_and_sundays_programming_as_of_s\" (\n \"time\" text,\n \"show_name\" text,\n \"local_networked\" text,\n \"ad_freq\" text,\n \"news_freq\" text\n);\n\nQuestion: Which time has a local/networked value of Local, ad frequency of every 20 minutes, and news frequency of n/a after 7PM news?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"saturday_and_sundays_programming_as_of_s\" WHERE \"local_networked\"='local' AND \"ad_freq\"='20 minutes' AND \"news_freq\"='n/a after 7pm news';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"saturday_and_sundays_programming_as_of_s\" (\n \"time\" text,\n \"show_name\" text,\n \"local_networked\" text,\n \"ad_freq\" text,\n \"news_freq\" text\n);\n\nQuestion: Which time has a news frequency of 1 hour and show name of Best Mix Overnight?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"saturday_and_sundays_programming_as_of_s\" WHERE \"news_freq\"='1 hour' AND \"show_name\"='best mix overnight';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"saturday_and_sundays_programming_as_of_s\" (\n \"time\" text,\n \"show_name\" text,\n \"local_networked\" text,\n \"ad_freq\" text,\n \"news_freq\" text\n);\n\nQuestion: What is the ad frequency for the show named Health Matters?"
},
{
"role": "assistant",
"content": "SELECT \"ad_freq\" FROM \"saturday_and_sundays_programming_as_of_s\" WHERE \"show_name\"='health matters';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"saturday_and_sundays_programming_as_of_s\" (\n \"time\" text,\n \"show_name\" text,\n \"local_networked\" text,\n \"ad_freq\" text,\n \"news_freq\" text\n);\n\nQuestion: What is the news frequency for the show Locker Room?"
},
{
"role": "assistant",
"content": "SELECT \"news_freq\" FROM \"saturday_and_sundays_programming_as_of_s\" WHERE \"show_name\"='locker room';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"saturday_and_sundays_programming_as_of_s\" (\n \"time\" text,\n \"show_name\" text,\n \"local_networked\" text,\n \"ad_freq\" text,\n \"news_freq\" text\n);\n\nQuestion: What is the local/networked value for the show with an ad frequency of N/A?"
},
{
"role": "assistant",
"content": "SELECT \"local_networked\" FROM \"saturday_and_sundays_programming_as_of_s\" WHERE \"ad_freq\"='n/a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: When france had a rank larger than 2, what was their time?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"heat_2\" WHERE \"rank\">2 AND \"country\"='france';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What was the time for the country of kazakhstan?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"heat_2\" WHERE \"country\"='kazakhstan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What athletes represented the country of germany?"
},
{
"role": "assistant",
"content": "SELECT \"athletes\" FROM \"heat_2\" WHERE \"country\"='germany';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What was the rank for the finish time of 1:42.054?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"heat_2\" WHERE \"time\"='1:42.054';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Which country had a rank smaller than 7 and a time of 1:43.189?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"heat_2\" WHERE \"rank\"<7 AND \"time\"='1:43.189';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_by_team\" (\n \"club\" text,\n \"winners\" real,\n \"last_final_won\" text,\n \"runners_up\" real,\n \"last_final_lost\" text\n);\n\nQuestion: what is the club when the runners-up is 1 and the last final won is 1999?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"results_by_team\" WHERE \"runners_up\"=1 AND \"last_final_won\"='1999';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_by_team\" (\n \"club\" text,\n \"winners\" real,\n \"last_final_won\" text,\n \"runners_up\" real,\n \"last_final_lost\" text\n);\n\nQuestion: what is the last final won when runners-up is 1 and club is rijeka?"
},
{
"role": "assistant",
"content": "SELECT \"last_final_won\" FROM \"results_by_team\" WHERE \"runners_up\"=1 AND \"club\"='rijeka';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_by_team\" (\n \"club\" text,\n \"winners\" real,\n \"last_final_won\" text,\n \"runners_up\" real,\n \"last_final_lost\" text\n);\n\nQuestion: How many times is runners-up less than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"winners\") FROM \"results_by_team\" WHERE \"runners_up\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"football_league_division_two\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many games have a Result of 4\u20130, and an Attendance larger than 12,256?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"game\") FROM \"football_league_division_two\" WHERE \"result\"='4\u20130' AND \"attendance\">'12,256';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"football_league_division_two\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which Result has a Game larger than 6, and an Attendance larger than 12,782, and a Date of 5 december 1987?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"football_league_division_two\" WHERE \"game\">6 AND \"attendance\">'12,782' AND \"date\"='5 december 1987';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"football_league_division_two\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which Result has a Venue of away, and a Game smaller than 43, and an Opponent of bournemouth?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"football_league_division_two\" WHERE \"venue\"='away' AND \"game\"<43 AND \"opponent\"='bournemouth';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"football_league_division_two\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which Result has a Venue of home, and a Date of 3 october 1987?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"football_league_division_two\" WHERE \"venue\"='home' AND \"date\"='3 october 1987';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"location\" text,\n \"year\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text,\n \"name\" text\n);\n\nQuestion: What is the score of 1993?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"doubles\" WHERE \"year\"='1993';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"location\" text,\n \"year\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text,\n \"name\" text\n);\n\nQuestion: What is the Name when the runner-up was Sania Mirza Elena Vesnina?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"doubles\" WHERE \"runner_up\"='sania mirza elena vesnina';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"location\" text,\n \"year\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text,\n \"name\" text\n);\n\nQuestion: What is the name with a Score of 6\u20133, 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"doubles\" WHERE \"score\"='6\u20133, 6\u20133';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"location\" text,\n \"year\" text,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text,\n \"name\" text\n);\n\nQuestion: What was the location in 2009?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"doubles\" WHERE \"year\"='2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_conversion_period_1867_1887\" (\n \"class\" text,\n \"railway_number_s\" text,\n \"quantity_rebuilt\" real,\n \"rebuild_year_s\" text,\n \"type\" text\n);\n\nQuestion: What's the railway number of a D(rebuild) class?"
},
{
"role": "assistant",
"content": "SELECT \"railway_number_s\" FROM \"first_conversion_period_1867_1887\" WHERE \"class\"='d(rebuild)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_conversion_period_1867_1887\" (\n \"class\" text,\n \"railway_number_s\" text,\n \"quantity_rebuilt\" real,\n \"rebuild_year_s\" text,\n \"type\" text\n);\n\nQuestion: What the least quantity having a T2A class?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"quantity_rebuilt\") FROM \"first_conversion_period_1867_1887\" WHERE \"class\"='t2a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_3\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: Which lane did the swimmer who had a Reaction time of 0.185 and a time of 20.9 swim in?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lane\") FROM \"heat_3\" WHERE \"react\"=0.185 AND \"time\"<20.9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_3\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: What was the 200-metre time for the swimmer from Slovenia in lane 9?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"time\") FROM \"heat_3\" WHERE \"nationality\"='slovenia' AND \"lane\"<9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_3\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"nationality\" text,\n \"time\" real,\n \"react\" real\n);\n\nQuestion: Who was the swimmer from Dominica who had a time of 21.2 and swam in lane 7?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"heat_3\" WHERE \"time\"<21.2 AND \"lane\"<7 AND \"nationality\"='dominica';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seventh_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What player had a pick higher than 53, and a position of defensive tackle?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"seventh_round\" WHERE \"pick\">53 AND \"position\"='defensive tackle';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seventh_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What team is Jim Garcia category:Articles with Hcards on?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"seventh_round\" WHERE \"player\"='jim garcia category:articles with hcards';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seventh_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Who is the pick from the Purdue College?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"seventh_round\" WHERE \"college\"='purdue';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"marcin_do_ga_pol\" text,\n \"199kg\" text,\n \"w_adys_awowo_poland\" text\n);\n\nQuestion: What shows for Marcin Do\u0142\u0119ga ( POL )when the world record shows olympic record, and a Snatch of total?"
},
{
"role": "assistant",
"content": "SELECT \"marcin_do_ga_pol\" FROM \"records\" WHERE \"world_record\"='olympic record' AND \"snatch\"='total';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"marcin_do_ga_pol\" text,\n \"199kg\" text,\n \"w_adys_awowo_poland\" text\n);\n\nQuestion: What is the snatch when Marcin Do\u0142\u0119ga ( POL ) was 430kg?"
},
{
"role": "assistant",
"content": "SELECT \"snatch\" FROM \"records\" WHERE \"marcin_do_ga_pol\"='430kg';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"marcin_do_ga_pol\" text,\n \"199kg\" text,\n \"w_adys_awowo_poland\" text\n);\n\nQuestion: What shows for W\u0142adys\u0142awowo, Poland when the world record was clean & jerk?"
},
{
"role": "assistant",
"content": "SELECT \"w_adys_awowo_poland\" FROM \"records\" WHERE \"world_record\"='clean & jerk';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"marcin_do_ga_pol\" text,\n \"199kg\" text,\n \"w_adys_awowo_poland\" text\n);\n\nQuestion: What shows for W\u0142adys\u0142awowo, Poland when the world record shows olympic record, a Marcin Do\u0142\u0119ga (POL) is olympic standard, and Snatch is clean & jerk?"
},
{
"role": "assistant",
"content": "SELECT \"w_adys_awowo_poland\" FROM \"records\" WHERE \"world_record\"='olympic record' AND \"marcin_do_ga_pol\"='olympic standard' AND \"snatch\"='clean & jerk';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What date has 0-6700-30838-2-9 for a catalog?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalog\"='0-6700-30838-2-9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What's the date in the United Kingdom having a catalog of reveal50cd/lp?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalog\"='reveal50cd/lp' AND \"region\"='united kingdom';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What day was king's cup 1996?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"competition\"='king''s cup 1996';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the score for king's cup 1996?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='king''s cup 1996';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the result when the score was 5-1?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"score\"='5-1';"
}
]
|
[
{
"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 \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What tournament had an A in 2012 and Q2 in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_performance_timeline\" WHERE \"2012\"='a' AND \"2010\"='q2';"
}
]
|
[
{
"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 \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What's the 2010 when they had a Q2 in 2009?"
},
{
"role": "assistant",
"content": "SELECT \"2010\" FROM \"singles_performance_timeline\" WHERE \"2009\"='q2';"
}
]
|
[
{
"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 \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What's the 2012 during Wimbledon and had a Q3 in 2008?"
},
{
"role": "assistant",
"content": "SELECT \"2012\" FROM \"singles_performance_timeline\" WHERE \"2008\"='q3' AND \"tournament\"='wimbledon';"
}
]
|
[
{
"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 \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What's the tournament name when they had an A in 2011 & 2012?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_performance_timeline\" WHERE \"2012\"='a' AND \"2011\"='a';"
}
]
|
[
{
"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 \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What's the 2012 when 2009 was 205?"
},
{
"role": "assistant",
"content": "SELECT \"2012\" FROM \"singles_performance_timeline\" WHERE \"2009\"='205';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"and\" (\n \"peak\" text,\n \"country\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"col_m\" real\n);\n\nQuestion: How much Col (m) has a Prominence (m) of 2,344?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"col_m\") FROM \"and\" WHERE \"prominence_m\"='2,344';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"and\" (\n \"peak\" text,\n \"country\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"col_m\" real\n);\n\nQuestion: Which Prominence (m) has a Col (m) of 350?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"prominence_m\") FROM \"and\" WHERE \"col_m\"=350;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"and\" (\n \"peak\" text,\n \"country\" text,\n \"elevation_m\" real,\n \"prominence_m\" real,\n \"col_m\" real\n);\n\nQuestion: Which Elevation (m) has a Prominence (m) smaller than 2,456, and a Peak of mount kyllini, and a Col (m) smaller than 506?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"elevation_m\") FROM \"and\" WHERE \"prominence_m\"<'2,456' AND \"peak\"='mount kyllini' AND \"col_m\"<506;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"heat_4\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Who was the athlete from Lithuania?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"heat_4\" WHERE \"country\"='lithuania';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fairfax_county_board_of_supervisors_resu\" (\n \"year\" text,\n \"subject\" text,\n \"party\" text,\n \"votes\" real,\n \"opponent\" text\n);\n\nQuestion: How many votes did Jeannemarie Devolites Davis get in 1995-Special?"
},
{
"role": "assistant",
"content": "SELECT \"votes\" FROM \"fairfax_county_board_of_supervisors_resu\" WHERE \"opponent\"='jeannemarie devolites davis' AND \"year\"='1995-special';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fairfax_county_board_of_supervisors_resu\" (\n \"year\" text,\n \"subject\" text,\n \"party\" text,\n \"votes\" real,\n \"opponent\" text\n);\n\nQuestion: Who was the subject for the year of 2007?"
},
{
"role": "assistant",
"content": "SELECT \"subject\" FROM \"fairfax_county_board_of_supervisors_resu\" WHERE \"year\"='2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fairfax_county_board_of_supervisors_resu\" (\n \"year\" text,\n \"subject\" text,\n \"party\" text,\n \"votes\" real,\n \"opponent\" text\n);\n\nQuestion: Which party has a voting total greater than 4,478?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"fairfax_county_board_of_supervisors_resu\" WHERE \"votes\">'4,478';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: Which Type has a Nat of geo?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"in\" WHERE \"nat\"='geo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: Which Moving from has a Nat of ned?"
},
{
"role": "assistant",
"content": "SELECT \"moving_from\" FROM \"in\" WHERE \"nat\"='ned';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: Which Ends have a Name of zambrano?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"ends\") FROM \"in\" WHERE \"name\"='zambrano';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: Which Transfer fee has a Moving from of youth system, and a Nat of mar?"
},
{
"role": "assistant",
"content": "SELECT \"transfer_fee\" FROM \"in\" WHERE \"moving_from\"='youth system' AND \"nat\"='mar';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"nat\" text,\n \"name\" text,\n \"moving_from\" text,\n \"type\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text\n);\n\nQuestion: Which Transfer fee has Ends larger than 2011, and a Moving from of psv?"
},
{
"role": "assistant",
"content": "SELECT \"transfer_fee\" FROM \"in\" WHERE \"ends\">2011 AND \"moving_from\"='psv';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"equestrian\" (\n \"athlete\" text,\n \"class\" text,\n \"horse\" text,\n \"event\" text,\n \"result\" text,\n \"rank\" text\n);\n\nQuestion: What is the result for the Toscane Horse in the freestyle test?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"equestrian\" WHERE \"horse\"='toscane' AND \"event\"='freestyle test';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"equestrian\" (\n \"athlete\" text,\n \"class\" text,\n \"horse\" text,\n \"event\" text,\n \"result\" text,\n \"rank\" text\n);\n\nQuestion: What horse has a 66.452 result?"
},
{
"role": "assistant",
"content": "SELECT \"horse\" FROM \"equestrian\" WHERE \"result\"='66.452';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"equestrian\" (\n \"athlete\" text,\n \"class\" text,\n \"horse\" text,\n \"event\" text,\n \"result\" text,\n \"rank\" text\n);\n\nQuestion: What event did Sjerstin Vermeulen receive a 66.452 result?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"equestrian\" WHERE \"athlete\"='sjerstin vermeulen' AND \"result\"='66.452';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"equestrian\" (\n \"athlete\" text,\n \"class\" text,\n \"horse\" text,\n \"event\" text,\n \"result\" text,\n \"rank\" text\n);\n\nQuestion: What class had a Championship Test event with a 62.516 result?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"equestrian\" WHERE \"event\"='championship test' AND \"result\"='62.516';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"equestrian\" (\n \"athlete\" text,\n \"class\" text,\n \"horse\" text,\n \"event\" text,\n \"result\" text,\n \"rank\" text\n);\n\nQuestion: What horse has a 65.863 result?"
},
{
"role": "assistant",
"content": "SELECT \"horse\" FROM \"equestrian\" WHERE \"result\"='65.863';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"fuel_system\" text\n);\n\nQuestion: What is the displacement for the model 1400?"
},
{
"role": "assistant",
"content": "SELECT \"displacement\" FROM \"engines\" WHERE \"model\"='1400';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"fuel_system\" text\n);\n\nQuestion: What is the displacement when the fuel system is carburettor, and a power of ps (kw; hp), and also has a model of 2000?"
},
{
"role": "assistant",
"content": "SELECT \"displacement\" FROM \"engines\" WHERE \"fuel_system\"='carburettor' AND \"power\"='ps (kw; hp)' AND \"model\"='2000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"fuel_system\" text\n);\n\nQuestion: What engine with the years of 1975-84 has a model of 1600?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"engines\" WHERE \"model\"='1600' AND \"years\"='1975-84';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"fuel_system\" text\n);\n\nQuestion: What displacement has a model of 2000?"
},
{
"role": "assistant",
"content": "SELECT \"displacement\" FROM \"engines\" WHERE \"model\"='2000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"fuel_system\" text\n);\n\nQuestion: What engine with years of 1975-84 has a displacement of 1585cc?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"engines\" WHERE \"years\"='1975-84' AND \"displacement\"='1585cc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"fuel_system\" text\n);\n\nQuestion: What is the power for the years 1975-84?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"engines\" WHERE \"years\"='1975-84';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"al_ahly_results\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 2nd leg in match with team 2 of Teram?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"al_ahly_results\" WHERE \"team_2\"='teram';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result of the December 15, 2002 game?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='december 15, 2002';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: What date was the game that was attended by 69,024?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\"='69,024';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: On what date was the week 17 game?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=17;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_w\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: What is the name of the 2008 club for Istres Volleyball?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"volleyball_at_the_2008_summer_olympics_w\" WHERE \"2008_club\"='istres volleyball';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"p_series_1939_1944\" (\n \"model\" text,\n \"built\" text,\n \"quantity\" real,\n \"seats\" real,\n \"length\" text,\n \"engine\" text\n);\n\nQuestion: What is the Model of the Engine with 29 Seats Built in 1941\u20131942?"
},
{
"role": "assistant",
"content": "SELECT \"model\" FROM \"p_series_1939_1944\" WHERE \"seats\"=29 AND \"built\"='1941\u20131942';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"p_series_1939_1944\" (\n \"model\" text,\n \"built\" text,\n \"quantity\" real,\n \"seats\" real,\n \"length\" text,\n \"engine\" text\n);\n\nQuestion: What is the Quantity of the engine Model PG-2901?"
},
{
"role": "assistant",
"content": "SELECT \"quantity\" FROM \"p_series_1939_1944\" WHERE \"model\"='pg-2901';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_clubs\" (\n \"team\" text,\n \"matches\" real,\n \"wins\" real,\n \"wins_pct\" text,\n \"draws\" real,\n \"draws_pct\" text,\n \"losses\" real,\n \"losses_pct\" text,\n \"against\" real,\n \"for_against_ratio\" text\n);\n\nQuestion: What is the % of draws with an against ratio of 0.67 and 1 win?"
},
{
"role": "assistant",
"content": "SELECT \"draws_pct\" FROM \"by_clubs\" WHERE \"for_against_ratio\"='0.67' AND \"wins\"=1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_clubs\" (\n \"team\" text,\n \"matches\" real,\n \"wins\" real,\n \"wins_pct\" text,\n \"draws\" real,\n \"draws_pct\" text,\n \"losses\" real,\n \"losses_pct\" text,\n \"against\" real,\n \"for_against_ratio\" text\n);\n\nQuestion: What are the matches with a 50% of draws for Team Milan?"
},
{
"role": "assistant",
"content": "SELECT \"matches\" FROM \"by_clubs\" WHERE \"draws_pct\"='50%' AND \"team\"='milan';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.