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