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