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 \"girls\" (\n \"season\" text,\n \"sport\" text,\n \"tournament_structure\" text,\n \"num_of_divisions\" real,\n \"1st_tournament\" real,\n \"2011_2012_state_tournament_location\" text\n);\n\nQuestion: Where was the 2011-2012 soccer state tournament held?" }, { "role": "assistant", "content": "SELECT \"2011_2012_state_tournament_location\" FROM \"girls\" WHERE \"sport\"='Soccer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"girls\" (\n \"season\" text,\n \"sport\" text,\n \"tournament_structure\" text,\n \"num_of_divisions\" real,\n \"1st_tournament\" real,\n \"2011_2012_state_tournament_location\" text\n);\n\nQuestion: How many first tournaments are associated with bowling?" }, { "role": "assistant", "content": "SELECT COUNT(\"1st_tournament\") FROM \"girls\" WHERE \"sport\"='Bowling';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28498999_3\" (\n \"num\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"winnings\" real,\n \"after\" real,\n \"before\" real\n);\n\nQuestion: How many times is the player vaughn taylor listed?" }, { "role": "assistant", "content": "SELECT COUNT(\"before\") FROM \"table1_28498999_3\" WHERE \"player\"='Vaughn Taylor';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28498999_3\" (\n \"num\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"winnings\" real,\n \"after\" real,\n \"before\" real\n);\n\nQuestion: What is the lowest after when the player is adam scott?" }, { "role": "assistant", "content": "SELECT MIN(\"after\") FROM \"table1_28498999_3\" WHERE \"player\"='Adam Scott';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28498999_3\" (\n \"num\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"winnings\" real,\n \"after\" real,\n \"before\" real\n);\n\nQuestion: What is the country for the score 72-63-71-68=274?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"table1_28498999_3\" WHERE \"score\"='72-63-71-68=274';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28498999_3\" (\n \"num\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"winnings\" real,\n \"after\" real,\n \"before\" real\n);\n\nQuestion: What is the after for the player kevin streelman?" }, { "role": "assistant", "content": "SELECT \"after\" FROM \"table1_28498999_3\" WHERE \"player\"='Kevin Streelman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28498999_3\" (\n \"num\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"winnings\" real,\n \"after\" real,\n \"before\" real\n);\n\nQuestion: What is the to par when the after is 33?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"table1_28498999_3\" WHERE \"after\"=33;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28498999_4\" (\n \"num\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"winnings\" real,\n \"after\" real,\n \"before\" real\n);\n\nQuestion: What country is charley hoffman from?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"table1_28498999_4\" WHERE \"player\"='Charley Hoffman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28498999_4\" (\n \"num\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"winnings\" real,\n \"after\" real,\n \"before\" real\n);\n\nQuestion: What is the before for the score of 63-67-66-71=267?" }, { "role": "assistant", "content": "SELECT MIN(\"before\") FROM \"table1_28498999_4\" WHERE \"score\"='63-67-66-71=267';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28498999_4\" (\n \"num\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"winnings\" real,\n \"after\" real,\n \"before\" real\n);\n\nQuestion: What is the to par for the winnings of 232500?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"table1_28498999_4\" WHERE \"winnings\"=232500;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28498999_4\" (\n \"num\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"winnings\" real,\n \"after\" real,\n \"before\" real\n);\n\nQuestion: What were the winnings for the score of 66-64-67-71=268?" }, { "role": "assistant", "content": "SELECT \"winnings\" FROM \"table1_28498999_4\" WHERE \"score\"='66-64-67-71=268';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28498999_4\" (\n \"num\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"winnings\" real,\n \"after\" real,\n \"before\" real\n);\n\nQuestion: What is the after for geoff ogilvy?" }, { "role": "assistant", "content": "SELECT MAX(\"after\") FROM \"table1_28498999_4\" WHERE \"player\"='Geoff Ogilvy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"reset_points\" (\n \"num\" real,\n \"player\" text,\n \"country\" text,\n \"points\" real,\n \"reset_points\" real,\n \"events\" real\n);\n\nQuestion: what is the most number where the person is luke donald" }, { "role": "assistant", "content": "SELECT MAX(\"reset_points\") FROM \"reset_points\" WHERE \"player\"='Luke Donald';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"reset_points\" (\n \"num\" real,\n \"player\" text,\n \"country\" text,\n \"points\" real,\n \"reset_points\" real,\n \"events\" real\n);\n\nQuestion: what is the place where the person is luke donald" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"reset_points\" WHERE \"player\"='Luke Donald';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"reset_points\" (\n \"num\" real,\n \"player\" text,\n \"country\" text,\n \"points\" real,\n \"reset_points\" real,\n \"events\" real\n);\n\nQuestion: what is the person there the numbers is 2343" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"reset_points\" WHERE \"points\"=2343;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"reset_points\" (\n \"num\" real,\n \"player\" text,\n \"country\" text,\n \"points\" real,\n \"reset_points\" real,\n \"events\" real\n);\n\nQuestion: what is the number of pieces where the person is charley hoffman" }, { "role": "assistant", "content": "SELECT COUNT(\"reset_points\") FROM \"reset_points\" WHERE \"player\"='Charley Hoffman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"reset_points\" (\n \"num\" real,\n \"player\" text,\n \"country\" text,\n \"points\" real,\n \"reset_points\" real,\n \"events\" real\n);\n\nQuestion: what is the number of people where the pieces is 3015" }, { "role": "assistant", "content": "SELECT COUNT(\"player\") FROM \"reset_points\" WHERE \"points\"=3015;" } ]
[ { "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: Which team drafted Ron Annear? " }, { "role": "assistant", "content": "SELECT \"nhl_team\" FROM \"round_ten\" WHERE \"player\"='Ron Annear';" } ]
[ { "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: Which team drafted Joakim Persson?" }, { "role": "assistant", "content": "SELECT \"nhl_team\" FROM \"round_ten\" WHERE \"player\"='Joakim Persson';" } ]
[ { "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: Which team drafted a player from HC Slavia Praha (Czechoslovakia)? " }, { "role": "assistant", "content": "SELECT \"nhl_team\" FROM \"round_ten\" WHERE \"college_junior_club_team\"='HC Slavia Praha (Czechoslovakia)';" } ]
[ { "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: Which player was drafted by the New York Rangers? " }, { "role": "assistant", "content": "SELECT \"player\" FROM \"round_ten\" WHERE \"nhl_team\"='New York Rangers';" } ]
[ { "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: Which team drafted Michael Orn?" }, { "role": "assistant", "content": "SELECT \"nhl_team\" FROM \"round_ten\" WHERE \"player\"='Michael Orn';" } ]
[ { "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: What position was the player who was drafted by the Washington Capitals? " }, { "role": "assistant", "content": "SELECT \"position\" FROM \"round_ten\" WHERE \"nhl_team\"='Washington Capitals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_five\" (\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 Timo Lehkonen's highest pick number?" }, { "role": "assistant", "content": "SELECT MAX(\"pick_num\") FROM \"round_five\" WHERE \"player\"='Timo Lehkonen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_five\" (\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 college/junior/club team played right wing position with NHL team Chicago Black Hawks?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team\" FROM \"round_five\" WHERE \"position\"='Right Wing' AND \"nhl_team\"='Chicago Black Hawks';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_five\" (\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 college/junior/club teams are from Sweden?" }, { "role": "assistant", "content": "SELECT COUNT(\"college_junior_club_team\") FROM \"round_five\" WHERE \"nationality\"='Sweden';" } ]
[ { "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: What is Robert Dirk's nationality?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"round_three\" WHERE \"player\"='Robert Dirk';" } ]
[ { "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: What country is Trent Yawney from?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"round_three\" WHERE \"player\"='Trent Yawney';" } ]
[ { "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: What is Michal Pivonka's pick number?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick_num\") FROM \"round_three\" WHERE \"player\"='Michal Pivonka';" } ]
[ { "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 team did David McLay play for?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team\" FROM \"round_three\" WHERE \"player\"='David McLay';" } ]
[ { "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: What is Robert Dirk's team?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team\" FROM \"round_three\" WHERE \"player\"='Robert Dirk';" } ]
[ { "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: What is Graeme Bonar's lowest pick number?" }, { "role": "assistant", "content": "SELECT MIN(\"pick_num\") FROM \"round_three\" WHERE \"player\"='Graeme Bonar';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_eight\" (\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: where did glenn greenough come from" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team\" FROM \"round_eight\" WHERE \"player\"='Glenn Greenough';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_eight\" (\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 parts does detroit red wings person urban nordin play" }, { "role": "assistant", "content": "SELECT COUNT(\"position\") FROM \"round_eight\" WHERE \"nhl_team\"='Detroit Red Wings' AND \"player\"='Urban Nordin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"state_schools\" (\n \"school\" text,\n \"gender\" text,\n \"age_range\" text,\n \"religious_affiliation\" text,\n \"location\" text,\n \"school_website\" text\n);\n\nQuestion: What is the affiliation of the school with the website http://www.nicholasbreakspearschool.co.uk/?" }, { "role": "assistant", "content": "SELECT \"religious_affiliation\" FROM \"state_schools\" WHERE \"school_website\"='http://www.nicholasbreakspearschool.co.uk/';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"state_schools\" (\n \"school\" text,\n \"gender\" text,\n \"age_range\" text,\n \"religious_affiliation\" text,\n \"location\" text,\n \"school_website\" text\n);\n\nQuestion: What is the gender of the Roman Catholic school is AL4?" }, { "role": "assistant", "content": "SELECT \"gender\" FROM \"state_schools\" WHERE \"religious_affiliation\"='Roman Catholic' AND \"location\"='AL4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"state_schools\" (\n \"school\" text,\n \"gender\" text,\n \"age_range\" text,\n \"religious_affiliation\" text,\n \"location\" text,\n \"school_website\" text\n);\n\nQuestion: What is the gender of the school which has the website http://www.nicholasbreakspearschool.co.uk/?" }, { "role": "assistant", "content": "SELECT \"gender\" FROM \"state_schools\" WHERE \"school_website\"='http://www.nicholasbreakspearschool.co.uk/';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"state_schools\" (\n \"school\" text,\n \"gender\" text,\n \"age_range\" text,\n \"religious_affiliation\" text,\n \"location\" text,\n \"school_website\" text\n);\n\nQuestion: What is the affiliation of the school with website http://www.townsend.herts.sch.uk/?" }, { "role": "assistant", "content": "SELECT \"religious_affiliation\" FROM \"state_schools\" WHERE \"school_website\"='http://www.townsend.herts.sch.uk/';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"state_schools\" (\n \"school\" text,\n \"gender\" text,\n \"age_range\" text,\n \"religious_affiliation\" text,\n \"location\" text,\n \"school_website\" text\n);\n\nQuestion: What is the affiliation of the school whose website is http://www.samuelryderacademy.co.uk/?" }, { "role": "assistant", "content": "SELECT \"religious_affiliation\" FROM \"state_schools\" WHERE \"school_website\"='http://www.samuelryderacademy.co.uk/';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"state_schools\" (\n \"school\" text,\n \"gender\" text,\n \"age_range\" text,\n \"religious_affiliation\" text,\n \"location\" text,\n \"school_website\" text\n);\n\nQuestion: What is the website of the school affiliated with the Church of England?" }, { "role": "assistant", "content": "SELECT \"school_website\" FROM \"state_schools\" WHERE \"religious_affiliation\"='Church of England';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_seven\" (\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 nationality is listed when the college/junior/club team is oshawa generals (ohl)?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"round_seven\" WHERE \"college_junior_club_team\"='Oshawa Generals (OHL)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_seven\" (\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 name of the player when the college/junior/club team is new westminster bruins (whl)?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"round_seven\" WHERE \"college_junior_club_team\"='New Westminster Bruins (WHL)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_seven\" (\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 college/junior/club teams are ther when nhl team is edmonton oilers?" }, { "role": "assistant", "content": "SELECT COUNT(\"college_junior_club_team\") FROM \"round_seven\" WHERE \"nhl_team\"='Edmonton Oilers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_seven\" (\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 postion when the nhl team is los angeles kings?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"round_seven\" WHERE \"nhl_team\"='Los Angeles Kings';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_seven\" (\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 nhl teams are listed when college/junior/club team is listed as newton north high school (ushs-ma)?" }, { "role": "assistant", "content": "SELECT COUNT(\"nhl_team\") FROM \"round_seven\" WHERE \"college_junior_club_team\"='Newton North High School (USHS-MA)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28511558_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date_u_s\" text,\n \"original_air_date_international\" text\n);\n\nQuestion: What date did the episode directed by Victor Cook and Written by Brat Jennett air in the U.S.?" }, { "role": "assistant", "content": "SELECT \"original_air_date_u_s\" FROM \"table1_28511558_2\" WHERE \"directed_by\"='Victor Cook' AND \"written_by\"='Brat Jennett';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28511558_2\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date_u_s\" text,\n \"original_air_date_international\" text\n);\n\nQuestion: What date did the episode written by Mitch Watson and directed by Curt Geda originally air in the U.S.?" }, { "role": "assistant", "content": "SELECT \"original_air_date_u_s\" FROM \"table1_28511558_2\" WHERE \"directed_by\"='Curt Geda' AND \"written_by\"='Mitch Watson';" } ]
[ { "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\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text\n);\n\nQuestion: When Alberto Contador Kanstantsin Sivtsov was the general classification and Alessandro Petacchi was the points classification at the same time while Mark Cavendish is the winner, who was the mountain classification?" }, { "role": "assistant", "content": "SELECT \"mountains_classification\" FROM \"classification_leadership\" WHERE \"general_classification\"='Alberto Contador Kanstantsin Sivtsov' AND \"points_classification\"='Alessandro Petacchi' AND \"winner\"='Mark Cavendish';" } ]
[ { "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\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text\n);\n\nQuestion: Who was the young rider classification when Alessandro Petacchi won?" }, { "role": "assistant", "content": "SELECT \"young_rider_classification\" FROM \"classification_leadership\" WHERE \"winner\"='Alessandro Petacchi';" } ]
[ { "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\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text\n);\n\nQuestion: Who was the young rider classification when Diego Ulissi won? " }, { "role": "assistant", "content": "SELECT COUNT(\"young_rider_classification\") FROM \"classification_leadership\" WHERE \"winner\"='Diego Ulissi';" } ]
[ { "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\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"young_rider_classification\" text\n);\n\nQuestion: What is the name of the young rider classification when Paolo Tiralongo won?" }, { "role": "assistant", "content": "SELECT \"young_rider_classification\" FROM \"classification_leadership\" WHERE \"winner\"='Paolo Tiralongo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"version_history\" (\n \"version\" text,\n \"release\" text,\n \"release_date\" text,\n \"end_of_maintenance\" text,\n \"requirement\" text\n);\n\nQuestion: What's the version in the 1.0.4 release?" }, { "role": "assistant", "content": "SELECT \"version\" FROM \"version_history\" WHERE \"release\"='1.0.4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"version_history\" (\n \"version\" text,\n \"release\" text,\n \"release_date\" text,\n \"end_of_maintenance\" text,\n \"requirement\" text\n);\n\nQuestion: What's the release date in the 1.1.10 release?" }, { "role": "assistant", "content": "SELECT \"release_date\" FROM \"version_history\" WHERE \"release\"='1.1.10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"version_history\" (\n \"version\" text,\n \"release\" text,\n \"release_date\" text,\n \"end_of_maintenance\" text,\n \"requirement\" text\n);\n\nQuestion: When's the end of maintenance in the august 11, 2013 release date?" }, { "role": "assistant", "content": "SELECT \"end_of_maintenance\" FROM \"version_history\" WHERE \"release_date\"='August 11, 2013';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"version_history\" (\n \"version\" text,\n \"release\" text,\n \"release_date\" text,\n \"end_of_maintenance\" text,\n \"requirement\" text\n);\n\nQuestion: What's the version of the 1.0.12 release?" }, { "role": "assistant", "content": "SELECT \"version\" FROM \"version_history\" WHERE \"release\"='1.0.12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"version_history\" (\n \"version\" text,\n \"release\" text,\n \"release_date\" text,\n \"end_of_maintenance\" text,\n \"requirement\" text\n);\n\nQuestion: What's the number of the 1.0.9 release version?" }, { "role": "assistant", "content": "SELECT COUNT(\"version\") FROM \"version_history\" WHERE \"release\"='1.0.9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"version_history\" (\n \"version\" text,\n \"release\" text,\n \"release_date\" text,\n \"end_of_maintenance\" text,\n \"requirement\" text\n);\n\nQuestion: What's the number of the 1.0.12 release version?" }, { "role": "assistant", "content": "SELECT COUNT(\"version\") FROM \"version_history\" WHERE \"release\"='1.0.12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_4\" (\n \"position\" text,\n \"name\" text,\n \"nationality\" text,\n \"event_1_giant_farmers_walk\" text,\n \"event_2_squat_lift\" text,\n \"event_3_africa_stone\" text,\n \"event_4_overhead_lift\" text,\n \"event_5_deadlift_hold\" text,\n \"event_6_loading_race\" text\n);\n\nQuestion: What is the event 3 africa stone result for the man with an 1= (11 reps) event 2 squat lift result and a 3= (5 reps) event 4 overhead lift i result?" }, { "role": "assistant", "content": "SELECT \"event_3_africa_stone\" FROM \"heat_4\" WHERE \"event_2_squat_lift\"='1= (11 reps)' AND \"event_4_overhead_lift\"='3= (5 reps)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28561455_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 \"u_s_viewers_million\" text\n);\n\nQuestion: For how many series were there 11.84 million watchers?" }, { "role": "assistant", "content": "SELECT \"no_in_series\" FROM \"table1_28561455_1\" WHERE \"u_s_viewers_million\"='11.84';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28561455_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 \"u_s_viewers_million\" text\n);\n\nQuestion: What's the smallest season number?" }, { "role": "assistant", "content": "SELECT MIN(\"no_in_season\") FROM \"table1_28561455_1\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28561455_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 \"u_s_viewers_million\" text\n);\n\nQuestion: How many people watched the episode \"bad girls\"?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_million\" FROM \"table1_28561455_1\" WHERE \"title\"='\\\"Bad Girls\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28561455_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 \"u_s_viewers_million\" text\n);\n\nQuestion: Who wrote the episodes that were directed by Peter O'Fallon?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_28561455_1\" WHERE \"directed_by\"='Peter O''Fallon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28561455_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 \"u_s_viewers_million\" text\n);\n\nQuestion: What was the latest episode number that Meredith Averill wrote?" }, { "role": "assistant", "content": "SELECT MAX(\"no_in_series\") FROM \"table1_28561455_1\" WHERE \"written_by\"='Meredith Averill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28561455_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 \"u_s_viewers_million\" text\n);\n\nQuestion: What is the latest episode number that was directed by Tom Dicillo?" }, { "role": "assistant", "content": "SELECT MAX(\"no_in_series\") FROM \"table1_28561455_1\" WHERE \"directed_by\"='Tom DiCillo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regional_championship\" (\n \"year\" real,\n \"austria\" text,\n \"belgium\" text,\n \"england\" text,\n \"germany\" text,\n \"italy\" text,\n \"netherlands\" text,\n \"saudi_arabia\" text,\n \"spain\" text,\n \"united_arab_emirates\" text\n);\n\nQuestion: How many years did Germany participate, when the team from Italy was Naples LL Naples and the team from England was London Area Youth London?" }, { "role": "assistant", "content": "SELECT COUNT(\"germany\") FROM \"regional_championship\" WHERE \"italy\"='Naples LL Naples' AND \"england\"='London Area Youth London';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regional_championship\" (\n \"year\" real,\n \"austria\" text,\n \"belgium\" text,\n \"england\" text,\n \"germany\" text,\n \"italy\" text,\n \"netherlands\" text,\n \"saudi_arabia\" text,\n \"spain\" text,\n \"united_arab_emirates\" text\n);\n\nQuestion: What was the team from Austria when the Netherlands sent Brunssum/Schinnen LL Brunssum and Belgium sent Shape and Waterloo LL Brussels?" }, { "role": "assistant", "content": "SELECT \"austria\" FROM \"regional_championship\" WHERE \"netherlands\"='Brunssum/Schinnen LL Brunssum' AND \"belgium\"='SHAPE and Waterloo LL Brussels';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"batting_averages\" (\n \"player\" text,\n \"matches\" real,\n \"innings\" real,\n \"runs\" real,\n \"average\" text,\n \"highest_score\" real,\n \"100s\" real,\n \"50s\" real\n);\n\nQuestion: How many times has the 100s record been 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"highest_score\") FROM \"batting_averages\" WHERE \"100s\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"batting_averages\" (\n \"player\" text,\n \"matches\" real,\n \"innings\" real,\n \"runs\" real,\n \"average\" text,\n \"highest_score\" real,\n \"100s\" real,\n \"50s\" real\n);\n\nQuestion: What is the maximum number of matches in a game?" }, { "role": "assistant", "content": "SELECT MAX(\"matches\") FROM \"batting_averages\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"batting_averages\" (\n \"player\" text,\n \"matches\" real,\n \"innings\" real,\n \"runs\" real,\n \"average\" text,\n \"highest_score\" real,\n \"100s\" real,\n \"50s\" real\n);\n\nQuestion: What is the highest score in those games where the average is 9.88?" }, { "role": "assistant", "content": "SELECT MIN(\"highest_score\") FROM \"batting_averages\" WHERE \"average\"='9.88';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"broadcast\" (\n \"callsign\" text,\n \"city_of_license\" text,\n \"virtual_channel\" text,\n \"digital_channel\" text,\n \"network\" text\n);\n\nQuestion: What digital channel corresponds to virtual channel 23.2?" }, { "role": "assistant", "content": "SELECT \"digital_channel\" FROM \"broadcast\" WHERE \"virtual_channel\"='23.2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"broadcast\" (\n \"callsign\" text,\n \"city_of_license\" text,\n \"virtual_channel\" text,\n \"digital_channel\" text,\n \"network\" text\n);\n\nQuestion: What digital channel corresponds to virtual channel 5.2?" }, { "role": "assistant", "content": "SELECT \"digital_channel\" FROM \"broadcast\" WHERE \"virtual_channel\"='5.2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"broadcast\" (\n \"callsign\" text,\n \"city_of_license\" text,\n \"virtual_channel\" text,\n \"digital_channel\" text,\n \"network\" text\n);\n\nQuestion: What network airs on virtual channel 23.1?" }, { "role": "assistant", "content": "SELECT \"network\" FROM \"broadcast\" WHERE \"virtual_channel\"='23.1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"broadcast\" (\n \"callsign\" text,\n \"city_of_license\" text,\n \"virtual_channel\" text,\n \"digital_channel\" text,\n \"network\" text\n);\n\nQuestion: How many networks run on virtual channel 23.4?" }, { "role": "assistant", "content": "SELECT COUNT(\"network\") FROM \"broadcast\" WHERE \"virtual_channel\"='23.4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"broadcast\" (\n \"callsign\" text,\n \"city_of_license\" text,\n \"virtual_channel\" text,\n \"digital_channel\" text,\n \"network\" text\n);\n\nQuestion: What city licensed the broadcast on virtual channel 8.2?" }, { "role": "assistant", "content": "SELECT \"city_of_license\" FROM \"broadcast\" WHERE \"virtual_channel\"='8.2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28582091_2\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_million\" text\n);\n\nQuestion: What was the title of the episode with production code 2J5515?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_28582091_2\" WHERE \"production_code\"='2J5515';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28578233_1\" (\n \"ime_exchange_including_spot_credit_and_forward_transactions\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text\n);\n\nQuestion: What is the 2007/08number when the 2010/11 is 1,633.6?" }, { "role": "assistant", "content": "SELECT \"2007_08\" FROM \"table1_28578233_1\" WHERE \"2010_11\"='1,633.6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28578233_1\" (\n \"ime_exchange_including_spot_credit_and_forward_transactions\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text\n);\n\nQuestion: When 2007/08 is 6,443.8 what is ime exchange (including spot, credit and forward transactions)?" }, { "role": "assistant", "content": "SELECT \"ime_exchange_including_spot_credit_and_forward_transactions\" FROM \"table1_28578233_1\" WHERE \"2007_08\"='6,443.8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28578233_1\" (\n \"ime_exchange_including_spot_credit_and_forward_transactions\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text\n);\n\nQuestion: When ime exchange (including spot, credit and forward transactions) is agricultural - volume (thousand tons) what is 2008/09?" }, { "role": "assistant", "content": "SELECT \"2008_09\" FROM \"table1_28578233_1\" WHERE \"ime_exchange_including_spot_credit_and_forward_transactions\"='Agricultural - Volume (thousand tons)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28578233_1\" (\n \"ime_exchange_including_spot_credit_and_forward_transactions\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text\n);\n\nQuestion: When ime exchange (including spot, credit and forward transactions) is oil products - value (billion rials) what is the 2008/09 number?" }, { "role": "assistant", "content": "SELECT COUNT(\"2008_09\") FROM \"table1_28578233_1\" WHERE \"ime_exchange_including_spot_credit_and_forward_transactions\"='Oil Products - Value (billion rials)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28578233_1\" (\n \"ime_exchange_including_spot_credit_and_forward_transactions\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text\n);\n\nQuestion: What is the 2010/11 number when the 2007/08 is 772.6?" }, { "role": "assistant", "content": "SELECT \"2010_11\" FROM \"table1_28578233_1\" WHERE \"2007_08\"='772.6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28578233_1\" (\n \"ime_exchange_including_spot_credit_and_forward_transactions\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text\n);\n\nQuestion: When the ime exchange (including spot, credit and forward transactions) is agricultural - value (billion rials ) what is 2010/11?" }, { "role": "assistant", "content": "SELECT \"2010_11\" FROM \"table1_28578233_1\" WHERE \"ime_exchange_including_spot_credit_and_forward_transactions\"='Agricultural - Value (billion rials )';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"no\" real,\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: Name the chassis for ludwig fischer" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"entries\" WHERE \"driver\"='Ludwig Fischer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"no\" real,\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: Name the entrant for bruno sterzi" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"entries\" WHERE \"driver\"='Bruno Sterzi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entries\" (\n \"no\" real,\n \"driver\" text,\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text\n);\n\nQuestion: Name the least number for nello pagani" }, { "role": "assistant", "content": "SELECT MIN(\"no\") FROM \"entries\" WHERE \"driver\"='Nello Pagani';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"linebackers\" (\n \"position\" text,\n \"player\" text,\n \"period\" text,\n \"teams\" text,\n \"consecutive_starts\" real,\n \"playoffs\" real,\n \"total\" real\n);\n\nQuestion: What is the largest number of consecutive starts for jason gildon?" }, { "role": "assistant", "content": "SELECT MAX(\"consecutive_starts\") FROM \"linebackers\" WHERE \"player\"='Jason Gildon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"linebackers\" (\n \"position\" text,\n \"player\" text,\n \"period\" text,\n \"teams\" text,\n \"consecutive_starts\" real,\n \"playoffs\" real,\n \"total\" real\n);\n\nQuestion: What team(s) had 120 consecutive starts?" }, { "role": "assistant", "content": "SELECT \"teams\" FROM \"linebackers\" WHERE \"consecutive_starts\"=120;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"linebackers\" (\n \"position\" text,\n \"player\" text,\n \"period\" text,\n \"teams\" text,\n \"consecutive_starts\" real,\n \"playoffs\" real,\n \"total\" real\n);\n\nQuestion: What period(s) featured a left inside linebacker?" }, { "role": "assistant", "content": "SELECT \"period\" FROM \"linebackers\" WHERE \"position\"='Left inside linebacker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"linebackers\" (\n \"position\" text,\n \"player\" text,\n \"period\" text,\n \"teams\" text,\n \"consecutive_starts\" real,\n \"playoffs\" real,\n \"total\" real\n);\n\nQuestion: How many consecutive starts for the linebacker who played from 9/21/1975 \u2013 12/16/1984?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"linebackers\" WHERE \"period\"='9/21/1975 \u2013 12/16/1984';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28611413_2\" (\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 \"prod_no\" real,\n \"viewers_millions\" text\n);\n\nQuestion: What episode is \"Standoff\"?" }, { "role": "assistant", "content": "SELECT \"no_in_series\" FROM \"table1_28611413_2\" WHERE \"title\"='\\\"Standoff\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28611413_2\" (\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 \"prod_no\" real,\n \"viewers_millions\" text\n);\n\nQuestion: What is the title of the episode written by Frank Military?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_28611413_2\" WHERE \"written_by\"='Frank Military';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28611413_2\" (\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 \"prod_no\" real,\n \"viewers_millions\" text\n);\n\nQuestion: How many seasons had 16.15 million viewers?" }, { "role": "assistant", "content": "SELECT COUNT(\"no_in_series\") FROM \"table1_28611413_2\" WHERE \"viewers_millions\"='16.15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_28611413_2\" (\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 \"prod_no\" real,\n \"viewers_millions\" text\n);\n\nQuestion: What is air date of the episode directed by John P. Kousakis?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_28611413_2\" WHERE \"directed_by\"='John P. Kousakis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entire_conference\" (\n \"category\" text,\n \"player\" text,\n \"team\" text,\n \"games_played\" real,\n \"totals\" text,\n \"average\" text\n);\n\nQuestion: Who was the player when totals were 105-161?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"entire_conference\" WHERE \"totals\"='105-161';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entire_conference\" (\n \"category\" text,\n \"player\" text,\n \"team\" text,\n \"games_played\" real,\n \"totals\" text,\n \"average\" text\n);\n\nQuestion: How many items appear in the average column when the totals were 105-161?" }, { "role": "assistant", "content": "SELECT COUNT(\"average\") FROM \"entire_conference\" WHERE \"totals\"='105-161';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entire_conference\" (\n \"category\" text,\n \"player\" text,\n \"team\" text,\n \"games_played\" real,\n \"totals\" text,\n \"average\" text\n);\n\nQuestion: What were the totals when the average is 6.25?" }, { "role": "assistant", "content": "SELECT \"totals\" FROM \"entire_conference\" WHERE \"average\"='6.25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"entire_conference\" (\n \"category\" text,\n \"player\" text,\n \"team\" text,\n \"games_played\" real,\n \"totals\" text,\n \"average\" text\n);\n\nQuestion: Who was the team when the category is field goal percentage?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"entire_conference\" WHERE \"category\"='Field goal percentage';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"federal_election_results\" (\n \"election\" real,\n \"num_of_candidates_nominated\" real,\n \"num_of_seats_won\" real,\n \"num_of_total_votes\" real,\n \"pct_of_popular_vote\" text\n);\n\nQuestion: Name the election for the percent of popular vote being 4.48%" }, { "role": "assistant", "content": "SELECT \"election\" FROM \"federal_election_results\" WHERE \"pct_of_popular_vote\"='4.48%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"rank\" real,\n \"country\" text,\n \"miss_universe\" text,\n \"1st_runner_up\" real,\n \"2nd_runner_up\" real,\n \"3rd_runner_up\" real,\n \"4th_runner_up\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: How many times was taiwan 3rd runner-up?" }, { "role": "assistant", "content": "SELECT MAX(\"3rd_runner_up\") FROM \"references\" WHERE \"country\"='Taiwan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"rank\" real,\n \"country\" text,\n \"miss_universe\" text,\n \"1st_runner_up\" real,\n \"2nd_runner_up\" real,\n \"3rd_runner_up\" real,\n \"4th_runner_up\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: How many miss universes did south africa have?" }, { "role": "assistant", "content": "SELECT COUNT(\"miss_universe\") FROM \"references\" WHERE \"country\"='South Africa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"rank\" real,\n \"country\" text,\n \"miss_universe\" text,\n \"1st_runner_up\" real,\n \"2nd_runner_up\" real,\n \"3rd_runner_up\" real,\n \"4th_runner_up\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: How many placements in total does russia have?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"references\" WHERE \"country\"='Russia';" } ]