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 \"table1_14724369_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the first number in series that had the production code 1ACX03?" }, { "role": "assistant", "content": "SELECT MAX(\"no_in_series\") FROM \"table1_14724369_1\" WHERE \"production_code\"='1ACX03';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_14724369_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: Which title had the production code 1ACX04?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_14724369_1\" WHERE \"production_code\"='1ACX04';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_14724369_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: When did the show directed by Michael Dimartino first air?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_14724369_1\" WHERE \"directed_by\"='Michael DiMartino';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_14724369_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: Which series numbers were directed by Monte Young?" }, { "role": "assistant", "content": "SELECT \"no_in_series\" FROM \"table1_14724369_1\" WHERE \"directed_by\"='Monte Young';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_14724369_1\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: How many people directed the show written by Chris Sheridan?" }, { "role": "assistant", "content": "SELECT COUNT(\"directed_by\") FROM \"table1_14724369_1\" WHERE \"written_by\"='Chris Sheridan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: What regular seasons occurred in 2011?" }, { "role": "assistant", "content": "SELECT \"regular_season\" FROM \"year_by_year\" WHERE \"year\"=2011;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: What is the largest numbered?" }, { "role": "assistant", "content": "SELECT MAX(\"division\") FROM \"year_by_year\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: How many positions does rene villemure play?" }, { "role": "assistant", "content": "SELECT COUNT(\"position\") FROM \"round_two\" WHERE \"player\"='Rene Villemure';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What is the pick# for the medicine hat tigers (wchl)?" }, { "role": "assistant", "content": "SELECT MIN(\"pick_num\") FROM \"round_two\" WHERE \"college_junior_club_team\"='Medicine Hat Tigers (WCHL)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What nhl team does stan weir play for?" }, { "role": "assistant", "content": "SELECT \"nhl_team\" FROM \"round_two\" WHERE \"player\"='Stan Weir';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What nhl team does dwight bialowas play for?" }, { "role": "assistant", "content": "SELECT \"nhl_team\" FROM \"round_two\" WHERE \"player\"='Dwight Bialowas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Lorne Henning has the lowest pick# of?" }, { "role": "assistant", "content": "SELECT MIN(\"pick_num\") FROM \"round_two\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Jack Lynch played for the oshawa generals (omjhl) before playing for what nhl team?" }, { "role": "assistant", "content": "SELECT \"nhl_team\" FROM \"round_two\" WHERE \"college_junior_club_team\"='Oshawa Generals (OMJHL)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which colle/junior/club team did Michel Boudreau play for?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team\" FROM \"round_three\" WHERE \"player\"='Michel Boudreau';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which players played right wing?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"round_three\" WHERE \"position\"='Right Wing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which nationality is the player from the Philadelphia Flyers?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"round_three\" WHERE \"nhl_team\"='Philadelphia Flyers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which position did the player hold that played for the Philadelphia Flyers in NHL?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"round_three\" WHERE \"nhl_team\"='Philadelphia Flyers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Which college/junior/club team did the player play on that played for the Buffalo Sabres in NHL?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team\" FROM \"round_three\" WHERE \"nhl_team\"='Buffalo Sabres';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Name the number of teams for college/junior club for philadelphia flyers" }, { "role": "assistant", "content": "SELECT COUNT(\"college_junior_club_team\") FROM \"round_four\" WHERE \"nhl_team\"='Philadelphia Flyers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Name the position for ron lalonde" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"round_four\" WHERE \"player\"='Ron Lalonde';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: Name the college/junior club team for pick number 63" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team\" FROM \"round_four\" WHERE \"pick_num\"=63;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_ten\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: How many positions did 1972 NHL Draft pick Rene Lambert play?" }, { "role": "assistant", "content": "SELECT COUNT(\"position\") FROM \"round_ten\" WHERE \"player\"='Rene Lambert';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_nine\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: what's the\u00a0college/junior/club team\u00a0with\u00a0nhl team\u00a0being california golden seals" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team\" FROM \"round_nine\" WHERE \"nhl_team\"='California Golden Seals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_nine\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: what's the\u00a0nhl team\u00a0with\u00a0college/junior/club team\u00a0being brandon wheat kings (wchl)" }, { "role": "assistant", "content": "SELECT \"nhl_team\" FROM \"round_nine\" WHERE \"college_junior_club_team\"='Brandon Wheat Kings (WCHL)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_nine\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: who is the the\u00a0player\u00a0with\u00a0pick #\u00a0being 132" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"round_nine\" WHERE \"pick_num\"=132;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_nine\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: how many\u00a0player\u00a0with\u00a0nhl team\u00a0being vancouver canucks" }, { "role": "assistant", "content": "SELECT COUNT(\"player\") FROM \"round_nine\" WHERE \"nhl_team\"='Vancouver Canucks';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_nine\" (\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: what's the\u00a0position\u00a0with\u00a0player\u00a0being ray boutin" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"round_nine\" WHERE \"player\"='Ray Boutin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"railway_stations_currently_in_use\" (\n \"station_and_code\" text,\n \"managed_by\" text,\n \"lines_served\" text,\n \"station_users_2007_8\" real,\n \"station_users_2008_9\" text,\n \"year_opened\" text,\n \"platforms\" text,\n \"borough\" text\n);\n\nQuestion: what is the name of the borough where station uses is 28702?" }, { "role": "assistant", "content": "SELECT \"borough\" FROM \"railway_stations_currently_in_use\" WHERE \"station_users_2008_9\"='28702';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"railway_stations_currently_in_use\" (\n \"station_and_code\" text,\n \"managed_by\" text,\n \"lines_served\" text,\n \"station_users_2007_8\" real,\n \"station_users_2008_9\" text,\n \"year_opened\" text,\n \"platforms\" text,\n \"borough\" text\n);\n\nQuestion: what are the lines served where station users is 210076?" }, { "role": "assistant", "content": "SELECT \"lines_served\" FROM \"railway_stations_currently_in_use\" WHERE \"station_users_2008_9\"='210076';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"railway_stations_currently_in_use\" (\n \"station_and_code\" text,\n \"managed_by\" text,\n \"lines_served\" text,\n \"station_users_2007_8\" real,\n \"station_users_2008_9\" text,\n \"year_opened\" text,\n \"platforms\" text,\n \"borough\" text\n);\n\nQuestion: whatis hte station code where users are 130368?" }, { "role": "assistant", "content": "SELECT \"station_and_code\" FROM \"railway_stations_currently_in_use\" WHERE \"station_users_2008_9\"='130368';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_prior_winners\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: Which is the class A when Weslaco was the class AAAAA and brownwood was the class AAAA" }, { "role": "assistant", "content": "SELECT \"class_a\" FROM \"list_of_prior_winners\" WHERE \"class_aaaaa\"='Weslaco' AND \"class_aaaa\"='Brownwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_prior_winners\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: Which is the class A when Marion was the class AA" }, { "role": "assistant", "content": "SELECT \"class_a\" FROM \"list_of_prior_winners\" WHERE \"class_aa\"='Marion';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_prior_winners\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: Which is the class AA when graford was the class A" }, { "role": "assistant", "content": "SELECT \"class_aa\" FROM \"list_of_prior_winners\" WHERE \"class_a\"='Graford';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_prior_winners\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: How many class AA in the year 2002-03" }, { "role": "assistant", "content": "SELECT COUNT(\"class_aa\") FROM \"list_of_prior_winners\" WHERE \"school_year\"='2002-03';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_prior_winners\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: Who was the class AAAA when class AAAAA was Weslaco in 1994-95" }, { "role": "assistant", "content": "SELECT \"class_aaaa\" FROM \"list_of_prior_winners\" WHERE \"class_aaaaa\"='Weslaco' AND \"school_year\"='1994-95';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_prior_winners\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: What was the class AAAA when San Angelo Lake View was the class AAAA" }, { "role": "assistant", "content": "SELECT \"class_aaaaa\" FROM \"list_of_prior_winners\" WHERE \"class_aaaa\"='San Angelo Lake View';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"africa\" (\n \"rank\" real,\n \"country\" text,\n \"international_tourist_arrivals_2011\" text,\n \"international_tourist_arrivals_2010\" text,\n \"change_2010_to_2011\" text,\n \"change_2009_to_2010\" text\n);\n\nQuestion: What are the changes from 2009 to 2010 in Tunisia?" }, { "role": "assistant", "content": "SELECT \"change_2009_to_2010\" FROM \"africa\" WHERE \"country\"='Tunisia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"africa\" (\n \"rank\" real,\n \"country\" text,\n \"international_tourist_arrivals_2011\" text,\n \"international_tourist_arrivals_2010\" text,\n \"change_2010_to_2011\" text,\n \"change_2009_to_2010\" text\n);\n\nQuestion: What are the international tourist arrivals in 2010 where change from 2010 to 2011 is +11.2% ?" }, { "role": "assistant", "content": "SELECT \"international_tourist_arrivals_2010\" FROM \"africa\" WHERE \"change_2010_to_2011\"='+11.2%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"africa\" (\n \"rank\" real,\n \"country\" text,\n \"international_tourist_arrivals_2011\" text,\n \"international_tourist_arrivals_2010\" text,\n \"change_2010_to_2011\" text,\n \"change_2009_to_2010\" text\n);\n\nQuestion: What are the changes (2010 to 2011) where the International Tourist Arrivals is 1.7 million?" }, { "role": "assistant", "content": "SELECT \"change_2010_to_2011\" FROM \"africa\" WHERE \"international_tourist_arrivals_2011\"='1.7 million';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"africa\" (\n \"rank\" real,\n \"country\" text,\n \"international_tourist_arrivals_2011\" text,\n \"international_tourist_arrivals_2010\" text,\n \"change_2010_to_2011\" text,\n \"change_2009_to_2010\" text\n);\n\nQuestion: What are the international tourist arrivals(2010) where change from 2009 to 2010 is +11.1%?" }, { "role": "assistant", "content": "SELECT \"international_tourist_arrivals_2010\" FROM \"africa\" WHERE \"change_2009_to_2010\"='+11.1%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"africa\" (\n \"rank\" real,\n \"country\" text,\n \"international_tourist_arrivals_2011\" text,\n \"international_tourist_arrivals_2010\" text,\n \"change_2010_to_2011\" text,\n \"change_2009_to_2010\" text\n);\n\nQuestion: What are the International tourist arrivals (2010) where change from 2010 to 2011 is +15%" }, { "role": "assistant", "content": "SELECT \"international_tourist_arrivals_2010\" FROM \"africa\" WHERE \"change_2010_to_2011\"='+15%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"africa\" (\n \"rank\" real,\n \"country\" text,\n \"international_tourist_arrivals_2011\" text,\n \"international_tourist_arrivals_2010\" text,\n \"change_2010_to_2011\" text,\n \"change_2009_to_2010\" text\n);\n\nQuestion: How many international tourist arrivals were in Senegal in 2011?" }, { "role": "assistant", "content": "SELECT \"international_tourist_arrivals_2011\" FROM \"africa\" WHERE \"country\"='Senegal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"europe\" (\n \"rank\" real,\n \"country\" text,\n \"international_tourist_arrivals_2012\" text,\n \"international_tourist_arrivals_2011\" text,\n \"change_2011_to_2012\" text,\n \"change_2010_to_2011\" text\n);\n\nQuestion: When the change (2010 to 2011) is +1.0% what is the change (2011 to 2012)?" }, { "role": "assistant", "content": "SELECT \"change_2011_to_2012\" FROM \"europe\" WHERE \"change_2010_to_2011\"='+1.0%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"europe\" (\n \"rank\" real,\n \"country\" text,\n \"international_tourist_arrivals_2012\" text,\n \"international_tourist_arrivals_2011\" text,\n \"change_2011_to_2012\" text,\n \"change_2010_to_2011\" text\n);\n\nQuestion: When the change (2011 to 2012) is -0.1% what is the country?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"europe\" WHERE \"change_2011_to_2012\"='-0.1%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"europe\" (\n \"rank\" real,\n \"country\" text,\n \"international_tourist_arrivals_2012\" text,\n \"international_tourist_arrivals_2011\" text,\n \"change_2011_to_2012\" text,\n \"change_2010_to_2011\" text\n);\n\nQuestion: When the change (2011 to 2012) is +13.4% what is the country?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"europe\" WHERE \"change_2011_to_2012\"='+13.4%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"europe\" (\n \"rank\" real,\n \"country\" text,\n \"international_tourist_arrivals_2012\" text,\n \"international_tourist_arrivals_2011\" text,\n \"change_2011_to_2012\" text,\n \"change_2010_to_2011\" text\n);\n\nQuestion: When 24.1 million is international tourist arrivals (2012) what is the change (2010 to 2011) ?" }, { "role": "assistant", "content": "SELECT \"change_2010_to_2011\" FROM \"europe\" WHERE \"international_tourist_arrivals_2012\"='24.1 million';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"europe\" (\n \"rank\" real,\n \"country\" text,\n \"international_tourist_arrivals_2012\" text,\n \"international_tourist_arrivals_2011\" text,\n \"change_2011_to_2012\" text,\n \"change_2010_to_2011\" text\n);\n\nQuestion: United kingdom is the country what is the change (2011 to 2012)?" }, { "role": "assistant", "content": "SELECT \"change_2011_to_2012\" FROM \"europe\" WHERE \"country\"='United Kingdom';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"europe\" (\n \"rank\" real,\n \"country\" text,\n \"international_tourist_arrivals_2012\" text,\n \"international_tourist_arrivals_2011\" text,\n \"change_2011_to_2012\" text,\n \"change_2010_to_2011\" text\n);\n\nQuestion: When the 1 is the rank what is the overall amount of international tourist arrivals in 2012?" }, { "role": "assistant", "content": "SELECT COUNT(\"international_tourist_arrivals_2012\") FROM \"europe\" WHERE \"rank\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"enrollment_racial_demographics_and_free_\" (\n \"year\" real,\n \"enrollment\" real,\n \"black_pct\" text,\n \"white_pct\" text,\n \"hispanic_pct\" text,\n \"asian_pct\" text,\n \"free_reduced_lunch_pct\" text\n);\n\nQuestion: What is the enrollment amount where Hispanic (%) is 3.6?" }, { "role": "assistant", "content": "SELECT \"enrollment\" FROM \"enrollment_racial_demographics_and_free_\" WHERE \"hispanic_pct\"='3.6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"enrollment_racial_demographics_and_free_\" (\n \"year\" real,\n \"enrollment\" real,\n \"black_pct\" text,\n \"white_pct\" text,\n \"hispanic_pct\" text,\n \"asian_pct\" text,\n \"free_reduced_lunch_pct\" text\n);\n\nQuestion: What percentage of Asians are there in the year 2009?" }, { "role": "assistant", "content": "SELECT \"asian_pct\" FROM \"enrollment_racial_demographics_and_free_\" WHERE \"year\"=2009;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"enrollment_racial_demographics_and_free_\" (\n \"year\" real,\n \"enrollment\" real,\n \"black_pct\" text,\n \"white_pct\" text,\n \"hispanic_pct\" text,\n \"asian_pct\" text,\n \"free_reduced_lunch_pct\" text\n);\n\nQuestion: What percentage of Asians are there in the year 2004?" }, { "role": "assistant", "content": "SELECT \"asian_pct\" FROM \"enrollment_racial_demographics_and_free_\" WHERE \"year\"=2004;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"enrollment_racial_demographics_and_free_\" (\n \"year\" real,\n \"enrollment\" real,\n \"black_pct\" text,\n \"white_pct\" text,\n \"hispanic_pct\" text,\n \"asian_pct\" text,\n \"free_reduced_lunch_pct\" text\n);\n\nQuestion: What percentage of hispanics are there when the free/reduced lunch percentage is 81.4?" }, { "role": "assistant", "content": "SELECT \"hispanic_pct\" FROM \"enrollment_racial_demographics_and_free_\" WHERE \"free_reduced_lunch_pct\"='81.4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"enrollment_racial_demographics_and_free_\" (\n \"year\" real,\n \"enrollment\" real,\n \"black_pct\" text,\n \"white_pct\" text,\n \"hispanic_pct\" text,\n \"asian_pct\" text,\n \"free_reduced_lunch_pct\" text\n);\n\nQuestion: What percentage of free/reduced lunch are there when the hispanic percentage is 3.7?" }, { "role": "assistant", "content": "SELECT \"free_reduced_lunch_pct\" FROM \"enrollment_racial_demographics_and_free_\" WHERE \"hispanic_pct\"='3.7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"num\" real,\n \"title\" text,\n \"length\" text,\n \"writer\" text,\n \"composer\" text,\n \"arranger\" text,\n \"dialect\" text,\n \"mix_engineer\" text\n);\n\nQuestion: Who was the arranger for the track written by Nizar Francis ?" }, { "role": "assistant", "content": "SELECT \"arranger\" FROM \"track_listing\" WHERE \"writer\"='Nizar Francis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"num\" real,\n \"title\" text,\n \"length\" text,\n \"writer\" text,\n \"composer\" text,\n \"arranger\" text,\n \"dialect\" text,\n \"mix_engineer\" text\n);\n\nQuestion: Who was the writer for the song 4:29 in length?" }, { "role": "assistant", "content": "SELECT \"writer\" FROM \"track_listing\" WHERE \"length\"='4:29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"num\" real,\n \"title\" text,\n \"length\" text,\n \"writer\" text,\n \"composer\" text,\n \"arranger\" text,\n \"dialect\" text,\n \"mix_engineer\" text\n);\n\nQuestion: What track number is 4:29 in length?" }, { "role": "assistant", "content": "SELECT \"num\" FROM \"track_listing\" WHERE \"length\"='4:29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfhs_data\" (\n \"states\" text,\n \"males_pct\" text,\n \"males_rank\" real,\n \"females_pct\" text,\n \"females_rank\" real\n);\n\nQuestion: What is the female rank in Karnataka?" }, { "role": "assistant", "content": "SELECT \"females_rank\" FROM \"nfhs_data\" WHERE \"states\"='Karnataka';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_1\" (\n \"number_of_episode\" real,\n \"number_of_season\" real,\n \"title_original\" text,\n \"title_english\" text,\n \"original_air_date\" text\n);\n\nQuestion: What is the English title when the original title is Die Qual Der Wahl?" }, { "role": "assistant", "content": "SELECT \"title_english\" FROM \"season_1\" WHERE \"title_original\"='Die Qual der Wahl';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_1\" (\n \"number_of_episode\" real,\n \"number_of_season\" real,\n \"title_original\" text,\n \"title_english\" text,\n \"original_air_date\" text\n);\n\nQuestion: What is the episode number where the English title is Pilot?" }, { "role": "assistant", "content": "SELECT \"number_of_episode\" FROM \"season_1\" WHERE \"title_english\"='Pilot';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_1\" (\n \"number_of_episode\" real,\n \"number_of_season\" real,\n \"title_original\" text,\n \"title_english\" text,\n \"original_air_date\" text\n);\n\nQuestion: What was the original air date for episode number 6?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"season_1\" WHERE \"number_of_episode\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_1\" (\n \"number_of_episode\" real,\n \"number_of_season\" real,\n \"title_original\" text,\n \"title_english\" text,\n \"original_air_date\" text\n);\n\nQuestion: What is the original title of season number 3?" }, { "role": "assistant", "content": "SELECT \"title_original\" FROM \"season_1\" WHERE \"number_of_season\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"inegi_code\" real,\n \"municipality\" text,\n \"municipal_seat\" text,\n \"area_km_2\" text,\n \"population_2005\" real,\n \"population_density_km_2\" text,\n \"human_development_index_2000\" text\n);\n\nQuestion: What municipality where the human development index in the year 2000 was 0.7827?" }, { "role": "assistant", "content": "SELECT \"municipality\" FROM \"references\" WHERE \"human_development_index_2000\"='0.7827';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"inegi_code\" real,\n \"municipality\" text,\n \"municipal_seat\" text,\n \"area_km_2\" text,\n \"population_2005\" real,\n \"population_density_km_2\" text,\n \"human_development_index_2000\" text\n);\n\nQuestion: What is the total number of population in the year 2005 where the population density 35.9 (/km 2)?" }, { "role": "assistant", "content": "SELECT COUNT(\"population_2005\") FROM \"references\" WHERE \"population_density_km_2\"='35.9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"inegi_code\" real,\n \"municipality\" text,\n \"municipal_seat\" text,\n \"area_km_2\" text,\n \"population_2005\" real,\n \"population_density_km_2\" text,\n \"human_development_index_2000\" text\n);\n\nQuestion: What is the human development index for the year 2000 where the ingei code is 10?" }, { "role": "assistant", "content": "SELECT \"human_development_index_2000\" FROM \"references\" WHERE \"inegi_code\"=10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"inegi_code\" real,\n \"municipality\" text,\n \"municipal_seat\" text,\n \"area_km_2\" text,\n \"population_2005\" real,\n \"population_density_km_2\" text,\n \"human_development_index_2000\" text\n);\n\nQuestion: What is the area (km 2) where the population density (/mk2) is 84.3?" }, { "role": "assistant", "content": "SELECT \"area_km_2\" FROM \"references\" WHERE \"population_density_km_2\"='84.3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"election_results\" (\n \"year\" real,\n \"candidate\" text,\n \"hare_quota\" real,\n \"mandate\" text,\n \"list_votes\" real,\n \"list_pct\" text\n);\n\nQuestion: Name the mandate for list pct 12.39%" }, { "role": "assistant", "content": "SELECT \"mandate\" FROM \"election_results\" WHERE \"list_pct\"='12.39%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"election_results\" (\n \"year\" real,\n \"candidate\" text,\n \"hare_quota\" real,\n \"mandate\" text,\n \"list_votes\" real,\n \"list_pct\" text\n);\n\nQuestion: Name the total number of list votes for 20.95%" }, { "role": "assistant", "content": "SELECT COUNT(\"list_votes\") FROM \"election_results\" WHERE \"list_pct\"='20.95%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"2nd\" real,\n \"3rd\" real,\n \"top_10s\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" real,\n \"scoring_average\" text,\n \"scoring_rank\" text\n);\n\nQuestion: What was the scoring rank for Angela Stanford in 2009?" }, { "role": "assistant", "content": "SELECT \"scoring_rank\" FROM \"lpga_tour_career_summary\" WHERE \"year\"=2009;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"2nd\" real,\n \"3rd\" real,\n \"top_10s\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" real,\n \"scoring_average\" text,\n \"scoring_rank\" text\n);\n\nQuestion: What was the highest number on money list rank for Angela Stanford's career?" }, { "role": "assistant", "content": "SELECT MAX(\"money_list_rank\") FROM \"lpga_tour_career_summary\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"2nd\" real,\n \"3rd\" real,\n \"top_10s\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" real,\n \"scoring_average\" text,\n \"scoring_rank\" text\n);\n\nQuestion: In the year where Angela Stanford had a scoring average of 71.62, how many times did she take second place?" }, { "role": "assistant", "content": "SELECT COUNT(\"2nd\") FROM \"lpga_tour_career_summary\" WHERE \"scoring_average\"='71.62';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"player\" text,\n \"played\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" text\n);\n\nQuestion: who is hte player with a 3 dart avg of 89.57?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"statistics\" WHERE \"3_dart_average\"='89.57';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"player\" text,\n \"played\" real,\n \"legs_won\" real,\n \"legs_lost\" real,\n \"100\" real,\n \"140\" real,\n \"180s\" real,\n \"high_checkout\" real,\n \"3_dart_average\" text\n);\n\nQuestion: what are all played with a 3 dart avg is 92.06?" }, { "role": "assistant", "content": "SELECT \"played\" FROM \"statistics\" WHERE \"3_dart_average\"='92.06';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_14845640_1\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Namw the minimum production code for 16.04 million viewers" }, { "role": "assistant", "content": "SELECT MIN(\"production_code\") FROM \"table1_14845640_1\" WHERE \"u_s_viewers_millions\"='16.04';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_14845640_1\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: Name the written by for 16.32 million viewers" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_14845640_1\" WHERE \"u_s_viewers_millions\"='16.32';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"2nd\" real,\n \"3rd\" real,\n \"top_10s\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" text,\n \"scoring_average\" text,\n \"scoring_rank\" text\n);\n\nQuestion: What is the highest number of cuts made when her best finish is t4?" }, { "role": "assistant", "content": "SELECT MAX(\"cuts_made\") FROM \"lpga_tour_career_summary\" WHERE \"best_finish\"='T4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"2nd\" real,\n \"3rd\" real,\n \"top_10s\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" text,\n \"scoring_average\" text,\n \"scoring_rank\" text\n);\n\nQuestion: How many total earnings are recorded when her best finish is t2 with a 71.25 scoring average?" }, { "role": "assistant", "content": "SELECT COUNT(\"earnings\") FROM \"lpga_tour_career_summary\" WHERE \"best_finish\"='T2' AND \"scoring_average\"='71.25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"2nd\" real,\n \"3rd\" real,\n \"top_10s\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" text,\n \"scoring_average\" text,\n \"scoring_rank\" text\n);\n\nQuestion: What is the lowest number of cuts made when her best finish is t4?" }, { "role": "assistant", "content": "SELECT MIN(\"cuts_made\") FROM \"lpga_tour_career_summary\" WHERE \"best_finish\"='T4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"2nd\" real,\n \"3rd\" real,\n \"top_10s\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" text,\n \"scoring_average\" text,\n \"scoring_rank\" text\n);\n\nQuestion: How many years has she ranked 56 on the money list?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"lpga_tour_career_summary\" WHERE \"money_list_rank\"='56';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_career_summary\" (\n \"year\" real,\n \"tournaments_played\" real,\n \"cuts_made\" real,\n \"wins\" real,\n \"2nd\" real,\n \"3rd\" real,\n \"top_10s\" real,\n \"best_finish\" text,\n \"earnings\" real,\n \"money_list_rank\" text,\n \"scoring_average\" text,\n \"scoring_rank\" text\n);\n\nQuestion: What is the lowest number of wins?" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"lpga_tour_career_summary\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_14847258_1\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: When steve gomer is the director who is the writer?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_14847258_1\" WHERE \"directed_by\"='Steve Gomer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_14847258_1\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What is the air date for \"there goes the bride\"?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_14847258_1\" WHERE \"title\"='\\\"There Goes the Bride\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_14847258_1\" (\n \"series_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" real,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: 15.03 million u.s viewers seen what episode?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_14847258_1\" WHERE \"u_s_viewers_millions\"='15.03';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"deuces_wild\" (\n \"hand\" text,\n \"1_credit\" real,\n \"2_credits\" real,\n \"3_credits\" real,\n \"4_credits\" real,\n \"5_credits\" real\n);\n\nQuestion: Name the most 3 credits" }, { "role": "assistant", "content": "SELECT MIN(\"3_credits\") FROM \"deuces_wild\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"deuces_wild\" (\n \"hand\" text,\n \"1_credit\" real,\n \"2_credits\" real,\n \"3_credits\" real,\n \"4_credits\" real,\n \"5_credits\" real\n);\n\nQuestion: Name the least 2 credits for straight hand" }, { "role": "assistant", "content": "SELECT MIN(\"2_credits\") FROM \"deuces_wild\" WHERE \"hand\"='Straight';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"deuces_wild\" (\n \"hand\" text,\n \"1_credit\" real,\n \"2_credits\" real,\n \"3_credits\" real,\n \"4_credits\" real,\n \"5_credits\" real\n);\n\nQuestion: Name the least 2 credits for flush" }, { "role": "assistant", "content": "SELECT MIN(\"2_credits\") FROM \"deuces_wild\" WHERE \"hand\"='Flush';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"deuces_wild\" (\n \"hand\" text,\n \"1_credit\" real,\n \"2_credits\" real,\n \"3_credits\" real,\n \"4_credits\" real,\n \"5_credits\" real\n);\n\nQuestion: Name the hand for 1 credit 200" }, { "role": "assistant", "content": "SELECT \"hand\" FROM \"deuces_wild\" WHERE \"1_credit\"=200;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"deuces_wild\" (\n \"hand\" text,\n \"1_credit\" real,\n \"2_credits\" real,\n \"3_credits\" real,\n \"4_credits\" real,\n \"5_credits\" real\n);\n\nQuestion: Name the most 1 credit for three of a kind" }, { "role": "assistant", "content": "SELECT MAX(\"1_credit\") FROM \"deuces_wild\" WHERE \"hand\"='Three of a Kind';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership\" (\n \"stage_winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"young_rider_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Name the points classification for mark renshaw and team csc" }, { "role": "assistant", "content": "SELECT \"points_classification\" FROM \"classification_leadership\" WHERE \"general_classification\"='Mark Renshaw' AND \"team_classification\"='Team CSC';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_14855908_3\" (\n \"dvd_name\" text,\n \"episodes\" real,\n \"region_1_can\" text,\n \"region_1_us\" text,\n \"region_2_fr\" text,\n \"region_4\" text\n);\n\nQuestion: How many episodes were released on DVD in the US on October 13, 2009?" }, { "role": "assistant", "content": "SELECT \"episodes\" FROM \"table1_14855908_3\" WHERE \"region_1_us\"='October 13, 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_14855908_3\" (\n \"dvd_name\" text,\n \"episodes\" real,\n \"region_1_can\" text,\n \"region_1_us\" text,\n \"region_2_fr\" text,\n \"region_4\" text\n);\n\nQuestion: How many episodes were put out in Region 4 on March 4, 2010?" }, { "role": "assistant", "content": "SELECT MAX(\"episodes\") FROM \"table1_14855908_3\" WHERE \"region_4\"='March 4, 2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_14855908_3\" (\n \"dvd_name\" text,\n \"episodes\" real,\n \"region_1_can\" text,\n \"region_1_us\" text,\n \"region_2_fr\" text,\n \"region_4\" text\n);\n\nQuestion: How many episodes were released in the season 1 DVD?" }, { "role": "assistant", "content": "SELECT MIN(\"episodes\") FROM \"table1_14855908_3\" WHERE \"dvd_name\"='Season 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_14857583_1\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What is the original air date for \"runaway\"?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_14857583_1\" WHERE \"title\"='\\\"Runaway\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_artificial_radiation_belts\" (\n \"explosion\" text,\n \"location\" text,\n \"date\" text,\n \"yield_approximate\" text,\n \"altitude_km\" text,\n \"nation_of_origin\" text\n);\n\nQuestion: What was the altitude of the explosion Hardtack Teak?" }, { "role": "assistant", "content": "SELECT \"altitude_km\" FROM \"list_of_artificial_radiation_belts\" WHERE \"explosion\"='Hardtack Teak';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_artificial_radiation_belts\" (\n \"explosion\" text,\n \"location\" text,\n \"date\" text,\n \"yield_approximate\" text,\n \"altitude_km\" text,\n \"nation_of_origin\" text\n);\n\nQuestion: What was the altitude of the event on 1962-07-09?" }, { "role": "assistant", "content": "SELECT \"altitude_km\" FROM \"list_of_artificial_radiation_belts\" WHERE \"date\"='1962-07-09';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_artificial_radiation_belts\" (\n \"explosion\" text,\n \"location\" text,\n \"date\" text,\n \"yield_approximate\" text,\n \"altitude_km\" text,\n \"nation_of_origin\" text\n);\n\nQuestion: What was the altitude of the yield of 1.4 megatons?" }, { "role": "assistant", "content": "SELECT \"altitude_km\" FROM \"list_of_artificial_radiation_belts\" WHERE \"yield_approximate\"='1.4 megatons';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_artificial_radiation_belts\" (\n \"explosion\" text,\n \"location\" text,\n \"date\" text,\n \"yield_approximate\" text,\n \"altitude_km\" text,\n \"nation_of_origin\" text\n);\n\nQuestion: What was the yield of the K-4 explosion?" }, { "role": "assistant", "content": "SELECT \"yield_approximate\" FROM \"list_of_artificial_radiation_belts\" WHERE \"explosion\"='K-4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_artificial_radiation_belts\" (\n \"explosion\" text,\n \"location\" text,\n \"date\" text,\n \"yield_approximate\" text,\n \"altitude_km\" text,\n \"nation_of_origin\" text\n);\n\nQuestion: What explosion had an altitude of 539 km?" }, { "role": "assistant", "content": "SELECT \"explosion\" FROM \"list_of_artificial_radiation_belts\" WHERE \"altitude_km\"='539';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: List all opponents in the September 23, 1984 game?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='September 23, 1984';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What was the score in the game played on December 2, 1984?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule\" WHERE \"date\"='December 2, 1984';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: How many scores were there in week 11?" }, { "role": "assistant", "content": "SELECT COUNT(\"record\") FROM \"schedule\" WHERE \"week\"=11;" } ]