text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "preliminary_round" ( "team_1" text, "agg" text, "team_2" text, "1st_leg" text, "2nd_leg" text ); Question: What is the first leg score when the second leg score is 0-4? <|assistant|> SELECT "1st_leg" FROM "preliminary_round" WHERE "2nd_leg"='0-4';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "newly_named_birds" ( "name" text, "status" text, "authors" text, "unit" text, "location" text ); Question: What is the Status with a Name that is anas cheuen? <|assistant|> SELECT "status" FROM "newly_named_birds" WHERE "name"='anas cheuen';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "newly_named_birds" ( "name" text, "status" text, "authors" text, "unit" text, "location" text ); Question: What is the Unit with a Name that is anas cheuen? <|assistant|> SELECT "unit" FROM "newly_named_birds" WHERE "name"='anas cheuen';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "date" text, "opponent" text, "result" text, "score" text, "record" text, "attendance" real ); Question: What team was the Opponent when the Score was 31-6? <|assistant|> SELECT "opponent" FROM "schedule" WHERE "score"='31-6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "date" text, "opponent" text, "result" text, "score" text, "record" text, "attendance" real ); Question: What is the Score when the record was 9-3-0? <|assistant|> SELECT "score" FROM "schedule" WHERE "record"='9-3-0';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "date" text, "opponent" text, "result" text, "score" text, "record" text, "attendance" real ); Question: What is the Record with an attendance of more than 54,761, and a Result of loss? <|assistant|> SELECT "record" FROM "schedule" WHERE "attendance">'54,761' AND "result"='loss';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "third_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text, "attendance" text ); Question: What is the away team where the home team is Coventry City? <|assistant|> SELECT "away_team" FROM "third_round_proper" WHERE "home_team"='coventry city';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "third_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text, "attendance" text ); Question: What is the score where the away team is Exeter City? <|assistant|> SELECT "score" FROM "third_round_proper" WHERE "away_team"='exeter city';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "third_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text, "attendance" text ); Question: How many ties does Walsall have? <|assistant|> SELECT "tie_no" FROM "third_round_proper" WHERE "away_team"='walsall';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "third_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text, "attendance" text ); Question: Where Bolton Wanderers is the home team, who is the away team? <|assistant|> SELECT "away_team" FROM "third_round_proper" WHERE "home_team"='bolton wanderers';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "third_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text, "attendance" text ); Question: How many ties are there where attendance is 11,997? <|assistant|> SELECT "tie_no" FROM "third_round_proper" WHERE "attendance"='11,997';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "third_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text, "attendance" text ); Question: Where the away team is Bradford City, who is the home team? <|assistant|> SELECT "home_team" FROM "third_round_proper" WHERE "away_team"='bradford city';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "t" ( "name" text, "position" text, "number" real, "school_club_team" text, "season" text, "acquisition_via" text ); Question: For which school/club team did the player in the position of Guard/Forward play? <|assistant|> SELECT "school_club_team" FROM "t" WHERE "position"='guard/forward';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "t" ( "name" text, "position" text, "number" real, "school_club_team" text, "season" text, "acquisition_via" text ); Question: How was the player in the position of Center acquired? <|assistant|> SELECT "acquisition_via" FROM "t" WHERE "position"='center';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "t" ( "name" text, "position" text, "number" real, "school_club_team" text, "season" text, "acquisition_via" text ); Question: In what season did Omar Thomas play, with a jersey number larger than 15? <|assistant|> SELECT "season" FROM "t" WHERE "number">15 AND "name"='omar thomas';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "t" ( "name" text, "position" text, "number" real, "school_club_team" text, "season" text, "acquisition_via" text ); Question: How many total players came from the school/club team of De La Salle? <|assistant|> SELECT COUNT("number") FROM "t" WHERE "school_club_team"='de la salle';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "t" ( "name" text, "position" text, "number" real, "school_club_team" text, "season" text, "acquisition_via" text ); Question: Which player is in the position of Guard/Forward? <|assistant|> SELECT "name" FROM "t" WHERE "position"='guard/forward';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_10" real, "top_25" real, "events" real, "cuts_made" real ); Question: What is the most wins associated with under 4 events with 0 top-5s? <|assistant|> SELECT MAX("wins") FROM "summary" WHERE "top_5">0 AND "events"<4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_10" real, "top_25" real, "events" real, "cuts_made" real ); Question: What is the average number of events having 1 top-10, fewer than 4 cuts made, and 0 wins? <|assistant|> SELECT AVG("events") FROM "summary" WHERE "top_10"=1 AND "wins">0 AND "cuts_made"<4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_10" real, "top_25" real, "events" real, "cuts_made" real ); Question: What is the average number of wins for events larger than 28? <|assistant|> SELECT AVG("wins") FROM "summary" WHERE "events">28;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_10" real, "top_25" real, "events" real, "cuts_made" real ); Question: What is the sum of top-25s for events with more than 1 top-5? <|assistant|> SELECT SUM("top_25") FROM "summary" WHERE "top_5">1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2003" ( "date" text, "title" text, "director" text, "producer" text, "production_cost" text, "singapore_gross" text ); Question: Who is the producer of city sharks? <|assistant|> SELECT "producer" FROM "2003" WHERE "title"='city sharks';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2003" ( "date" text, "title" text, "director" text, "producer" text, "production_cost" text, "singapore_gross" text ); Question: What is the title of the film when the producer was 2003? <|assistant|> SELECT "title" FROM "2003" WHERE "producer"='2003';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2003" ( "date" text, "title" text, "director" text, "producer" text, "production_cost" text, "singapore_gross" text ); Question: Who is the director when the title is 2003? <|assistant|> SELECT "director" FROM "2003" WHERE "title"='2003';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2003" ( "date" text, "title" text, "director" text, "producer" text, "production_cost" text, "singapore_gross" text ); Question: What is the production cost when the producer is raintree pictures? <|assistant|> SELECT "production_cost" FROM "2003" WHERE "producer"='raintree pictures';<|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: What was the lowest attendance at a week 15 game? <|assistant|> SELECT MIN("attendance") FROM "schedule" WHERE "week"=15;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "date" text, "opponent" text, "location" text, "score" text, "loss" text, "record" text ); Question: What is the Score for the game with a record of 38-18? <|assistant|> SELECT "score" FROM "schedule" WHERE "record"='38-18';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "date" text, "opponent" text, "location" text, "score" text, "loss" text, "record" text ); Question: What team was the opponent when the score was 8-2? <|assistant|> SELECT "opponent" FROM "schedule" WHERE "score"='8-2';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "date" text, "opponent" text, "location" text, "score" text, "loss" text, "record" text ); Question: What is the Location when the opponent shows vs. ole miss, and a Loss of mckean (4-1)? <|assistant|> SELECT "location" FROM "schedule" WHERE "opponent"='vs. ole miss' AND "loss"='mckean (4-1)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "date" text, "opponent" text, "location" text, "score" text, "loss" text, "record" text ); Question: What is the name of the Opponent when there is a Record of 39-19? <|assistant|> SELECT "opponent" FROM "schedule" WHERE "record"='39-19';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "date" text, "opponent" text, "location" text, "score" text, "loss" text, "record" text ); Question: What is the Record on may 24, with a Loss of hayes (2-1)? <|assistant|> SELECT "record" FROM "schedule" WHERE "date"='may 24' AND "loss"='hayes (2-1)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "date" text, "opponent" text, "location" text, "score" text, "loss" text, "record" text ); Question: What is the Location when the Opponent shows vs. #23 south carolina? <|assistant|> SELECT "location" FROM "schedule" WHERE "opponent"='vs. #23 south carolina';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_united_states_national_ice_hocke" ( "position" text, "jersey_num" real, "name" text, "height_cm" real, "weight_kg" real, "birthdate" text, "birthplace" text, "2002_2003_team" text, "nhl_rights_if_any" text ); Question: What is that if the weight for the play born on June 2, 1983? <|assistant|> SELECT SUM("weight_kg") FROM "list_of_united_states_national_ice_hocke" WHERE "birthdate"='june 2, 1983';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_united_states_national_ice_hocke" ( "position" text, "jersey_num" real, "name" text, "height_cm" real, "weight_kg" real, "birthdate" text, "birthplace" text, "2002_2003_team" text, "nhl_rights_if_any" text ); Question: What was the highest weight in kg for F Position, Jersey #12? <|assistant|> SELECT MAX("weight_kg") FROM "list_of_united_states_national_ice_hocke" WHERE "position"='f' AND "jersey_num"=12;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_united_states_national_ice_hocke" ( "position" text, "jersey_num" real, "name" text, "height_cm" real, "weight_kg" real, "birthdate" text, "birthplace" text, "2002_2003_team" text, "nhl_rights_if_any" text ); Question: Which player is the NHL right, who was born in Downers Grove, Illinois? <|assistant|> SELECT "nhl_rights_if_any" FROM "list_of_united_states_national_ice_hocke" WHERE "birthplace"='downers grove, illinois';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sftpa2_m_rna_transcript_variants" ( "variant_id" text, "5_utr_splice" text, "coding" text, "3_utr_sequence" text, "gen_bank_id" text ); Question: Which coding's variant id is abd'1a 3? <|assistant|> SELECT "coding" FROM "sftpa2_m_rna_transcript_variants" WHERE "variant_id"='abd''1a 3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sftpa2_m_rna_transcript_variants" ( "variant_id" text, "5_utr_splice" text, "coding" text, "3_utr_sequence" text, "gen_bank_id" text ); Question: Which 5'utr splice's coding is 1a 2, when the Variant id is abd'1a 2? <|assistant|> SELECT "5_utr_splice" FROM "sftpa2_m_rna_transcript_variants" WHERE "coding"='1a 2' AND "variant_id"='abd''1a 2';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sftpa2_m_rna_transcript_variants" ( "variant_id" text, "5_utr_splice" text, "coding" text, "3_utr_sequence" text, "gen_bank_id" text ); Question: Which variant id's coding is 1a 5 when the 5'utr splice is abd'? <|assistant|> SELECT "variant_id" FROM "sftpa2_m_rna_transcript_variants" WHERE "coding"='1a 5' AND "5_utr_splice"='abd''';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sftpa2_m_rna_transcript_variants" ( "variant_id" text, "5_utr_splice" text, "coding" text, "3_utr_sequence" text, "gen_bank_id" text ); Question: Which genbank id's variant is abd1a? <|assistant|> SELECT "gen_bank_id" FROM "sftpa2_m_rna_transcript_variants" WHERE "variant_id"='abd1a';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sftpa2_m_rna_transcript_variants" ( "variant_id" text, "5_utr_splice" text, "coding" text, "3_utr_sequence" text, "gen_bank_id" text ); Question: Which coding entry has a 3'utr sequence of 1a 0 and a 5'utr splice that is abd? <|assistant|> SELECT "coding" FROM "sftpa2_m_rna_transcript_variants" WHERE "3_utr_sequence"='1a 0' AND "5_utr_splice"='abd';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sftpa2_m_rna_transcript_variants" ( "variant_id" text, "5_utr_splice" text, "coding" text, "3_utr_sequence" text, "gen_bank_id" text ); Question: Which genbank id has a 5'utr splice of abd and a variant id that is abd1a 3? <|assistant|> SELECT "gen_bank_id" FROM "sftpa2_m_rna_transcript_variants" WHERE "5_utr_splice"='abd' AND "variant_id"='abd1a 3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "g" ( "player" text, "nationality" text, "position" text, "years_in_orlando" text, "school_club_team" text ); Question: What year did Orlando have a School/Club team in Clemson? <|assistant|> SELECT "years_in_orlando" FROM "g" WHERE "school_club_team"='clemson';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "g" ( "player" text, "nationality" text, "position" text, "years_in_orlando" text, "school_club_team" text ); Question: What years did the player in Orlando play that is from the United States, and is part of the school/club team Clemson? <|assistant|> SELECT "years_in_orlando" FROM "g" WHERE "nationality"='united states' AND "school_club_team"='clemson';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "g" ( "player" text, "nationality" text, "position" text, "years_in_orlando" text, "school_club_team" text ); Question: Who is the player for the School/Club team in Georgia? <|assistant|> SELECT "player" FROM "g" WHERE "school_club_team"='georgia';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "g" ( "player" text, "nationality" text, "position" text, "years_in_orlando" text, "school_club_team" text ); Question: What was the nationality of the player Pat Garrity? <|assistant|> SELECT "nationality" FROM "g" WHERE "player"='pat garrity';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "g" ( "player" text, "nationality" text, "position" text, "years_in_orlando" text, "school_club_team" text ); Question: What is the nationality of the School/Club team of Louisville? <|assistant|> SELECT "nationality" FROM "g" WHERE "school_club_team"='louisville';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "wins" ( "driver" text, "wins" real, "starts" real, "sprint" real, "feature" real ); Question: How many features did Adam Carroll win 6 times when the start was larger than 32? <|assistant|> SELECT COUNT("feature") FROM "wins" WHERE "wins"=6 AND "driver"='adam carroll' AND "starts">32;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "wins" ( "driver" text, "wins" real, "starts" real, "sprint" real, "feature" real ); Question: What is the lowest feature with 2 wins and 2 sprints? <|assistant|> SELECT MIN("feature") FROM "wins" WHERE "wins"=2 AND "sprint"=2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "wins" ( "driver" text, "wins" real, "starts" real, "sprint" real, "feature" real ); Question: How many sprints on average had 10 wins and less than 5 features? <|assistant|> SELECT AVG("sprint") FROM "wins" WHERE "wins"=10 AND "feature"<5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final" ( "lane" real, "name" text, "country" text, "mark" text, "react" real ); Question: Which country has a lane greater than 6 and a mark of 6.63? <|assistant|> SELECT "country" FROM "final" WHERE "lane">6 AND "mark"='6.63';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final" ( "lane" real, "name" text, "country" text, "mark" text, "react" real ); Question: What is the lowest lane for Nigeria, with a react less than 0.133? <|assistant|> SELECT MIN("lane") FROM "final" WHERE "country"='nigeria' AND "react"<0.133;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final" ( "lane" real, "name" text, "country" text, "mark" text, "react" real ); Question: What is the mark for Kim Collins? <|assistant|> SELECT "mark" FROM "final" WHERE "name"='kim collins';<|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: Which country had 1 Bronze, 1 Silver, with a total of 3 medals? <|assistant|> SELECT "nation" FROM "medal_table" WHERE "bronze"=1 AND "total"=3 AND "silver"=1;<|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: Which country had more than 2 silvers and less than 4 golds? <|assistant|> SELECT "nation" FROM "medal_table" WHERE "silver">2 AND "gold"<4;<|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's the average bronze with a total number of medals being 1, with more than 0 silvers? <|assistant|> SELECT AVG("bronze") FROM "medal_table" WHERE "total"=1 AND "silver">0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "career_summary" ( "season" text, "series" text, "team_name" text, "races" real, "poles" real, "wins" real, "points" text, "final_placing" text ); Question: In the 2005 season, how many races did the 15th place team complete? <|assistant|> SELECT AVG("races") FROM "career_summary" WHERE "final_placing"='15th' AND "season"='2005';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "career_summary" ( "season" text, "series" text, "team_name" text, "races" real, "poles" real, "wins" real, "points" text, "final_placing" text ); Question: Which team completed 10 races? <|assistant|> SELECT "team_name" FROM "career_summary" WHERE "races"=10;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_1" ( "pick" real, "player" text, "country_of_origin" text, "pba_team" text, "college" text ); Question: What is the PBA team with a Pick that is 4? <|assistant|> SELECT "pba_team" FROM "round_1" WHERE "pick"=4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "round_1" ( "pick" real, "player" text, "country_of_origin" text, "pba_team" text, "college" text ); Question: What is the Player with a Pick that is 6? <|assistant|> SELECT "player" FROM "round_1" WHERE "pick"=6;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medals_table" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: How many totals have 1 gold and a rank smaller than 2? <|assistant|> SELECT COUNT("total") FROM "medals_table" WHERE "gold"=1 AND "rank"<2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medals_table" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: How much gold did South Korea get? <|assistant|> SELECT SUM("gold") FROM "medals_table" WHERE "nation"='south korea';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "united_kingdom" ( "built" real, "number" real, "type" text, "slm_number" real, "wheel_arrangement" text, "location" text, "notes" text ); Question: What locomotive built after 1895 has the highest SLM number? <|assistant|> SELECT MAX("slm_number") FROM "united_kingdom" WHERE "built">1895;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "united_kingdom" ( "built" real, "number" real, "type" text, "slm_number" real, "wheel_arrangement" text, "location" text, "notes" text ); Question: Which type of locomotive was built in 1923? <|assistant|> SELECT "type" FROM "united_kingdom" WHERE "built"=1923;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "united_kingdom" ( "built" real, "number" real, "type" text, "slm_number" real, "wheel_arrangement" text, "location" text, "notes" text ); Question: What is the first locomotive that has a SLM number lower than 924? <|assistant|> SELECT MIN("number") FROM "united_kingdom" WHERE "slm_number"<924;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1972_isle_of_man_lightweight_tt_250cc_fi" ( "place" real, "rider" text, "country" text, "machine" text, "speed" text, "time" text, "points" real ); Question: When the United Kingdom had a time of 1:30.51.2, what was the lowest that they ranked? <|assistant|> SELECT MIN("place") FROM "1972_isle_of_man_lightweight_tt_250cc_fi" WHERE "country"='united kingdom' AND "time"='1:30.51.2';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1972_isle_of_man_lightweight_tt_250cc_fi" ( "place" real, "rider" text, "country" text, "machine" text, "speed" text, "time" text, "points" real ); Question: What County scored with a speed of 98.09mph? <|assistant|> SELECT "country" FROM "1972_isle_of_man_lightweight_tt_250cc_fi" WHERE "speed"='98.09mph';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results_pool_e" ( "date" text, "score" text, "set_1" text, "set_2" text, "set_3" text, "set_4" text, "set_5" text, "total" text ); Question: What is Set 4, when Date is Jun 27, and when Set 3 is 17-25? <|assistant|> SELECT "set_4" FROM "results_pool_e" WHERE "date"='jun 27' AND "set_3"='17-25';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results_pool_e" ( "date" text, "score" text, "set_1" text, "set_2" text, "set_3" text, "set_4" text, "set_5" text, "total" text ); Question: What is Score, when Set 3 is 17-25? <|assistant|> SELECT "score" FROM "results_pool_e" WHERE "set_3"='17-25';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results_pool_e" ( "date" text, "score" text, "set_1" text, "set_2" text, "set_3" text, "set_4" text, "set_5" text, "total" text ); Question: What is Set 5, when Date is Jun 26, and when Set 2 is 25-22? <|assistant|> SELECT "set_5" FROM "results_pool_e" WHERE "date"='jun 26' AND "set_2"='25-22';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results_pool_e" ( "date" text, "score" text, "set_1" text, "set_2" text, "set_3" text, "set_4" text, "set_5" text, "total" text ); Question: What is Set 1, when Set 3 is 22-25? <|assistant|> SELECT "set_1" FROM "results_pool_e" WHERE "set_3"='22-25';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results_pool_e" ( "date" text, "score" text, "set_1" text, "set_2" text, "set_3" text, "set_4" text, "set_5" text, "total" text ); Question: What is Set 1, when Date is Jun 26, and when Set 4 is 26-24? <|assistant|> SELECT "set_1" FROM "results_pool_e" WHERE "date"='jun 26' AND "set_4"='26-24';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results_pool_e" ( "date" text, "score" text, "set_1" text, "set_2" text, "set_3" text, "set_4" text, "set_5" text, "total" text ); Question: What is Set 4, when Set 5 is NA, and when Set 3 is 19-25? <|assistant|> SELECT "set_4" FROM "results_pool_e" WHERE "set_5"='na' AND "set_3"='19-25';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners" ( "year" real, "country" text, "team" text, "individual" text, "location" text ); Question: What is the Team when the match was in buenos aires , argentina? <|assistant|> SELECT "team" FROM "winners" WHERE "location"='buenos aires , argentina';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners" ( "year" real, "country" text, "team" text, "individual" text, "location" text ); Question: What is the Location when the team was seve ballesteros & manuel piñero? <|assistant|> SELECT "location" FROM "winners" WHERE "team"='seve ballesteros & manuel piñero';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners" ( "year" real, "country" text, "team" text, "individual" text, "location" text ); Question: What is the Location when the individual was josé maria cañizares? <|assistant|> SELECT "location" FROM "winners" WHERE "individual"='josé maria cañizares';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "winners" ( "year" real, "country" text, "team" text, "individual" text, "location" text ); Question: What is the highest Year when the team was seve ballesteros & manuel piñero? <|assistant|> SELECT MAX("year") FROM "winners" WHERE "team"='seve ballesteros & manuel piñero';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "closed_landfills" ( "landfill" text, "location" text, "acres" real, "opened" real, "capacity" text, "status" text, "rehab_period" text ); Question: What is the total number of acres at Sai Tso Wan, opening before 1978? <|assistant|> SELECT COUNT("acres") FROM "closed_landfills" WHERE "landfill"='sai tso wan' AND "opened"<1978;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_top_association_football_goal_sc" ( "rank" real, "name" text, "years" text, "matches" real, "goals" real ); Question: Which Rank has a Goals smaller than 76, and a Matches larger than 270? <|assistant|> SELECT SUM("rank") FROM "list_of_top_association_football_goal_sc" WHERE "goals"<76 AND "matches">270;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_top_association_football_goal_sc" ( "rank" real, "name" text, "years" text, "matches" real, "goals" real ); Question: Which Matches have a Rank smaller than 5, a Years of 1995–2003, and a Goals smaller than 104? <|assistant|> SELECT AVG("matches") FROM "list_of_top_association_football_goal_sc" WHERE "rank"<5 AND "years"='1995–2003' AND "goals"<104;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_top_association_football_goal_sc" ( "rank" real, "name" text, "years" text, "matches" real, "goals" real ); Question: Which Goals have a Name of lee dong-gook? <|assistant|> SELECT MAX("goals") FROM "list_of_top_association_football_goal_sc" WHERE "name"='lee dong-gook';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_top_association_football_goal_sc" ( "rank" real, "name" text, "years" text, "matches" real, "goals" real ); Question: Which Rank has a Years of 1998–present? <|assistant|> SELECT AVG("rank") FROM "list_of_top_association_football_goal_sc" WHERE "years"='1998–present';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_top_association_football_goal_sc" ( "rank" real, "name" text, "years" text, "matches" real, "goals" real ); Question: Which Matches have a Rank of 2? <|assistant|> SELECT COUNT("matches") FROM "list_of_top_association_football_goal_sc" WHERE "rank"=2;<|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, "event" text, "notes" text ); Question: What Position was achieved in the World Championships Competition in Tokyo, Japan? <|assistant|> SELECT "position" FROM "achievements" WHERE "competition"='world championships' AND "venue"='tokyo, japan';<|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, "event" text, "notes" text ); Question: Which Competition was 1st Position with 57.03 in Notes? <|assistant|> SELECT "competition" FROM "achievements" WHERE "position"='1st' AND "notes"='57.03';<|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, "event" text, "notes" text ); Question: What is the earliest Year for 400m h Event with 54.86 in Notes? <|assistant|> SELECT MIN("year") FROM "achievements" WHERE "event"='400m h' AND "notes"='54.86';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "top_goal_scorers" ( "place" real, "scorer" text, "goals" real, "appearances" real, "team" text ); Question: What is the total number of appearances for players from Chaux-de-Fonds with places over 8? <|assistant|> SELECT COUNT("appearances") FROM "top_goal_scorers" WHERE "team"='chaux-de-fonds' AND "place">8;<|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, "location" text, "attendance" text ); Question: What is the highest week of the game on November 9, 1997? <|assistant|> SELECT MAX("week") FROM "schedule" WHERE "date"='november 9, 1997';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "numerals" ( "number" text, "proto_austronesian" text, "proto_malayo_polynesian" text, "proto_oceanic" text, "proto_polynesian" text ); Question: Which Proto-Austronesian has a Proto-Oceanic of *lima? <|assistant|> SELECT "proto_austronesian" FROM "numerals" WHERE "proto_oceanic"='*lima';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "numerals" ( "number" text, "proto_austronesian" text, "proto_malayo_polynesian" text, "proto_oceanic" text, "proto_polynesian" text ); Question: Which Proto-Oceanic has a Proto-Polynesian of *lima? <|assistant|> SELECT "proto_oceanic" FROM "numerals" WHERE "proto_polynesian"='*lima';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "numerals" ( "number" text, "proto_austronesian" text, "proto_malayo_polynesian" text, "proto_oceanic" text, "proto_polynesian" text ); Question: Which Number has a Proto-Polynesian of *taha? <|assistant|> SELECT "number" FROM "numerals" WHERE "proto_polynesian"='*taha';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "numerals" ( "number" text, "proto_austronesian" text, "proto_malayo_polynesian" text, "proto_oceanic" text, "proto_polynesian" text ); Question: WHich Proto-Polynesian has a Number of five? <|assistant|> SELECT "proto_polynesian" FROM "numerals" WHERE "number"='five';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "numerals" ( "number" text, "proto_austronesian" text, "proto_malayo_polynesian" text, "proto_oceanic" text, "proto_polynesian" text ); Question: Which Proto-Polynesian has a Proto-Malayo-Polynesian of *telu? <|assistant|> SELECT "proto_polynesian" FROM "numerals" WHERE "proto_malayo_polynesian"='*telu';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "numerals" ( "number" text, "proto_austronesian" text, "proto_malayo_polynesian" text, "proto_oceanic" text, "proto_polynesian" text ); Question: Which Proto-Oceanic has a Proto-Polynesian of *lima? <|assistant|> SELECT "proto_oceanic" FROM "numerals" WHERE "proto_polynesian"='*lima';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "number_of_participants_per_year_and_coun" ( "country" text, "1997" real, "1998" real, "1999" real, "2000" real, "2001" real, "2002" real, "2003" real, "2004" real, "2005" real, "2006" real, "2007" real, "2008" real, "2009" real, "2010" real, "2011" real, "2012" real, "total" real ); Question: How many countries in 2009 have fewer than 1 in 1999, more than 0 in 2006 and none in 1997? <|assistant|> SELECT COUNT("2009") FROM "number_of_participants_per_year_and_coun" WHERE "1999"<1 AND "2006">0 AND "1997"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "number_of_participants_per_year_and_coun" ( "country" text, "1997" real, "1998" real, "1999" real, "2000" real, "2001" real, "2002" real, "2003" real, "2004" real, "2005" real, "2006" real, "2007" real, "2008" real, "2009" real, "2010" real, "2011" real, "2012" real, "total" real ); Question: How much is the highest number in 2006 with fewer than 0 in 2002? <|assistant|> SELECT MAX("2006") FROM "number_of_participants_per_year_and_coun" WHERE "2002"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "number_of_participants_per_year_and_coun" ( "country" text, "1997" real, "1998" real, "1999" real, "2000" real, "2001" real, "2002" real, "2003" real, "2004" real, "2005" real, "2006" real, "2007" real, "2008" real, "2009" real, "2010" real, "2011" real, "2012" real, "total" real ); Question: How many are there in 2003 that have 0 in 2001, more than 0 in 2009 and fewer than 0 in 1999? <|assistant|> SELECT SUM("2003") FROM "number_of_participants_per_year_and_coun" WHERE "2001"=0 AND "2009">0 AND "1999"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "number_of_participants_per_year_and_coun" ( "country" text, "1997" real, "1998" real, "1999" real, "2000" real, "2001" real, "2002" real, "2003" real, "2004" real, "2005" real, "2006" real, "2007" real, "2008" real, "2009" real, "2010" real, "2011" real, "2012" real, "total" real ); Question: Which country has more than 0 in 2012 and 2009, 0 in 2008 and more than 0 in 2004? <|assistant|> SELECT "country" FROM "number_of_participants_per_year_and_coun" WHERE "2012">0 AND "2009">0 AND "2008"=0 AND "2004">0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "recent_government_budget_balances" ( "year" real, "income" real, "expenditure" real, "surplus_deficit" text, "pct_gdp" text ); Question: Which % GDP has an Expenditure larger than 50.9, and a Year larger than 2009, and an Income of 39.3? <|assistant|> SELECT "pct_gdp" FROM "recent_government_budget_balances" WHERE "expenditure">50.9 AND "year">2009 AND "income"=39.3;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "recent_government_budget_balances" ( "year" real, "income" real, "expenditure" real, "surplus_deficit" text, "pct_gdp" text ); Question: Which Year has an Expenditure smaller than 41.3, and a % GDP of x, and an Income larger than 34.4? <|assistant|> SELECT SUM("year") FROM "recent_government_budget_balances" WHERE "expenditure"<41.3 AND "pct_gdp"='x' AND "income">34.4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "recent_government_budget_balances" ( "year" real, "income" real, "expenditure" real, "surplus_deficit" text, "pct_gdp" text ); Question: Which Surplus(Deficit) has an Expenditure larger than 45.8, and a Year smaller than 2011, and a % GDP of (0.9%)? <|assistant|> SELECT "surplus_deficit" FROM "recent_government_budget_balances" WHERE "expenditure">45.8 AND "year"<2011 AND "pct_gdp"='(0.9%)';<|endoftext|>