text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); Question: What was the average number of "goals for", scored in the club Real Oviedo that had a "goal difference" lower than -16 and fewer than 9 wins? <|assistant|> SELECT AVG("goals_for") FROM "final_table" WHERE "goal_difference"<-16 AND "club"='real oviedo' AND "wins"<9;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); Question: How many people played at the club that had a "goal difference" of -8 and a position lower than 12? <|assistant|> SELECT SUM("played") FROM "final_table" WHERE "goal_difference"=-8 AND "position"<12;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); Question: How many "goals against" were scored at the club that had a "goal difference" of 0, 12 wins, and more than 44 goals? <|assistant|> SELECT COUNT("goals_against") FROM "final_table" WHERE "goal_difference"=0 AND "wins"=12 AND "goals_for">44;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_table" ( "position" real, "club" text, "played" real, "points" text, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); Question: What is the smallest number of "goals for" out of the clubs where there were 18 wins and fewer than 38 "goals against"? <|assistant|> SELECT MIN("goals_for") FROM "final_table" WHERE "wins"=18 AND "goals_against"<38;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_winners" ( "year" real, "fighter" text, "nation_represented" text, "sport" text, "sanctioning_body_or_league" text, "weight_class_represented_or_contested" text ); Question: When did Manny Pacquiao win his first championship? <|assistant|> SELECT MIN("year") FROM "list_of_winners" WHERE "fighter"='manny pacquiao';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_winners" ( "year" real, "fighter" text, "nation_represented" text, "sport" text, "sanctioning_body_or_league" text, "weight_class_represented_or_contested" text ); Question: Which sport did the United States win? <|assistant|> SELECT "sport" FROM "list_of_winners" WHERE "nation_represented"='united states';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_winners" ( "year" real, "fighter" text, "nation_represented" text, "sport" text, "sanctioning_body_or_league" text, "weight_class_represented_or_contested" text ); Question: What is the latest result where a person from the Philippines won? <|assistant|> SELECT MAX("year") FROM "list_of_winners" WHERE "nation_represented"='philippines';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_winners" ( "year" real, "fighter" text, "nation_represented" text, "sport" text, "sanctioning_body_or_league" text, "weight_class_represented_or_contested" text ); Question: Which nation won the boxing championship in 2012? <|assistant|> SELECT "nation_represented" FROM "list_of_winners" WHERE "year"=2012;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results" ( "party" text, "party_list_votes" real, "vote_percentage" text, "total_seats" text, "seat_percentage" text ); Question: What is the total number of seats of the Christian Democratic Union (CDU) party? <|assistant|> SELECT "total_seats" FROM "results" WHERE "party"='christian democratic union (cdu)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results" ( "party" text, "party_list_votes" real, "vote_percentage" text, "total_seats" text, "seat_percentage" text ); Question: What seat has a vote percentage of 100.0% <|assistant|> SELECT "seat_percentage" FROM "results" WHERE "vote_percentage"='100.0%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list" ( "name" text, "population_2011" real, "population_2006" real, "change_pct" real, "area_km" real, "population_density" real ); Question: What was the area in Glenella with a population of 522 in 2011? <|assistant|> SELECT AVG("area_km") FROM "list" WHERE "name"='glenella' AND "population_2011"<522;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list" ( "name" text, "population_2011" real, "population_2006" real, "change_pct" real, "area_km" real, "population_density" real ); Question: What is the population density of Siglunes when the change was smaller than -8.1 percent? <|assistant|> SELECT COUNT("population_density") FROM "list" WHERE "name"='siglunes' AND "change_pct"<-8.1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners_of_the_virginia_derby_since_1998" ( "year" real, "winner" text, "jockey" text, "trainer" text, "owner" text, "distance_miles" text, "time" text ); Question: Who was the trainer when Crowd Pleaser won? <|assistant|> SELECT "trainer" FROM "winners_of_the_virginia_derby_since_1998" WHERE "winner"='crowd pleaser';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners_of_the_virginia_derby_since_1998" ( "year" real, "winner" text, "jockey" text, "trainer" text, "owner" text, "distance_miles" text, "time" text ); Question: What was the race time of the horse with jockey Ramon Dominguez? <|assistant|> SELECT "time" FROM "winners_of_the_virginia_derby_since_1998" WHERE "jockey"='ramon dominguez';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners_of_the_virginia_derby_since_1998" ( "year" real, "winner" text, "jockey" text, "trainer" text, "owner" text, "distance_miles" text, "time" text ); Question: What jockey rode for Michael House before 2012 <|assistant|> SELECT "jockey" FROM "winners_of_the_virginia_derby_since_1998" WHERE "year"<2012 AND "owner"='michael house';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "contestants" ( "name" text, "from" text, "discipline" text, "events_won_uk_series" real, "events_won_us_series" real ); Question: How many UK events won for the contestant that won under 1 US event? <|assistant|> SELECT "events_won_uk_series" FROM "contestants" WHERE "events_won_us_series"<1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "contestants" ( "name" text, "from" text, "discipline" text, "events_won_uk_series" real, "events_won_us_series" real ); Question: How many US events did jason bennett win? <|assistant|> SELECT AVG("events_won_us_series") FROM "contestants" WHERE "name"='jason bennett';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_standings" ( "season" real, "overall" text, "slalom" text, "giant_slalom" text, "super_g" text, "downhill" text, "combined" text ); Question: Which downhill has 7 overalls? <|assistant|> SELECT "downhill" FROM "season_standings" WHERE "overall"='7';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_standings" ( "season" real, "overall" text, "slalom" text, "giant_slalom" text, "super_g" text, "downhill" text, "combined" text ); Question: What super g was before 1998, had 2 giant slaloms and 24 downhills? <|assistant|> SELECT "super_g" FROM "season_standings" WHERE "season"<1998 AND "giant_slalom"='2' AND "downhill"='24';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_standings" ( "season" real, "overall" text, "slalom" text, "giant_slalom" text, "super_g" text, "downhill" text, "combined" text ); Question: What is the combined of 2 overalls and 5 slaloms? <|assistant|> SELECT "combined" FROM "season_standings" WHERE "overall"='2' AND "slalom"='5';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_standings" ( "season" real, "overall" text, "slalom" text, "giant_slalom" text, "super_g" text, "downhill" text, "combined" text ); Question: How many overalls has 1 combined and 24 downhills? <|assistant|> SELECT "overall" FROM "season_standings" WHERE "combined"='1' AND "downhill"='24';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "stage_results" ( "date" text, "course" text, "distance" text, "winner" text, "race_leader" text ); Question: What Distance had a Race Leader in Km (mi)? <|assistant|> SELECT "distance" FROM "stage_results" WHERE "race_leader"='km (mi)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_by_season_record" ( "season" text, "games" real, "lost" real, "tied" text, "points" real, "goals_for" real, "goals_against" real, "standing" text ); Question: What is the highest number of points scored when Acadie-Bathurst had 4 tied games, less than 257 goals, and over 72 games played? <|assistant|> SELECT MAX("points") FROM "season_by_season_record" WHERE "tied"='4' AND "goals_for"<257 AND "games">72;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rugby_wales_internationals_1987" ( "first_game" real, "played" real, "drawn" real, "lost" real, "percentage" text ); Question: What is the average of games played with a percentage of 3.33% and less than 29 losses? <|assistant|> SELECT AVG("played") FROM "rugby_wales_internationals_1987" WHERE "percentage"='3.33%' AND "lost"<29;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rugby_wales_internationals_1987" ( "first_game" real, "played" real, "drawn" real, "lost" real, "percentage" text ); Question: What is the total number of games played that correlates with a first game in 1991, a percentage of 22.22%, and less than 7 losses? <|assistant|> SELECT COUNT("played") FROM "rugby_wales_internationals_1987" WHERE "first_game"=1991 AND "percentage"='22.22%' AND "lost">7;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "rugby_wales_internationals_1987" ( "first_game" real, "played" real, "drawn" real, "lost" real, "percentage" text ); Question: What is the highest number of draws that correlates with a percentage of 0.00% and less than 1 loss? <|assistant|> SELECT MAX("drawn") FROM "rugby_wales_internationals_1987" WHERE "percentage"='0.00%' AND "lost"<1;<|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 is the start value for rank 11? <|assistant|> SELECT "start" FROM "indy_500_results" WHERE "rank"='11';<|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: Which year has 200 laps? <|assistant|> SELECT "year" FROM "indy_500_results" WHERE "laps"=200;<|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 is the finish value for a start of 19? <|assistant|> SELECT "finish" FROM "indy_500_results" WHERE "start"='19';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2000s" ( "year" real, "english_title" text, "original_title" text, "country" text, "director" text ); Question: What country is the film directed by Alfonso Cuarón from? <|assistant|> SELECT "country" FROM "2000s" WHERE "director"='alfonso cuarón';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2000s" ( "year" real, "english_title" text, "original_title" text, "country" text, "director" text ); Question: What is the original title of the film directed by Cristian Mungiu? <|assistant|> SELECT "original_title" FROM "2000s" WHERE "director"='cristian mungiu';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2000s" ( "year" real, "english_title" text, "original_title" text, "country" text, "director" text ); Question: What country is the film directed by Michael Haneke from? <|assistant|> SELECT "country" FROM "2000s" WHERE "director"='michael haneke';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2000s" ( "year" real, "english_title" text, "original_title" text, "country" text, "director" text ); Question: What is the English title of the film from after 2003 directed by Michael Haneke? <|assistant|> SELECT "english_title" FROM "2000s" WHERE "year">2003 AND "director"='michael haneke';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "teams" ( "team" text, "city" text, "stadium" text, "manager" text, "past_season" text ); Question: where is the naghsh jahan stadium? <|assistant|> SELECT "city" FROM "teams" WHERE "stadium"='naghsh jahan';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "teams" ( "team" text, "city" text, "stadium" text, "manager" text, "past_season" text ); Question: what city has a past season of n/a? <|assistant|> SELECT "city" FROM "teams" WHERE "past_season"='n/a';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "teams" ( "team" text, "city" text, "stadium" text, "manager" text, "past_season" text ); Question: where is the pegah team located? <|assistant|> SELECT "city" FROM "teams" WHERE "team"='pegah';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "teams" ( "team" text, "city" text, "stadium" text, "manager" text, "past_season" text ); Question: what stadium has a prior record of 7th? <|assistant|> SELECT "stadium" FROM "teams" WHERE "past_season"='7th';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "heats" ( "heat" real, "lane" real, "name" text, "nationality" text, "time" text ); Question: What is the Nationality on the swimmer in Lane 4 with a Time of 1:11.58? <|assistant|> SELECT "nationality" FROM "heats" WHERE "lane"=4 AND "time"='1:11.58';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "heats" ( "heat" real, "lane" real, "name" text, "nationality" text, "time" text ); Question: What is the lowest numbered Lane with a Time of 1:10.57 and Heat larger than 2? <|assistant|> SELECT MIN("lane") FROM "heats" WHERE "heat">2 AND "time"='1:10.57';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "heats" ( "heat" real, "lane" real, "name" text, "nationality" text, "time" text ); Question: What is the Heat for Smiljana Marinović? <|assistant|> SELECT COUNT("heat") FROM "heats" WHERE "name"='smiljana marinović';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "heats" ( "heat" real, "lane" real, "name" text, "nationality" text, "time" text ); Question: In heat 4, what is Byun Hye-young's Nationality? <|assistant|> SELECT "nationality" FROM "heats" WHERE "heat"=4 AND "name"='byun hye-young';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "songs" ( "number" real, "name_of_the_song" text, "singer" text, "drama" text, "kind_of_the_song" text ); Question: Which type of song did miriam yeung sing? <|assistant|> SELECT "kind_of_the_song" FROM "songs" WHERE "singer"='miriam yeung';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "songs" ( "number" real, "name_of_the_song" text, "singer" text, "drama" text, "kind_of_the_song" text ); Question: What type of song is larger than 8 and named 實情? <|assistant|> SELECT "kind_of_the_song" FROM "songs" WHERE "number">8 AND "name_of_the_song"='實情';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "songs" ( "number" real, "name_of_the_song" text, "singer" text, "drama" text, "kind_of_the_song" text ); Question: Which song has a ending theme, and is sung by miriam yeung? <|assistant|> SELECT "name_of_the_song" FROM "songs" WHERE "kind_of_the_song"='ending theme' AND "singer"='miriam yeung';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "songs" ( "number" real, "name_of_the_song" text, "singer" text, "drama" text, "kind_of_the_song" text ); Question: What is the number of the song named 實情? <|assistant|> SELECT "number" FROM "songs" WHERE "name_of_the_song"='實情';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "daytona_500_results" ( "year" real, "manufacturer" text, "start" real, "finish" real, "team" text ); Question: Name the total number of start when finish is less than 4 <|assistant|> SELECT COUNT("start") FROM "daytona_500_results" WHERE "finish"<4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "daytona_500_results" ( "year" real, "manufacturer" text, "start" real, "finish" real, "team" text ); Question: Name the sum of year when start is less than 30 <|assistant|> SELECT SUM("year") FROM "daytona_500_results" WHERE "start"<30;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "daytona_500_results" ( "year" real, "manufacturer" text, "start" real, "finish" real, "team" text ); Question: Name the most year with start more than 2 <|assistant|> SELECT MAX("year") FROM "daytona_500_results" WHERE "start">2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "daytona_500_results" ( "year" real, "manufacturer" text, "start" real, "finish" real, "team" text ); Question: Name the most year with start less than 2 <|assistant|> SELECT MAX("year") FROM "daytona_500_results" WHERE "start"<2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "daytona_500_results" ( "year" real, "manufacturer" text, "start" real, "finish" real, "team" text ); Question: Name the year when start was 32 <|assistant|> SELECT "year" FROM "daytona_500_results" WHERE "start"=32;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "daytona_500_results" ( "year" real, "manufacturer" text, "start" real, "finish" real, "team" text ); Question: Name the most finish for 2006 <|assistant|> SELECT MAX("finish") FROM "daytona_500_results" WHERE "year"=2006;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "february" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real, "record" text ); Question: What was the total attendance at games when Detroit was the visiting team and the record was 36–13–5? <|assistant|> SELECT COUNT("attendance") FROM "february" WHERE "visitor"='detroit' AND "record"='36–13–5';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "minister_for_community_safety_and_legal_" ( "name" text, "entered_office" text, "left_office" text, "party" text, "first_minister" text ); Question: When did first minister Henry Mcleish enter office? <|assistant|> SELECT "entered_office" FROM "minister_for_community_safety_and_legal_" WHERE "first_minister"='henry mcleish';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "minister_for_community_safety_and_legal_" ( "name" text, "entered_office" text, "left_office" text, "party" text, "first_minister" text ); Question: What is the name of the minister that left office on 14 November 2006? <|assistant|> SELECT "name" FROM "minister_for_community_safety_and_legal_" WHERE "left_office"='14 november 2006';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "minister_for_community_safety_and_legal_" ( "name" text, "entered_office" text, "left_office" text, "party" text, "first_minister" text ); Question: What is the name of the minister from the party of minister for community safety and legal affairs? <|assistant|> SELECT "name" FROM "minister_for_community_safety_and_legal_" WHERE "party"='minister for community safety and legal affairs';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "minister_for_community_safety_and_legal_" ( "name" text, "entered_office" text, "left_office" text, "party" text, "first_minister" text ); Question: What is the name of the minister who has an entered office of entered office? <|assistant|> SELECT "name" FROM "minister_for_community_safety_and_legal_" WHERE "entered_office"='entered office';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "minister_for_community_safety_and_legal_" ( "name" text, "entered_office" text, "left_office" text, "party" text, "first_minister" text ); Question: What is the party of the minister who left office on 26 November 2002? <|assistant|> SELECT "party" FROM "minister_for_community_safety_and_legal_" WHERE "left_office"='26 november 2002';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "minister_for_community_safety_and_legal_" ( "name" text, "entered_office" text, "left_office" text, "party" text, "first_minister" text ); Question: What is the party of Richard Simpson? <|assistant|> SELECT "party" FROM "minister_for_community_safety_and_legal_" WHERE "name"='richard simpson';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "turkish_national_team" ( "date" text, "time_cest" real, "team_num1" text, "res" text, "team_num2" text, "round" text, "spectators" real ); Question: Name the sum of spectators for time more than 20.05 and team #2 of estonia <|assistant|> SELECT SUM("spectators") FROM "turkish_national_team" WHERE "time_cest">20.05 AND "team_num2"='estonia';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "turkish_national_team" ( "date" text, "time_cest" real, "team_num1" text, "res" text, "team_num2" text, "round" text, "spectators" real ); Question: Name the spectators for 11 november 2011 <|assistant|> SELECT "spectators" FROM "turkish_national_team" WHERE "date"='11 november 2011';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "record" text ); Question: Which loss has a Record of 54-39? <|assistant|> SELECT "loss" FROM "game_log" WHERE "record"='54-39';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "record" text ); Question: Which opponent has a Record of 54-38? <|assistant|> SELECT "opponent" FROM "game_log" WHERE "record"='54-38';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "record" text ); Question: Which opponent has a date of July 7? <|assistant|> SELECT "opponent" FROM "game_log" WHERE "date"='july 7';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "record" text ); Question: Which record has a Loss of eichhorn (8-5)? <|assistant|> SELECT "record" FROM "game_log" WHERE "loss"='eichhorn (8-5)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "november" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real ); Question: What is the average attendance San Jose home games? <|assistant|> SELECT AVG("attendance") FROM "november" WHERE "home"='san jose';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "november" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real ); Question: Who was the attendance at the game attended by 18,118 with a visiting team of Nashville? <|assistant|> SELECT "home" FROM "november" WHERE "attendance">'18,118' AND "visitor"='nashville';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "record" text ); Question: What was the record at the game that had a loss of Spillner (1-8)? <|assistant|> SELECT "record" FROM "game_log" WHERE "loss"='spillner (1-8)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "record" text ); Question: What was the score of the game that had a loss of Williams (1-1)? <|assistant|> SELECT "score" FROM "game_log" WHERE "loss"='williams (1-1)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "record" text ); Question: What was the loss of the game that had a record of 63-52? <|assistant|> SELECT "loss" FROM "game_log" WHERE "record"='63-52';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "record" text ); Question: What was the score when the Washington Nationals had a record of 11-10? <|assistant|> SELECT "score" FROM "game_log" WHERE "record"='11-10';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "record" text ); Question: Who was the opponent when the Washington Nationals had a record of 8-4? <|assistant|> SELECT "opponent" FROM "game_log" WHERE "record"='8-4';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "record" text ); Question: How many people were in attendance when the Washington Nationals had a score of 7-3 and a loss of Worrell (0-1)? <|assistant|> SELECT COUNT("attendance") FROM "game_log" WHERE "score"='7-3' AND "loss"='worrell (0-1)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "qualifying_results" ( "name" text, "team" text, "qual_1" text, "qual_2" text, "best" text ); Question: Name the Qual 2 which has the name of katherine legge <|assistant|> SELECT "qual_2" FROM "qualifying_results" WHERE "name"='katherine legge';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "qualifying_results" ( "name" text, "team" text, "qual_1" text, "qual_2" text, "best" text ); Question: Name the team with best of 58.846 <|assistant|> SELECT "team" FROM "qualifying_results" WHERE "best"='58.846';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "qualifying_results" ( "name" text, "team" text, "qual_1" text, "qual_2" text, "best" text ); Question: Tell me the name with best of 58.403 <|assistant|> SELECT "name" FROM "qualifying_results" WHERE "best"='58.403';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "qualifying_results" ( "name" text, "team" text, "qual_1" text, "qual_2" text, "best" text ); Question: Tell me the qual 1 for jan heylen <|assistant|> SELECT "qual_1" FROM "qualifying_results" WHERE "name"='jan heylen';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" text, "record" text ); Question: When the attendance was 24,406 who lost? <|assistant|> SELECT "loss" FROM "game_log" WHERE "attendance"='24,406';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" text, "record" text ); Question: Which of the opponents has a record of 17-25? <|assistant|> SELECT "opponent" FROM "game_log" WHERE "record"='17-25';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" text, "record" text ); Question: Who was the opponent that played on may 12? <|assistant|> SELECT "opponent" FROM "game_log" WHERE "date"='may 12';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "premier_league" ( "date" text, "opponents" text, "result_f_a" text, "attendance" real, "league_position" text ); Question: When in the 1st league position, how many people watch as they faced West Ham United? <|assistant|> SELECT MIN("attendance") FROM "premier_league" WHERE "league_position"='1st' AND "opponents"='west ham united';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "premier_league" ( "date" text, "opponents" text, "result_f_a" text, "attendance" real, "league_position" text ); Question: What was the result with West Ham United with more than 67,577 in attendance? <|assistant|> SELECT "result_f_a" FROM "premier_league" WHERE "attendance">'67,577' AND "opponents"='west ham united';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medals_table" ( "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: What is the average bronze medals of Uganda's swimmers when they earned over 2 medals? <|assistant|> SELECT AVG("bronze") FROM "medals_table" WHERE "nation"='uganda' AND "total">2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medals_table" ( "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: What is the highest number of silver medals that Ireland earned when they scored less than 3 bronze medals and earned 1 medal? <|assistant|> SELECT MAX("silver") FROM "medals_table" WHERE "bronze"<3 AND "gold"<1 AND "total"=1 AND "nation"='ireland';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "total" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: What's the highest silver and 1 gold that the nation of djibouti received with a total less than 3? <|assistant|> SELECT MAX("silver") FROM "total" WHERE "gold"=1 AND "nation"='djibouti' AND "total"<3;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "total" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: What's the total number that had a rank larger than 17 and a gold greater than 0? <|assistant|> SELECT COUNT("total") FROM "total" WHERE "rank">17 AND "gold">0;<|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, "attendance" real ); Question: Which opponent was faced before week 2? <|assistant|> SELECT "opponent" FROM "schedule" WHERE "week"<2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "made_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" text, "finish" text ); Question: Name the least total for 1978 years won <|assistant|> SELECT MIN("total") FROM "made_the_cut" WHERE "year_s_won"='1978';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "made_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" text, "finish" text ); Question: Name the total with finish of t22 <|assistant|> SELECT "total" FROM "made_the_cut" WHERE "finish"='t22';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "made_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" text, "finish" text ); Question: Name the average total for years won of 1975 <|assistant|> SELECT AVG("total") FROM "made_the_cut" WHERE "year_s_won"='1975';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "made_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" text, "finish" text ); Question: Name the finish with player lou graham <|assistant|> SELECT "finish" FROM "made_the_cut" WHERE "player"='lou graham';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "made_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" text, "finish" text ); Question: Name the total number of total with finish of t45 <|assistant|> SELECT COUNT("total") FROM "made_the_cut" WHERE "finish"='t45';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "achievements" ( "year" text, "position" text, "league" text, "fa_cup" text, "malaysia_cup" text ); Question: What year was the League the malaysian super league, and a Malaysia Cup of group stage? <|assistant|> SELECT "year" FROM "achievements" WHERE "league"='malaysian super league' AND "malaysia_cup"='group stage';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "achievements" ( "year" text, "position" text, "league" text, "fa_cup" text, "malaysia_cup" text ); Question: What is the position when the League is the malaysian super league, and a Year of 2011? <|assistant|> SELECT "position" FROM "achievements" WHERE "league"='malaysian super league' AND "year"='2011';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "achievements" ( "year" text, "position" text, "league" text, "fa_cup" text, "malaysia_cup" text ); Question: What year was the position 6/13? <|assistant|> SELECT "year" FROM "achievements" WHERE "position"='6/13';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "achievements" ( "year" text, "position" text, "league" text, "fa_cup" text, "malaysia_cup" text ); Question: What year was the League of malaysian super league, and the Position was 10/14? <|assistant|> SELECT "year" FROM "achievements" WHERE "league"='malaysian super league' AND "position"='10/14';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "south_wairarapa_district" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: tell me the average roll for the featherston area and integrated authority. <|assistant|> SELECT AVG("roll") FROM "south_wairarapa_district" WHERE "area"='featherston' AND "authority"='integrated';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "south_wairarapa_district" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: tell me the authority that has a decile less than 6 and roll less than 65. <|assistant|> SELECT "authority" FROM "south_wairarapa_district" WHERE "decile"<6 AND "roll"<65;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "south_wairarapa_district" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: tell me the average roll for pirinoa school. <|assistant|> SELECT AVG("roll") FROM "south_wairarapa_district" WHERE "name"='pirinoa school';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "south_wairarapa_district" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); Question: tell me the total number of decile with a roll showing 251. <|assistant|> SELECT COUNT("decile") FROM "south_wairarapa_district" WHERE "roll"=251;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "external_links" ( "year" real, "champion" text, "score" text, "defeated" text, "location" text ); Question: What is the score for 2004? <|assistant|> SELECT "score" FROM "external_links" WHERE "year"=2004;<|endoftext|>