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 \"metropolitan_statistical_areas_of_the_un\" (\n \"rank\" real,\n \"metropolitan_statistical_area\" text,\n \"total_population_2010\" real,\n \"indian_american_population_2010\" real,\n \"pct_indian_american\" text,\n \"asian_american_population_2010\" real,\n \"pct_asian_american\" text,\n \"combined_statistical_area\" text\n);\n\nQuestion: Name the asian american population 2010 for kansas city-overland park-kansas city, mo-ks csa" }, { "role": "assistant", "content": "SELECT MAX(\"asian_american_population_2010\") FROM \"metropolitan_statistical_areas_of_the_un\" WHERE \"combined_statistical_area\"='Kansas City-Overland Park-Kansas City, MO-KS CSA';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"metropolitan_statistical_areas_of_the_un\" (\n \"rank\" real,\n \"metropolitan_statistical_area\" text,\n \"total_population_2010\" real,\n \"indian_american_population_2010\" real,\n \"pct_indian_american\" text,\n \"asian_american_population_2010\" real,\n \"pct_asian_american\" text,\n \"combined_statistical_area\" text\n);\n\nQuestion: Name the % indian american for asian population 126965" }, { "role": "assistant", "content": "SELECT \"pct_indian_american\" FROM \"metropolitan_statistical_areas_of_the_un\" WHERE \"asian_american_population_2010\"=126965;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"metropolitan_statistical_areas_of_the_un\" (\n \"rank\" real,\n \"metropolitan_statistical_area\" text,\n \"total_population_2010\" real,\n \"indian_american_population_2010\" real,\n \"pct_indian_american\" text,\n \"asian_american_population_2010\" real,\n \"pct_asian_american\" text,\n \"combined_statistical_area\" text\n);\n\nQuestion: Name the % asian american for 23526" }, { "role": "assistant", "content": "SELECT \"pct_asian_american\" FROM \"metropolitan_statistical_areas_of_the_un\" WHERE \"indian_american_population_2010\"=23526;" } ]
[ { "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\" text,\n \"land_area_km\" text,\n \"population_density_per_km\" text\n);\n\nQuestion: When buffalo narrows is the name how many measurements of population density per kilometer squared are there?" }, { "role": "assistant", "content": "SELECT COUNT(\"population_density_per_km\") FROM \"northern_villages\" WHERE \"name\"='Buffalo Narrows';" } ]
[ { "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\" text,\n \"land_area_km\" text,\n \"population_density_per_km\" text\n);\n\nQuestion: When 1233 is the population of 2011 what is the land area in kilometers squared?" }, { "role": "assistant", "content": "SELECT \"land_area_km\" FROM \"northern_villages\" WHERE \"population_2011\"=1233;" } ]
[ { "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\" text,\n \"land_area_km\" text,\n \"population_density_per_km\" text\n);\n\nQuestion: When 6.00 is the land area in kilometers squared what is the highest population of 2011?" }, { "role": "assistant", "content": "SELECT MAX(\"population_2011\") FROM \"northern_villages\" WHERE \"land_area_km\"='6.00';" } ]
[ { "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\" text,\n \"land_area_km\" text,\n \"population_density_per_km\" text\n);\n\nQuestion: When beauval is the name what is the lowest population of 2011?" }, { "role": "assistant", "content": "SELECT MIN(\"population_2011\") FROM \"northern_villages\" WHERE \"name\"='Beauval';" } ]
[ { "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\" text,\n \"land_area_km\" text,\n \"population_density_per_km\" text\n);\n\nQuestion: When 4.5 is the percentage of change how many population counts were made for 2011?" }, { "role": "assistant", "content": "SELECT COUNT(\"population_2011\") FROM \"northern_villages\" WHERE \"change_pct\"='4.5';" } ]
[ { "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\" text,\n \"land_area_km\" text,\n \"population_density_per_km\" text\n);\n\nQuestion: When 14.85 kilometers squared is the land area what is the name?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"northern_villages\" WHERE \"land_area_km\"='14.85';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"prevalence_by_state\" (\n \"state_and_district_of_columbia\" text,\n \"obese_adults\" text,\n \"overweight_incl_obese_adults\" text,\n \"obese_children_and_adolescents\" text,\n \"obesity_rank\" real\n);\n\nQuestion: What is every state and District of Columbia with 60.0% overweight or obese adults?" }, { "role": "assistant", "content": "SELECT \"state_and_district_of_columbia\" FROM \"prevalence_by_state\" WHERE \"overweight_incl_obese_adults\"='60.0%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"prevalence_by_state\" (\n \"state_and_district_of_columbia\" text,\n \"obese_adults\" text,\n \"overweight_incl_obese_adults\" text,\n \"obese_children_and_adolescents\" text,\n \"obesity_rank\" real\n);\n\nQuestion: What are all percentages of overweight or obese adults for obesity rank of 21?" }, { "role": "assistant", "content": "SELECT \"overweight_incl_obese_adults\" FROM \"prevalence_by_state\" WHERE \"obesity_rank\"=21;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"prevalence_by_state\" (\n \"state_and_district_of_columbia\" text,\n \"obese_adults\" text,\n \"overweight_incl_obese_adults\" text,\n \"obese_children_and_adolescents\" text,\n \"obesity_rank\" real\n);\n\nQuestion: What is the least obesity rank for the state of Utah?" }, { "role": "assistant", "content": "SELECT MIN(\"obesity_rank\") FROM \"prevalence_by_state\" WHERE \"state_and_district_of_columbia\"='Utah';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"prevalence_by_state\" (\n \"state_and_district_of_columbia\" text,\n \"obese_adults\" text,\n \"overweight_incl_obese_adults\" text,\n \"obese_children_and_adolescents\" text,\n \"obesity_rank\" real\n);\n\nQuestion: How many states or District of Columbia have 65.4% overweight or obese adults?" }, { "role": "assistant", "content": "SELECT COUNT(\"state_and_district_of_columbia\") FROM \"prevalence_by_state\" WHERE \"overweight_incl_obese_adults\"='65.4%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"prevalence_by_state\" (\n \"state_and_district_of_columbia\" text,\n \"obese_adults\" text,\n \"overweight_incl_obese_adults\" text,\n \"obese_children_and_adolescents\" text,\n \"obesity_rank\" real\n);\n\nQuestion: What is every percentage of overweight or obese adults when 12.4% of children and adolescents are obese?" }, { "role": "assistant", "content": "SELECT \"overweight_incl_obese_adults\" FROM \"prevalence_by_state\" WHERE \"obese_children_and_adolescents\"='12.4%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18994724_1\" (\n \"submitting_country\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"language_s\" text,\n \"director_s\" text,\n \"result\" text\n);\n\nQuestion: Who directed the film Gomorra?" }, { "role": "assistant", "content": "SELECT \"director_s\" FROM \"table1_18994724_1\" WHERE \"film_title_used_in_nomination\"='Gomorra';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18994724_1\" (\n \"submitting_country\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"language_s\" text,\n \"director_s\" text,\n \"result\" text\n);\n\nQuestion: What language was spoken in Everlasting Moments?" }, { "role": "assistant", "content": "SELECT \"language_s\" FROM \"table1_18994724_1\" WHERE \"film_title_used_in_nomination\"='Everlasting Moments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18994724_1\" (\n \"submitting_country\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"language_s\" text,\n \"director_s\" text,\n \"result\" text\n);\n\nQuestion: What is the original title of the film submitted by Greece?" }, { "role": "assistant", "content": "SELECT \"original_title\" FROM \"table1_18994724_1\" WHERE \"submitting_country\"='Greece';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_18994724_1\" (\n \"submitting_country\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"language_s\" text,\n \"director_s\" text,\n \"result\" text\n);\n\nQuestion: Who directed the film Nuits d'arabie?" }, { "role": "assistant", "content": "SELECT \"director_s\" FROM \"table1_18994724_1\" WHERE \"film_title_used_in_nomination\"='Nuits d''Arabie';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mother_tongue_language_2006_and_2011\" (\n \"mother_tongue\" text,\n \"population_2006\" real,\n \"percentage_2006\" text,\n \"population_2011\" real,\n \"percentage_2011\" text\n);\n\nQuestion: What is every value for population (2006) with a Romanian mother tongue?" }, { "role": "assistant", "content": "SELECT \"population_2006\" FROM \"mother_tongue_language_2006_and_2011\" WHERE \"mother_tongue\"='Romanian';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mother_tongue_language_2006_and_2011\" (\n \"mother_tongue\" text,\n \"population_2006\" real,\n \"percentage_2006\" text,\n \"population_2011\" real,\n \"percentage_2011\" text\n);\n\nQuestion: What is the lowest population(2011)?" }, { "role": "assistant", "content": "SELECT MIN(\"population_2011\") FROM \"mother_tongue_language_2006_and_2011\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mother_tongue_language_2006_and_2011\" (\n \"mother_tongue\" text,\n \"population_2006\" real,\n \"percentage_2006\" text,\n \"population_2011\" real,\n \"percentage_2011\" text\n);\n\nQuestion: What is the lowest population(2006) when there is a 1.06% in 2011?" }, { "role": "assistant", "content": "SELECT MIN(\"population_2006\") FROM \"mother_tongue_language_2006_and_2011\" WHERE \"percentage_2011\"='1.06%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mother_tongue_language_2006_and_2011\" (\n \"mother_tongue\" text,\n \"population_2006\" real,\n \"percentage_2006\" text,\n \"population_2011\" real,\n \"percentage_2011\" text\n);\n\nQuestion: How many values for population(2011) correspond to a 1.40% in 2006?" }, { "role": "assistant", "content": "SELECT COUNT(\"population_2011\") FROM \"mother_tongue_language_2006_and_2011\" WHERE \"percentage_2006\"='1.40%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mother_tongue_language_2006_and_2011\" (\n \"mother_tongue\" text,\n \"population_2006\" real,\n \"percentage_2006\" text,\n \"population_2011\" real,\n \"percentage_2011\" text\n);\n\nQuestion: What is every value for percentage(2006) with a Polish mother tongue?" }, { "role": "assistant", "content": "SELECT \"percentage_2006\" FROM \"mother_tongue_language_2006_and_2011\" WHERE \"mother_tongue\"='Polish';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"alumni\" (\n \"name\" text,\n \"nationality\" text,\n \"position\" text,\n \"year_of_birth\" real,\n \"career\" text,\n \"appearances\" real,\n \"goals\" real,\n \"club\" text\n);\n\nQuestion: Which team/s have 48 goals total?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"alumni\" WHERE \"goals\"=48;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"player\" text,\n \"original_season\" text,\n \"gender\" text,\n \"eliminated\" text,\n \"placing\" text\n);\n\nQuestion: Who was the contestant eliminated on episode 8 of RW: Key West season?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"cast\" WHERE \"original_season\"='RW: Key West' AND \"eliminated\"='Episode 8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"player\" text,\n \"original_season\" text,\n \"gender\" text,\n \"eliminated\" text,\n \"placing\" text\n);\n\nQuestion: Who was the female contestant on the Original season of Fresh Meat?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"cast\" WHERE \"original_season\"='Fresh Meat' AND \"gender\"='Female';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"player\" text,\n \"original_season\" text,\n \"gender\" text,\n \"eliminated\" text,\n \"placing\" text\n);\n\nQuestion: What was the gender of the contestant on RR: South Pacific season?" }, { "role": "assistant", "content": "SELECT \"gender\" FROM \"cast\" WHERE \"original_season\"='RR: South Pacific';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cast\" (\n \"player\" text,\n \"original_season\" text,\n \"gender\" text,\n \"eliminated\" text,\n \"placing\" text\n);\n\nQuestion: What was the season where Evelyn Smith was on?" }, { "role": "assistant", "content": "SELECT \"original_season\" FROM \"cast\" WHERE \"player\"='Evelyn Smith';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"characters_casts_and_recordings\" (\n \"character\" text,\n \"original_broadway_performer\" text,\n \"original_australian_performer\" text,\n \"original_west_end_performer\" text,\n \"2005_world_aids_day_benefit_dream_cast\" text\n);\n\nQuestion: How many original Australian performers are there when the Original West End Performer is Jordan Dunne?" }, { "role": "assistant", "content": "SELECT COUNT(\"original_australian_performer\") FROM \"characters_casts_and_recordings\" WHERE \"original_west_end_performer\"='Jordan Dunne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"characters_casts_and_recordings\" (\n \"character\" text,\n \"original_broadway_performer\" text,\n \"original_australian_performer\" text,\n \"original_west_end_performer\" text,\n \"2005_world_aids_day_benefit_dream_cast\" text\n);\n\nQuestion: Who is the Original west end performer for the character Martha?" }, { "role": "assistant", "content": "SELECT \"original_west_end_performer\" FROM \"characters_casts_and_recordings\" WHERE \"character\"='Martha';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"characters_casts_and_recordings\" (\n \"character\" text,\n \"original_broadway_performer\" text,\n \"original_australian_performer\" text,\n \"original_west_end_performer\" text,\n \"2005_world_aids_day_benefit_dream_cast\" text\n);\n\nQuestion: Who is the original broadway performer for the character Colin Craven?" }, { "role": "assistant", "content": "SELECT \"original_broadway_performer\" FROM \"characters_casts_and_recordings\" WHERE \"character\"='Colin Craven';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"characters_casts_and_recordings\" (\n \"character\" text,\n \"original_broadway_performer\" text,\n \"original_australian_performer\" text,\n \"original_west_end_performer\" text,\n \"2005_world_aids_day_benefit_dream_cast\" text\n);\n\nQuestion: Who is the original west end performer for the character Neville Craven?" }, { "role": "assistant", "content": "SELECT \"original_west_end_performer\" FROM \"characters_casts_and_recordings\" WHERE \"character\"='Neville Craven';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"characters_casts_and_recordings\" (\n \"character\" text,\n \"original_broadway_performer\" text,\n \"original_australian_performer\" text,\n \"original_west_end_performer\" text,\n \"2005_world_aids_day_benefit_dream_cast\" text\n);\n\nQuestion: Who is the 2005 World AIDS Day Benefit \"Dream\" Cast when the Original Australian performer is Susan-Ann Walker?" }, { "role": "assistant", "content": "SELECT \"2005_world_aids_day_benefit_dream_cast\" FROM \"characters_casts_and_recordings\" WHERE \"original_australian_performer\"='Susan-Ann Walker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"characters_casts_and_recordings\" (\n \"character\" text,\n \"original_broadway_performer\" text,\n \"original_australian_performer\" text,\n \"original_west_end_performer\" text,\n \"2005_world_aids_day_benefit_dream_cast\" text\n);\n\nQuestion: Who is the Original Australian performer when the Original West End Performer is Linzi Hateley?" }, { "role": "assistant", "content": "SELECT \"original_australian_performer\" FROM \"characters_casts_and_recordings\" WHERE \"original_west_end_performer\"='Linzi Hateley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_name\" (\n \"name\" text,\n \"country\" text,\n \"seasons\" text,\n \"championship_titles\" text,\n \"race_entries_starts\" text,\n \"poles\" real,\n \"wins\" real,\n \"podiums\" real,\n \"fastest_laps\" real,\n \"points\" text\n);\n\nQuestion: Name the minimum wins" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"by_name\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_name\" (\n \"name\" text,\n \"country\" text,\n \"seasons\" text,\n \"championship_titles\" text,\n \"race_entries_starts\" text,\n \"poles\" real,\n \"wins\" real,\n \"podiums\" real,\n \"fastest_laps\" real,\n \"points\" text\n);\n\nQuestion: Name the country for hideki noda category:articles with hcards" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"by_name\" WHERE \"name\"='Hideki Noda 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 \"by_name\" (\n \"name\" text,\n \"country\" text,\n \"seasons\" text,\n \"championship_titles\" text,\n \"race_entries_starts\" text,\n \"poles\" real,\n \"wins\" real,\n \"podiums\" real,\n \"fastest_laps\" real,\n \"points\" text\n);\n\nQuestion: Name the number of poles for stefano livio category:articles with hcards" }, { "role": "assistant", "content": "SELECT COUNT(\"poles\") FROM \"by_name\" WHERE \"name\"='Stefano Livio 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 \"by_name\" (\n \"name\" text,\n \"country\" text,\n \"seasons\" text,\n \"championship_titles\" text,\n \"race_entries_starts\" text,\n \"poles\" real,\n \"wins\" real,\n \"podiums\" real,\n \"fastest_laps\" real,\n \"points\" text\n);\n\nQuestion: Name the points for thierry tassin category:articles with hcards" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"by_name\" WHERE \"name\"='Thierry Tassin 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 \"by_name\" (\n \"name\" text,\n \"country\" text,\n \"seasons\" text,\n \"championship_titles\" text,\n \"race_entries_starts\" text,\n \"poles\" real,\n \"wins\" real,\n \"podiums\" real,\n \"fastest_laps\" real,\n \"points\" text\n);\n\nQuestion: Name the number of wins for michele rugolo category:articles with hcards" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"by_name\" WHERE \"name\"='Michele Rugolo 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 \"squad_stats\" (\n \"player\" text,\n \"nat\" text,\n \"pos\" text,\n \"l_apps\" real,\n \"l_g\" real,\n \"c_apps\" real,\n \"total_apps\" real,\n \"total_g\" real\n);\n\nQuestion: Name the lg for ermengol" }, { "role": "assistant", "content": "SELECT \"l_g\" FROM \"squad_stats\" WHERE \"player\"='Ermengol';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"squad_stats\" (\n \"player\" text,\n \"nat\" text,\n \"pos\" text,\n \"l_apps\" real,\n \"l_g\" real,\n \"c_apps\" real,\n \"total_apps\" real,\n \"total_g\" real\n);\n\nQuestion: Name the nat for total apps for 27" }, { "role": "assistant", "content": "SELECT \"nat\" FROM \"squad_stats\" WHERE \"total_apps\"=27;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"squad_stats\" (\n \"player\" text,\n \"nat\" text,\n \"pos\" text,\n \"l_apps\" real,\n \"l_g\" real,\n \"c_apps\" real,\n \"total_apps\" real,\n \"total_g\" real\n);\n\nQuestion: Name the number of apps for total g is 8" }, { "role": "assistant", "content": "SELECT COUNT(\"l_apps\") FROM \"squad_stats\" WHERE \"total_g\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"squad_stats\" (\n \"player\" text,\n \"nat\" text,\n \"pos\" text,\n \"l_apps\" real,\n \"l_g\" real,\n \"c_apps\" real,\n \"total_apps\" real,\n \"total_g\" real\n);\n\nQuestion: Name the player for l apps is 27" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"squad_stats\" WHERE \"l_apps\"=27;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"demand\" (\n \"entities\" text,\n \"country\" text,\n \"supply_point\" text,\n \"voltage_k_v\" real,\n \"power_mw\" real\n);\n\nQuestion: What are all the countries where the electric company Ebisa has a presence?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"demand\" WHERE \"entities\"='EBISA';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"demand\" (\n \"entities\" text,\n \"country\" text,\n \"supply_point\" text,\n \"voltage_k_v\" real,\n \"power_mw\" real\n);\n\nQuestion: In how many countries is Itaipu a supply point for electricity?" }, { "role": "assistant", "content": "SELECT COUNT(\"country\") FROM \"demand\" WHERE \"supply_point\"='Itaipu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"demand\" (\n \"entities\" text,\n \"country\" text,\n \"supply_point\" text,\n \"voltage_k_v\" real,\n \"power_mw\" real\n);\n\nQuestion: What are the electric companies drawing power from Itaipu?" }, { "role": "assistant", "content": "SELECT \"entities\" FROM \"demand\" WHERE \"supply_point\"='Itaipu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"un_2012_estimates_and_medium_variant_pro\" (\n \"year\" real,\n \"world\" real,\n \"asia\" text,\n \"africa\" text,\n \"europe\" text,\n \"latin_america_caribbean\" text,\n \"northern_america\" text,\n \"oceania\" text\n);\n\nQuestion: what will the population of Asia be when Latin America/Caribbean is 783 (7.5%)?" }, { "role": "assistant", "content": "SELECT \"asia\" FROM \"un_2012_estimates_and_medium_variant_pro\" WHERE \"latin_america_caribbean\"='783 (7.5%)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"un_2012_estimates_and_medium_variant_pro\" (\n \"year\" real,\n \"world\" real,\n \"asia\" text,\n \"africa\" text,\n \"europe\" text,\n \"latin_america_caribbean\" text,\n \"northern_america\" text,\n \"oceania\" text\n);\n\nQuestion: what will be the population of Europe when Northern America is 482 (4.7%)?" }, { "role": "assistant", "content": "SELECT \"europe\" FROM \"un_2012_estimates_and_medium_variant_pro\" WHERE \"northern_america\"='482 (4.7%)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"un_2012_estimates_and_medium_variant_pro\" (\n \"year\" real,\n \"world\" real,\n \"asia\" text,\n \"africa\" text,\n \"europe\" text,\n \"latin_america_caribbean\" text,\n \"northern_america\" text,\n \"oceania\" text\n);\n\nQuestion: what row is the population of Latin America/Caribbean when Asia is 4,894 (46.1%)?" }, { "role": "assistant", "content": "SELECT COUNT(\"latin_america_caribbean\") FROM \"un_2012_estimates_and_medium_variant_pro\" WHERE \"asia\"='4,894 (46.1%)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"un_2012_estimates_and_medium_variant_pro\" (\n \"year\" real,\n \"world\" real,\n \"asia\" text,\n \"africa\" text,\n \"europe\" text,\n \"latin_america_caribbean\" text,\n \"northern_america\" text,\n \"oceania\" text\n);\n\nQuestion: what will be the population of Africa when Oceania is 67 (0.6%)" }, { "role": "assistant", "content": "SELECT \"africa\" FROM \"un_2012_estimates_and_medium_variant_pro\" WHERE \"oceania\"='67 (0.6%)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"un_2012_estimates_and_medium_variant_pro\" (\n \"year\" real,\n \"world\" real,\n \"asia\" text,\n \"africa\" text,\n \"europe\" text,\n \"latin_america_caribbean\" text,\n \"northern_america\" text,\n \"oceania\" text\n);\n\nQuestion: What is population in the world when 788 (8.1%)?" }, { "role": "assistant", "content": "SELECT MIN(\"world\") FROM \"un_2012_estimates_and_medium_variant_pro\" WHERE \"latin_america_caribbean\"='788 (8.1%)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"un_2012_estimates_and_medium_variant_pro\" (\n \"year\" real,\n \"world\" real,\n \"asia\" text,\n \"africa\" text,\n \"europe\" text,\n \"latin_america_caribbean\" text,\n \"northern_america\" text,\n \"oceania\" text\n);\n\nQuestion: what is the worlds smallest population?" }, { "role": "assistant", "content": "SELECT MIN(\"world\") FROM \"un_2012_estimates_and_medium_variant_pro\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_singles_finals\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is the first year in the competition?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"grand_slam_singles_finals\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_singles_finals\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is the result in the final versos Jennifer Capriati?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"grand_slam_singles_finals\" WHERE \"opponent_in_the_final\"='Jennifer Capriati';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_singles_finals\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is the first year that she competed?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"grand_slam_singles_finals\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_slam_singles_finals\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What tournament did she win with a final score of 4\u20136, 7\u20135, 6\u20132?" }, { "role": "assistant", "content": "SELECT \"championship\" FROM \"grand_slam_singles_finals\" WHERE \"score_in_the_final\"='4\u20136, 7\u20135, 6\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teen_edition_housemates\" (\n \"name\" text,\n \"home_or_representative_town_or_province\" text,\n \"age\" real,\n \"edition\" text,\n \"total_days_in_pbb_house\" real,\n \"duration\" text,\n \"status\" text\n);\n\nQuestion: When joj agpangan* is the name how many duration's are there?" }, { "role": "assistant", "content": "SELECT COUNT(\"duration\") FROM \"teen_edition_housemates\" WHERE \"name\"='Joj Agpangan*';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teen_edition_housemates\" (\n \"name\" text,\n \"home_or_representative_town_or_province\" text,\n \"age\" real,\n \"edition\" text,\n \"total_days_in_pbb_house\" real,\n \"duration\" text,\n \"status\" text\n);\n\nQuestion: When davao city is the home or representative town or province and clash 2010 is the edition how many ages are there?" }, { "role": "assistant", "content": "SELECT COUNT(\"age\") FROM \"teen_edition_housemates\" WHERE \"edition\"='Clash 2010' AND \"home_or_representative_town_or_province\"='Davao City';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teen_edition_housemates\" (\n \"name\" text,\n \"home_or_representative_town_or_province\" text,\n \"age\" real,\n \"edition\" text,\n \"total_days_in_pbb_house\" real,\n \"duration\" text,\n \"status\" text\n);\n\nQuestion: When winner is the status and 77 is the total days in pbb house what is the edition?" }, { "role": "assistant", "content": "SELECT \"edition\" FROM \"teen_edition_housemates\" WHERE \"total_days_in_pbb_house\"=77 AND \"status\"='Winner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teen_edition_housemates\" (\n \"name\" text,\n \"home_or_representative_town_or_province\" text,\n \"age\" real,\n \"edition\" text,\n \"total_days_in_pbb_house\" real,\n \"duration\" text,\n \"status\" text\n);\n\nQuestion: When days 1-86 is the duration how many names are there?" }, { "role": "assistant", "content": "SELECT COUNT(\"name\") FROM \"teen_edition_housemates\" WHERE \"duration\"='Days 1-86';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teen_edition_housemates\" (\n \"name\" text,\n \"home_or_representative_town_or_province\" text,\n \"age\" real,\n \"edition\" text,\n \"total_days_in_pbb_house\" real,\n \"duration\" text,\n \"status\" text\n);\n\nQuestion: WHen joaqui mendoza is the name how long is the duration?" }, { "role": "assistant", "content": "SELECT \"duration\" FROM \"teen_edition_housemates\" WHERE \"name\"='Joaqui Mendoza';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teen_edition_housemates\" (\n \"name\" text,\n \"home_or_representative_town_or_province\" text,\n \"age\" real,\n \"edition\" text,\n \"total_days_in_pbb_house\" real,\n \"duration\" text,\n \"status\" text\n);\n\nQuestion: When guiguinto, bulacan is the home or representative town or province how many names are there?" }, { "role": "assistant", "content": "SELECT COUNT(\"name\") FROM \"teen_edition_housemates\" WHERE \"home_or_representative_town_or_province\"='Guiguinto, Bulacan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19068566_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: When 3t7458 is the production code who are the writers?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_19068566_1\" WHERE \"production_code\"='3T7458';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19068566_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: When there are 3.39 million u.s viewers what is the production code?" }, { "role": "assistant", "content": "SELECT \"production_code\" FROM \"table1_19068566_1\" WHERE \"u_s_viewers_million\"='3.39';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_19068566_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: When 3t7461 is the production code who is the director?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_19068566_1\" WHERE \"production_code\"='3T7461';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"day_1_evening_session\" (\n \"match_no\" real,\n \"match_type\" text,\n \"team_europe\" text,\n \"score\" text,\n \"team_usa\" text,\n \"progressive_total\" text\n);\n\nQuestion: What was the score at the end of the match number 4?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"day_1_evening_session\" WHERE \"match_no\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"day_1_evening_session\" (\n \"match_no\" real,\n \"match_type\" text,\n \"team_europe\" text,\n \"score\" text,\n \"team_usa\" text,\n \"progressive_total\" text\n);\n\nQuestion: What's the match number where Bill Hoffman plays for Team USA?" }, { "role": "assistant", "content": "SELECT MIN(\"match_no\") FROM \"day_1_evening_session\" WHERE \"team_usa\"='Bill Hoffman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"day_1_evening_session\" (\n \"match_no\" real,\n \"match_type\" text,\n \"team_europe\" text,\n \"score\" text,\n \"team_usa\" text,\n \"progressive_total\" text\n);\n\nQuestion: How many different scores did Team Europe get when Mika Koivuniemi played for them?" }, { "role": "assistant", "content": "SELECT COUNT(\"score\") FROM \"day_1_evening_session\" WHERE \"team_europe\"='Mika Koivuniemi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"day_1_evening_session\" (\n \"match_no\" real,\n \"match_type\" text,\n \"team_europe\" text,\n \"score\" text,\n \"team_usa\" text,\n \"progressive_total\" text\n);\n\nQuestion: What was the score when Tore Torgersen played for Team Europe?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"day_1_evening_session\" WHERE \"team_europe\"='Tore Torgersen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"expedition\" text,\n \"crew\" text,\n \"launch_date\" text,\n \"flight_up\" text,\n \"landing_date\" text,\n \"flight_down\" text,\n \"duration_days\" text\n);\n\nQuestion: Name the launch date for duration days 174.14" }, { "role": "assistant", "content": "SELECT \"launch_date\" FROM \"see_also\" WHERE \"duration_days\"='174.14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"host\" text,\n \"1st_place\" text,\n \"2nd_place\" text,\n \"3rd_place\" text,\n \"4th_place\" text,\n \"5th_place\" text\n);\n\nQuestion: What is the 1st place when Pennsylvania finished 2nd place?" }, { "role": "assistant", "content": "SELECT \"1st_place\" FROM \"results\" WHERE \"2nd_place\"='Pennsylvania';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"host\" text,\n \"1st_place\" text,\n \"2nd_place\" text,\n \"3rd_place\" text,\n \"4th_place\" text,\n \"5th_place\" text\n);\n\nQuestion: What is the 2nd place when Virginia finished in 1st place?" }, { "role": "assistant", "content": "SELECT \"2nd_place\" FROM \"results\" WHERE \"1st_place\"='Virginia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"host\" text,\n \"1st_place\" text,\n \"2nd_place\" text,\n \"3rd_place\" text,\n \"4th_place\" text,\n \"5th_place\" text\n);\n\nQuestion: How many years did Florida finish in 4th place?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"results\" WHERE \"4th_place\"='Florida';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"host\" text,\n \"1st_place\" text,\n \"2nd_place\" text,\n \"3rd_place\" text,\n \"4th_place\" text,\n \"5th_place\" text\n);\n\nQuestion: What is the total number of 3rd placed teams when the host is University of Manitoba, Winnipeg, Manitoba?" }, { "role": "assistant", "content": "SELECT COUNT(\"3rd_place\") FROM \"results\" WHERE \"host\"='University of Manitoba, Winnipeg, Manitoba';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"year\" real,\n \"host\" text,\n \"1st_place\" text,\n \"2nd_place\" text,\n \"3rd_place\" text,\n \"4th_place\" text,\n \"5th_place\" text\n);\n\nQuestion: Who was in 4th place when Missouri finished in 3rd place?" }, { "role": "assistant", "content": "SELECT \"4th_place\" FROM \"results\" WHERE \"3rd_place\"='Missouri';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"day_2_evening_session\" (\n \"match_no\" real,\n \"match_type\" text,\n \"team_europe\" text,\n \"score\" text,\n \"team_usa\" text,\n \"progressive_total\" text\n);\n\nQuestion: When tim mack is on team usa what is the progressive total?" }, { "role": "assistant", "content": "SELECT \"progressive_total\" FROM \"day_2_evening_session\" WHERE \"team_usa\"='Tim Mack';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"day_2_evening_session\" (\n \"match_no\" real,\n \"match_type\" text,\n \"team_europe\" text,\n \"score\" text,\n \"team_usa\" text,\n \"progressive_total\" text\n);\n\nQuestion: When 14 is the match number how many usa teams are there?" }, { "role": "assistant", "content": "SELECT COUNT(\"team_usa\") FROM \"day_2_evening_session\" WHERE \"match_no\"=14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"day_2_evening_session\" (\n \"match_no\" real,\n \"match_type\" text,\n \"team_europe\" text,\n \"score\" text,\n \"team_usa\" text,\n \"progressive_total\" text\n);\n\nQuestion: When chris barnes is on team usa how many europe teams are there?" }, { "role": "assistant", "content": "SELECT COUNT(\"team_europe\") FROM \"day_2_evening_session\" WHERE \"team_usa\"='Chris Barnes';" } ]
[ { "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\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"owner_s\" text,\n \"avg_attendance\" real\n);\n\nQuestion: in the year 1998/99 what was the league" }, { "role": "assistant", "content": "SELECT \"league\" FROM \"year_by_year\" WHERE \"year\"='1998/99';" } ]
[ { "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\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"owner_s\" text,\n \"avg_attendance\" real\n);\n\nQuestion: in the year 1995/96 what was the reg. season" }, { "role": "assistant", "content": "SELECT \"reg_season\" FROM \"year_by_year\" WHERE \"year\"='1995/96';" } ]
[ { "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\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"owner_s\" text,\n \"avg_attendance\" real\n);\n\nQuestion: in what playoffs the league was in the semifinals" }, { "role": "assistant", "content": "SELECT \"league\" FROM \"year_by_year\" WHERE \"playoffs\"='Semifinals';" } ]
[ { "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\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"owner_s\" text,\n \"avg_attendance\" real\n);\n\nQuestion: what was the year where in the playoffs was champions" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"year_by_year\" WHERE \"playoffs\"='Champions';" } ]
[ { "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\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"owner_s\" text,\n \"avg_attendance\" real\n);\n\nQuestion: what where the playoffs where the avg attendance of the team was 3416" }, { "role": "assistant", "content": "SELECT \"playoffs\" FROM \"year_by_year\" WHERE \"avg_attendance\"=3416;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2013_14_season\" (\n \"club\" text,\n \"position_in_2012_13\" text,\n \"first_season_in_top_division\" text,\n \"number_of_seasons_in_top_division\" real,\n \"first_season_of_current_spell_in_top_division\" text,\n \"top_division_titles\" real,\n \"last_top_division_title\" text\n);\n\nQuestion: when did the club Citizen achieve its last top division title?" }, { "role": "assistant", "content": "SELECT \"last_top_division_title\" FROM \"2013_14_season\" WHERE \"club\"='Citizen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2013_14_season\" (\n \"club\" text,\n \"position_in_2012_13\" text,\n \"first_season_in_top_division\" text,\n \"number_of_seasons_in_top_division\" real,\n \"first_season_of_current_spell_in_top_division\" text,\n \"top_division_titles\" real,\n \"last_top_division_title\" text\n);\n\nQuestion: How many clubs achieved the 5th position in 2012-13?" }, { "role": "assistant", "content": "SELECT COUNT(\"top_division_titles\") FROM \"2013_14_season\" WHERE \"position_in_2012_13\"='5th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_191105_3\" (\n \"episode_title\" text,\n \"subject\" text,\n \"music_by\" text,\n \"performed_by\" text,\n \"first_aired\" real\n);\n\nQuestion: When interplanet janet is the episode title who is the music by?" }, { "role": "assistant", "content": "SELECT \"music_by\" FROM \"table1_191105_3\" WHERE \"episode_title\"='Interplanet Janet';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_191105_3\" (\n \"episode_title\" text,\n \"subject\" text,\n \"music_by\" text,\n \"performed_by\" text,\n \"first_aired\" real\n);\n\nQuestion: WHen jaime aff and christine langner are the performers what is the subject?" }, { "role": "assistant", "content": "SELECT \"subject\" FROM \"table1_191105_3\" WHERE \"performed_by\"='Jaime Aff and Christine Langner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_191105_3\" (\n \"episode_title\" text,\n \"subject\" text,\n \"music_by\" text,\n \"performed_by\" text,\n \"first_aired\" real\n);\n\nQuestion: If skeletal system is the subject when was it first aired?" }, { "role": "assistant", "content": "SELECT \"first_aired\" FROM \"table1_191105_3\" WHERE \"subject\"='Skeletal system';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_191105_3\" (\n \"episode_title\" text,\n \"subject\" text,\n \"music_by\" text,\n \"performed_by\" text,\n \"first_aired\" real\n);\n\nQuestion: When zachary sanders is the performer what is the lowerst first aired?" }, { "role": "assistant", "content": "SELECT MIN(\"first_aired\") FROM \"table1_191105_3\" WHERE \"performed_by\"='Zachary Sanders';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: What's the amount of winnings (in $) in the year with 2 wins?" }, { "role": "assistant", "content": "SELECT \"winnings\" FROM \"nascar_nationwide_series\" WHERE \"wins\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: What's the number of starts in the year with 19.3 average finish?" }, { "role": "assistant", "content": "SELECT MIN(\"starts\") FROM \"nascar_nationwide_series\" WHERE \"avg_finish\"='19.3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: In what year did the #14 FitzBradshaw Racing compete?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"nascar_nationwide_series\" WHERE \"team_s\"='#14 FitzBradshaw Racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: What's the average finish in 2008?" }, { "role": "assistant", "content": "SELECT \"avg_finish\" FROM \"nascar_nationwide_series\" WHERE \"year\"=2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" text,\n \"avg_finish\" text,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: What's #14 FitzBradshaw Racing's top 5 result?" }, { "role": "assistant", "content": "SELECT MAX(\"top_5\") FROM \"nascar_nationwide_series\" WHERE \"team_s\"='#14 FitzBradshaw Racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"america_rock\" (\n \"episode_title\" text,\n \"subject\" text,\n \"music_by\" text,\n \"lyrics_by\" text,\n \"performed_by\" text,\n \"first_aired\" text\n);\n\nQuestion: What is the date for the episode performed by Sue Manchester?" }, { "role": "assistant", "content": "SELECT \"first_aired\" FROM \"america_rock\" WHERE \"performed_by\"='Sue Manchester';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"america_rock\" (\n \"episode_title\" text,\n \"subject\" text,\n \"music_by\" text,\n \"lyrics_by\" text,\n \"performed_by\" text,\n \"first_aired\" text\n);\n\nQuestion: Who is the music by for episode the Elbow Room?" }, { "role": "assistant", "content": "SELECT \"music_by\" FROM \"america_rock\" WHERE \"episode_title\"='Elbow Room';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"america_rock\" (\n \"episode_title\" text,\n \"subject\" text,\n \"music_by\" text,\n \"lyrics_by\" text,\n \"performed_by\" text,\n \"first_aired\" text\n);\n\nQuestion: What is the name of the episode performed by Essra Mohawk" }, { "role": "assistant", "content": "SELECT \"episode_title\" FROM \"america_rock\" WHERE \"performed_by\"='Essra Mohawk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"returning_this_year_after_a_break_of_one\" (\n \"programme\" text,\n \"date_s_of_original_removal\" text,\n \"original_channel\" text,\n \"date_of_return\" text,\n \"new_channel_s\" text\n);\n\nQuestion: When five is the new channel what is the date of original removal?" }, { "role": "assistant", "content": "SELECT \"date_s_of_original_removal\" FROM \"returning_this_year_after_a_break_of_one\" WHERE \"new_channel_s\"='Five';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"returning_this_year_after_a_break_of_one\" (\n \"programme\" text,\n \"date_s_of_original_removal\" text,\n \"original_channel\" text,\n \"date_of_return\" text,\n \"new_channel_s\" text\n);\n\nQuestion: When bbc two is the original channel what is the date of original removal?" }, { "role": "assistant", "content": "SELECT \"date_s_of_original_removal\" FROM \"returning_this_year_after_a_break_of_one\" WHERE \"original_channel\"='BBC Two';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"returning_this_year_after_a_break_of_one\" (\n \"programme\" text,\n \"date_s_of_original_removal\" text,\n \"original_channel\" text,\n \"date_of_return\" text,\n \"new_channel_s\" text\n);\n\nQuestion: When bbc two is the new channel what is the date of return?" }, { "role": "assistant", "content": "SELECT \"date_of_return\" FROM \"returning_this_year_after_a_break_of_one\" WHERE \"new_channel_s\"='BBC Two';" } ]