text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1980_packers_draft_selections" ( "round" real, "overall" real, "player" text, "position" text, "college" text ); Question: Who is the athlete who was picked before round 9, had an overall draft pick after number 143 and plays the position of db? <|assistant|> SELECT "player" FROM "1980_packers_draft_selections" WHERE "round"<9 AND "overall">143 AND "position"='db';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "atlanta_falcons_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: What is the highest round of the player with an overall of 152? <|assistant|> SELECT MAX("round") FROM "atlanta_falcons_draft_history" WHERE "overall"=152;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "atlanta_falcons_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: What is the average round of the defensive back player with a pick # greater than 5 and an overall less than 152? <|assistant|> SELECT AVG("round") FROM "atlanta_falcons_draft_history" WHERE "pick_num">5 AND "position"='defensive back' AND "overall"<152;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "atlanta_falcons_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: What is the average overall of John Ayres, who had a pick # greater than 4? <|assistant|> SELECT AVG("overall") FROM "atlanta_falcons_draft_history" WHERE "name"='john ayres' AND "pick_num">4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "atlanta_falcons_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: What is the name of the player with a pick # less than 5 and an overall of 284? <|assistant|> SELECT "name" FROM "atlanta_falcons_draft_history" WHERE "pick_num"<5 AND "overall"=284;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "atlanta_falcons_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: What is the average overall of Ken Whisenhunt, who has a pick # of 5? <|assistant|> SELECT AVG("overall") FROM "atlanta_falcons_draft_history" WHERE "pick_num"=5 AND "name"='ken whisenhunt';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "atlanta_falcons_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: What is the lowest pick # of John Ayres? <|assistant|> SELECT MIN("pick_num") FROM "atlanta_falcons_draft_history" WHERE "name"='john ayres';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "manner_of_departure" text, "date_of_vacancy" text, "last_match" text, "replaced_by" text ); Question: What is the name of team with Palmeiras 4-2 portuguesa as the last match? <|assistant|> SELECT "team" FROM "managerial_changes" WHERE "last_match"='palmeiras 4-2 portuguesa';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "manner_of_departure" text, "date_of_vacancy" text, "last_match" text, "replaced_by" text ); Question: What was the manner of departure replaced by tita? <|assistant|> SELECT "manner_of_departure" FROM "managerial_changes" WHERE "replaced_by"='tita';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "manner_of_departure" text, "date_of_vacancy" text, "last_match" text, "replaced_by" text ); Question: What is the name of the last match that had a sacked manner of departure and a geninho outgoing manner? <|assistant|> SELECT "last_match" FROM "managerial_changes" WHERE "manner_of_departure"='sacked' AND "outgoing_manager"='geninho';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "manner_of_departure" text, "date_of_vacancy" text, "last_match" text, "replaced_by" text ); Question: What is the last match with a vacancy date of round 2 and Ney Franco as outgoing manager? <|assistant|> SELECT "last_match" FROM "managerial_changes" WHERE "date_of_vacancy"='round 2' AND "outgoing_manager"='ney franco';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "manner_of_departure" text, "date_of_vacancy" text, "last_match" text, "replaced_by" text ); Question: What is the last match with a resigned manner of departure and a round 1 date of vacancy? <|assistant|> SELECT "last_match" FROM "managerial_changes" WHERE "manner_of_departure"='resigned' AND "date_of_vacancy"='round 1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "see_also" ( "volume_issue" text, "issue_date_s" text, "weeks_on_top" real, "song" text, "artist" text ); Question: What was the issue date for the single with a Volume:Issue of 47:8-9? <|assistant|> SELECT "issue_date_s" FROM "see_also" WHERE "volume_issue"='47:8-9';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "passing" ( "name" text, "gp_gs" text, "effic" real, "att_cmp_int" text, "avg_g" real ); Question: What is the highest effic with an avg/g of 91.9? <|assistant|> SELECT MAX("effic") FROM "passing" WHERE "avg_g"=91.9;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "passing" ( "name" text, "gp_gs" text, "effic" real, "att_cmp_int" text, "avg_g" real ); Question: What is the att-cmp-int with an effic smaller than 117.88 and a gp-gs of 10-0? <|assistant|> SELECT "att_cmp_int" FROM "passing" WHERE "effic"<117.88 AND "gp_gs"='10-0';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "passing" ( "name" text, "gp_gs" text, "effic" real, "att_cmp_int" text, "avg_g" real ); Question: What is the sum avg/g with an effic of 858.4? <|assistant|> SELECT SUM("avg_g") FROM "passing" WHERE "effic"=858.4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indiana_high_school_athletics_conference" ( "school" text, "mascot" text, "location" text, "enrollment" real, "ihsaa_class" text, "ihsaa_football_class" text, "county" text ); Question: What is the mascot for the school in 32 Hendricks County? <|assistant|> SELECT "mascot" FROM "indiana_high_school_athletics_conference" WHERE "county"='32 hendricks';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indiana_high_school_athletics_conference" ( "school" text, "mascot" text, "location" text, "enrollment" real, "ihsaa_class" text, "ihsaa_football_class" text, "county" text ); Question: What is the mascot for the school with a student body larger than 2,191 in Noblesville? <|assistant|> SELECT "mascot" FROM "indiana_high_school_athletics_conference" WHERE "enrollment">'2,191' AND "school"='noblesville';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indiana_high_school_athletics_conference" ( "school" text, "mascot" text, "location" text, "enrollment" real, "ihsaa_class" text, "ihsaa_football_class" text, "county" text ); Question: Where is Lafayette T. Jefferson School in 79 Tippecanoe county? <|assistant|> SELECT "location" FROM "indiana_high_school_athletics_conference" WHERE "county"='79 tippecanoe' AND "school"='lafayette t. jefferson';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indiana_high_school_athletics_conference" ( "school" text, "mascot" text, "location" text, "enrollment" real, "ihsaa_class" text, "ihsaa_football_class" text, "county" text ); Question: Where is the school with Royals as their mascot? <|assistant|> SELECT "location" FROM "indiana_high_school_athletics_conference" WHERE "mascot"='royals';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "visitor" text, "score" text, "home" text, "record" text ); Question: What was the score for the game on February 12? <|assistant|> SELECT "score" FROM "game_log" WHERE "date"='february 12';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "visitor" text, "score" text, "home" text, "record" text ); Question: What was the score for the game on February 29? <|assistant|> SELECT "score" FROM "game_log" WHERE "date"='february 29';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "visitor" text, "score" text, "home" text, "record" text ); Question: Where was the home team in the game played against Chicago? <|assistant|> SELECT "home" FROM "game_log" WHERE "visitor"='chicago';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "fcs_regional_championship_games" ( "season" real, "game" text, "record" text, "opponent" text, "score" text, "result" text ); Question: Which Season has a Game of fcs midwest region, and a Score of 40-33? <|assistant|> SELECT MAX("season") FROM "fcs_regional_championship_games" WHERE "game"='fcs midwest region' AND "score"='40-33';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "fcs_regional_championship_games" ( "season" real, "game" text, "record" text, "opponent" text, "score" text, "result" text ); Question: Which Game has a Result of win, and an Opponent of new hampshire, and a Season smaller than 2008? <|assistant|> SELECT "game" FROM "fcs_regional_championship_games" WHERE "result"='win' AND "opponent"='new hampshire' AND "season"<2008;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "fcs_regional_championship_games" ( "season" real, "game" text, "record" text, "opponent" text, "score" text, "result" text ); Question: Which Season has a Score of 39-27? <|assistant|> SELECT MAX("season") FROM "fcs_regional_championship_games" WHERE "score"='39-27';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "international_goals" ( "goal" real, "date" text, "venue" text, "score" text, "result" text, "competition" text ); Question: What result has a goal of 5? <|assistant|> SELECT "result" FROM "international_goals" WHERE "goal"=5;<|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's the record on May 25? <|assistant|> SELECT "record" FROM "game_log" WHERE "date"='may 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" real, "record" text ); Question: What's greatest attendance on May 7? <|assistant|> SELECT MAX("attendance") FROM "game_log" WHERE "date"='may 7';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "game" real, "january" real, "opponent" text, "score" text, "record" text, "points" real ); Question: Which January has a Record of 28–14–8? <|assistant|> SELECT "january" FROM "regular_season" WHERE "record"='28–14–8';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "game" real, "january" real, "opponent" text, "score" text, "record" text, "points" real ); Question: Which Points is the highest one that has a Game smaller than 43, and a January larger than 8? <|assistant|> SELECT MAX("points") FROM "regular_season" WHERE "game"<43 AND "january">8;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "motorcycle_grand_prix_results" ( "year" real, "class" text, "team" text, "points" real, "wins" real ); Question: What is the mean number of wins for the norton team in 1966, when there are 8 points? <|assistant|> SELECT AVG("wins") FROM "motorcycle_grand_prix_results" WHERE "team"='norton' AND "year"=1966 AND "points"=8;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "motorcycle_grand_prix_results" ( "year" real, "class" text, "team" text, "points" real, "wins" real ); Question: What is the most recent year for the ajs team when there are fewer than 0 wins? <|assistant|> SELECT MAX("year") FROM "motorcycle_grand_prix_results" WHERE "team"='ajs' AND "wins"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "motorcycle_grand_prix_results" ( "year" real, "class" text, "team" text, "points" real, "wins" real ); Question: What is the smallest point amount for years prior to 1958 when the class is 350cc? <|assistant|> SELECT MIN("points") FROM "motorcycle_grand_prix_results" WHERE "year"<1958 AND "class"='350cc';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "motorcycle_grand_prix_results" ( "year" real, "class" text, "team" text, "points" real, "wins" real ); Question: What is the largest amount of wins when there are less than 5 points, the class is 500cc, the team is norton, and the year is more recent than 1955? <|assistant|> SELECT MAX("wins") FROM "motorcycle_grand_prix_results" WHERE "points"<5 AND "class"='500cc' AND "team"='norton' AND "year">1955;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "ftops_main_event_winners" ( "series" text, "date" text, "entrants" real, "winner" text, "first_prize" text ); Question: What was the first prize for the FTOPS XIII series with more than 5,291 entrants? <|assistant|> SELECT "first_prize" FROM "ftops_main_event_winners" WHERE "entrants">'5,291' AND "series"='ftops xiii';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "ftops_main_event_winners" ( "series" text, "date" text, "entrants" real, "winner" text, "first_prize" text ); Question: When was the game that had a first prize of $161,480? <|assistant|> SELECT "date" FROM "ftops_main_event_winners" WHERE "first_prize"='$161,480';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "ftops_main_event_winners" ( "series" text, "date" text, "entrants" real, "winner" text, "first_prize" text ); Question: Who won on May 2011? <|assistant|> SELECT "winner" FROM "ftops_main_event_winners" WHERE "date"='may 2011';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "classification_leadership" ( "stage" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text ); Question: What is the general classification with a 13 stage? <|assistant|> SELECT "general_classification" FROM "classification_leadership" WHERE "stage"='13';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "classification_leadership" ( "stage" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text ); Question: What is teh stage with Daniele Bennati as the points classification and Giovanni VIsconti as the general classification? <|assistant|> SELECT "stage" FROM "classification_leadership" WHERE "points_classification"='daniele bennati' AND "general_classification"='giovanni visconti';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "classification_leadership" ( "stage" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text ); Question: What is the general classification of the stage 3 with Daniele Bennati as the points classification and Morris Possoni as the young rider classification. <|assistant|> SELECT "general_classification" FROM "classification_leadership" WHERE "points_classification"='daniele bennati' AND "young_rider_classification"='morris possoni' AND "stage"='3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "classification_leadership" ( "stage" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text ); Question: What is the general classification with riccardo riccò as the young rider classification? <|assistant|> SELECT "general_classification" FROM "classification_leadership" WHERE "young_rider_classification"='riccardo riccò';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "classification_leadership" ( "stage" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text ); Question: What is the point classification with chris anker sørensen as the young rider classification and Christian vande velde as the general classification? <|assistant|> SELECT "points_classification" FROM "classification_leadership" WHERE "young_rider_classification"='chris anker sørensen' AND "general_classification"='christian vande velde';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "classification_leadership" ( "stage" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text ); Question: What is the point classification of stage 15? <|assistant|> SELECT "points_classification" FROM "classification_leadership" WHERE "stage"='15';<|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, "game_site" text, "attendance" real ); Question: what week number was at memorial stadium? <|assistant|> SELECT AVG("week") FROM "schedule" WHERE "game_site"='memorial stadium';<|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, "game_site" text, "attendance" real ); Question: before week 12 what was the attendance on 1983-11-21? <|assistant|> SELECT SUM("attendance") FROM "schedule" WHERE "date"='1983-11-21' AND "week"<12;<|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, "game_site" text, "attendance" real ); Question: on week 16, what was the lowest attendance? <|assistant|> SELECT MIN("attendance") FROM "schedule" WHERE "week"=16;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "past_winners" ( "year" real, "men_s_singles" text, "women_s_singles" text, "men_s_doubles" text, "women_s_doubles" text, "mixed_doubles" text ); Question: Who won the women's doubles when andrey antropov won the men's singles and marina yakusheva won the womens' singles? <|assistant|> SELECT "women_s_doubles" FROM "past_winners" WHERE "men_s_singles"='andrey antropov' AND "women_s_singles"='marina yakusheva';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "lpga_event" ( "year" real, "date" text, "venue" text, "champion" text, "country" text, "score" real, "to_par" text, "margin_of_victory" text, "purse" real, "winner_s_share" real ); Question: At what venue is the margin of victory 7 strokes? <|assistant|> SELECT "venue" FROM "lpga_event" WHERE "margin_of_victory"='7 strokes';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "lpga_event" ( "year" real, "date" text, "venue" text, "champion" text, "country" text, "score" real, "to_par" text, "margin_of_victory" text, "purse" real, "winner_s_share" real ); Question: What was the purse when Sherri Steinhauer was champion at Woburn Golf and Country Club? <|assistant|> SELECT COUNT("purse") FROM "lpga_event" WHERE "champion"='sherri steinhauer' AND "venue"='woburn golf and country club';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "first_team" ( "exit_date" text, "pos" text, "player" text, "to_club" text, "transfer_fee" text ); Question: What is the exit date of the player who transferred to Cardiff City? <|assistant|> SELECT "exit_date" FROM "first_team" WHERE "to_club"='cardiff city';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "first_team" ( "exit_date" text, "pos" text, "player" text, "to_club" text, "transfer_fee" text ); Question: What is the exit date of the player who transferred to Portsmouth? <|assistant|> SELECT "exit_date" FROM "first_team" WHERE "to_club"='portsmouth';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "first_team" ( "exit_date" text, "pos" text, "player" text, "to_club" text, "transfer_fee" text ); Question: Which player has a position of FW? <|assistant|> SELECT "player" FROM "first_team" WHERE "pos"='fw';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "repeaters" ( "call_sign" text, "frequency_m_hz" text, "city_of_license" text, "erp_w" real, "fcc_info" text ); Question: Which Frequency MHz has an ERP W larger than 4, and a Call sign of w218ap? <|assistant|> SELECT "frequency_m_hz" FROM "repeaters" WHERE "erp_w">4 AND "call_sign"='w218ap';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "repeaters" ( "call_sign" text, "frequency_m_hz" text, "city_of_license" text, "erp_w" real, "fcc_info" text ); Question: Which City of license has a Frequency MHz of 91.5 fm? <|assistant|> SELECT "city_of_license" FROM "repeaters" WHERE "frequency_m_hz"='91.5 fm';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "repeaters" ( "call_sign" text, "frequency_m_hz" text, "city_of_license" text, "erp_w" real, "fcc_info" text ); Question: Which City of license has a Call sign of w220ba? <|assistant|> SELECT "city_of_license" FROM "repeaters" WHERE "call_sign"='w220ba';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "repeaters" ( "call_sign" text, "frequency_m_hz" text, "city_of_license" text, "erp_w" real, "fcc_info" text ); Question: Which ERP W has a Frequency MHz of 89.3 fm? <|assistant|> SELECT MAX("erp_w") FROM "repeaters" WHERE "frequency_m_hz"='89.3 fm';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "leaders" ( "rank" real, "player" text, "country" text, "earnings" real, "wins" real ); Question: How many wins does a player who have $7,188,408 earnings with lower than rank 5? <|assistant|> SELECT MIN("wins") FROM "leaders" WHERE "earnings"='7,188,408' AND "rank">5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "leaders" ( "rank" real, "player" text, "country" text, "earnings" real, "wins" real ); Question: How many wins does Greg Norman have? <|assistant|> SELECT SUM("wins") FROM "leaders" WHERE "player"='greg norman';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "campeonato_brasileiro_s_rie_a" ( "position" real, "team" text, "points" real, "played" real, "won_by_2_or_more_goals_difference" real, "drawn" real, "lost" real, "against" real, "difference" text ); Question: What is the lowest number played with a position of 6 and less than 1 draw? <|assistant|> SELECT MIN("played") FROM "campeonato_brasileiro_s_rie_a" WHERE "position"=6 AND "drawn"<1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "campeonato_brasileiro_s_rie_a" ( "position" real, "team" text, "points" real, "played" real, "won_by_2_or_more_goals_difference" real, "drawn" real, "lost" real, "against" real, "difference" text ); Question: What is the highest against value for Palmeiras and position less than 4? <|assistant|> SELECT MAX("against") FROM "campeonato_brasileiro_s_rie_a" WHERE "team"='palmeiras' AND "position"<4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "campeonato_brasileiro_s_rie_a" ( "position" real, "team" text, "points" real, "played" real, "won_by_2_or_more_goals_difference" real, "drawn" real, "lost" real, "against" real, "difference" text ); Question: What is the highest number played with more than 2 lost for Palmeiras and less than 1 draw? <|assistant|> SELECT MAX("played") FROM "campeonato_brasileiro_s_rie_a" WHERE "lost">2 AND "team"='palmeiras' AND "drawn"<1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "campeonato_brasileiro_s_rie_a" ( "position" real, "team" text, "points" real, "played" real, "won_by_2_or_more_goals_difference" real, "drawn" real, "lost" real, "against" real, "difference" text ); Question: What is the average number lost when the against value is less than 5? <|assistant|> SELECT AVG("lost") FROM "campeonato_brasileiro_s_rie_a" WHERE "against"<5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "campeonato_brasileiro_s_rie_a" ( "position" real, "team" text, "points" real, "played" real, "won_by_2_or_more_goals_difference" real, "drawn" real, "lost" real, "against" real, "difference" text ); Question: How many values for a win by 2 or more goals correspond to a difference of 2, more than 9 points, and the America-RJ team when more than 7 are played? <|assistant|> SELECT COUNT("won_by_2_or_more_goals_difference") FROM "campeonato_brasileiro_s_rie_a" WHERE "difference"='2' AND "points">9 AND "team"='america-rj' AND "played">7;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "national_structure_of_the_population_in_" ( "year_of_census" real, "total" real, "croats" text, "serbs" text, "others" text ); Question: What is the average total of the census after 1971 with 10,412 (32.88%) Serbs? <|assistant|> SELECT AVG("total") FROM "national_structure_of_the_population_in_" WHERE "year_of_census">1971 AND "serbs"='10,412 (32.88%)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nfl_draft" ( "round" real, "pick" real, "player" text, "position" text, "school_club_team" text ); Question: what is the school that hosts jim goodman <|assistant|> SELECT "school_club_team" FROM "nfl_draft" WHERE "player"='jim goodman';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_6" ( "date" text, "tournament" text, "surface" text, "opponen" text, "score" text ); Question: Which Surface has a Date of january 2, 2006? <|assistant|> SELECT "surface" FROM "singles_6" WHERE "date"='january 2, 2006';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_6" ( "date" text, "tournament" text, "surface" text, "opponen" text, "score" text ); Question: Which tournament happened on september 25, 2006? <|assistant|> SELECT "tournament" FROM "singles_6" WHERE "date"='september 25, 2006';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_6" ( "date" text, "tournament" text, "surface" text, "opponen" text, "score" text ); Question: When did joão souza play? <|assistant|> SELECT "date" FROM "singles_6" WHERE "opponen"='joão souza';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_6" ( "date" text, "tournament" text, "surface" text, "opponen" text, "score" text ); Question: Which Surface has a Score of 7–5, 6–4? <|assistant|> SELECT "surface" FROM "singles_6" WHERE "score"='7–5, 6–4';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "top_nfl_draft_selections" ( "player" text, "position" text, "overall_pick" real, "round" text, "nfl_draft" real, "franchise" text ); Question: What is the highest NFL Draft that has jeff robinson as the player, with an overall pick less than 98? <|assistant|> SELECT MAX("nfl_draft") FROM "top_nfl_draft_selections" WHERE "player"='jeff robinson' AND "overall_pick"<98;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "top_nfl_draft_selections" ( "player" text, "position" text, "overall_pick" real, "round" text, "nfl_draft" real, "franchise" text ); Question: What position has 1958 as the NFL Draft, and jerry kramer as the player? <|assistant|> SELECT "position" FROM "top_nfl_draft_selections" WHERE "nfl_draft"=1958 AND "player"='jerry kramer';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "top_nfl_draft_selections" ( "player" text, "position" text, "overall_pick" real, "round" text, "nfl_draft" real, "franchise" text ); Question: What is the highest overall pick that has c as the position, with an NFL Draft greater than 1977? <|assistant|> SELECT MAX("overall_pick") FROM "top_nfl_draft_selections" WHERE "position"='c' AND "nfl_draft">1977;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mls_regular_season" ( "date" text, "home_team" text, "score" text, "away_team" text, "venue" text ); Question: What was the score at Spartan Stadium when San Jose was the Home team? <|assistant|> SELECT "score" FROM "mls_regular_season" WHERE "home_team"='san jose' AND "venue"='spartan stadium';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mls_regular_season" ( "date" text, "home_team" text, "score" text, "away_team" text, "venue" text ); Question: Where was the game on September 11, 2004? <|assistant|> SELECT "venue" FROM "mls_regular_season" WHERE "date"='september 11, 2004';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mls_regular_season" ( "date" text, "home_team" text, "score" text, "away_team" text, "venue" text ); Question: Who was the home team on September 20, 1998 at Spartan Stadium? <|assistant|> SELECT "home_team" FROM "mls_regular_season" WHERE "venue"='spartan stadium' AND "date"='september 20, 1998';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "round" real, "time" text, "location" text ); Question: What method has a round less than 3, and 3:36 as the time? <|assistant|> SELECT "method" FROM "mixed_martial_arts_record" WHERE "round"<3 AND "time"='3:36';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "round" real, "time" text, "location" text ); Question: What method has randy couture as the opponent? <|assistant|> SELECT "method" FROM "mixed_martial_arts_record" WHERE "opponent"='randy couture';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "counties" ( "county" text, "population" real, "per_capita_income" text, "median_household_income" text, "median_family_income" text ); Question: What is the median household income where the per capita is $28,789? <|assistant|> SELECT "median_household_income" FROM "counties" WHERE "per_capita_income"='$28,789';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "counties" ( "county" text, "population" real, "per_capita_income" text, "median_household_income" text, "median_family_income" text ); Question: What is the median income for a family whose per capita income is $18,296? <|assistant|> SELECT "median_family_income" FROM "counties" WHERE "per_capita_income"='$18,296';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "television" ( "dish" text, "callsign" text, "network" text, "resolution" text, "city_of_license" text, "official_website" text ); Question: What is the resolution of the network Canal de las Estrellas? <|assistant|> SELECT "resolution" FROM "television" WHERE "network"='canal de las estrellas';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "television" ( "dish" text, "callsign" text, "network" text, "resolution" text, "city_of_license" text, "official_website" text ); Question: What is the resolution of the network Carismatv? <|assistant|> SELECT "resolution" FROM "television" WHERE "network"='carismatv';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "television" ( "dish" text, "callsign" text, "network" text, "resolution" text, "city_of_license" text, "official_website" text ); Question: Which dish belongs to the network that has the official website of ksat.com? <|assistant|> SELECT "dish" FROM "television" WHERE "official_website"='ksat.com';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "television" ( "dish" text, "callsign" text, "network" text, "resolution" text, "city_of_license" text, "official_website" text ); Question: In which city is the network latv licensed? <|assistant|> SELECT "city_of_license" FROM "television" WHERE "network"='latv';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "television" ( "dish" text, "callsign" text, "network" text, "resolution" text, "city_of_license" text, "official_website" text ); Question: In which city is the network with the callsign kgns-dt3 licensed? <|assistant|> SELECT "city_of_license" FROM "television" WHERE "callsign"='kgns-dt3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_braathens_aircraft" ( "manufacturer" text, "model" text, "quantity" real, "introduced" real, "retired" real ); Question: How many in the introduced section had Fokker as a manufacturer, a quantity of 5, and retired later than 1999? <|assistant|> SELECT SUM("introduced") FROM "list_of_braathens_aircraft" WHERE "manufacturer"='fokker' AND "quantity"=5 AND "retired">1999;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_braathens_aircraft" ( "manufacturer" text, "model" text, "quantity" real, "introduced" real, "retired" real ); Question: What is the total number of quantity when the introductory year was 1984? <|assistant|> SELECT SUM("quantity") FROM "list_of_braathens_aircraft" WHERE "introduced"=1984;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_braathens_aircraft" ( "manufacturer" text, "model" text, "quantity" real, "introduced" real, "retired" real ); Question: How many in the introduced segment retired later than 1994 and had Fokker as a manufacturer? <|assistant|> SELECT COUNT("introduced") FROM "list_of_braathens_aircraft" WHERE "retired">1994 AND "manufacturer"='fokker';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_braathens_aircraft" ( "manufacturer" text, "model" text, "quantity" real, "introduced" real, "retired" real ); Question: How many in the quantity section had Fokker as a manufacturer and retired later than 1999? <|assistant|> SELECT COUNT("quantity") FROM "list_of_braathens_aircraft" WHERE "manufacturer"='fokker' AND "retired">1999;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mano_parejas" ( "year" text, "champion" text, "subchampion" text, "scoreboard" text, "fronton" text ); Question: Which Championship has a Scoreboard that is 22-14? <|assistant|> SELECT "champion" FROM "mano_parejas" WHERE "scoreboard"='22-14';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "skyline" ( "rank" real, "name" text, "height_ft_m" text, "floors_stories" real, "year_completed" real ); Question: What year was the building with a top 3 rank and a height of 274 (84) ft (m) completed? <|assistant|> SELECT MAX("year_completed") FROM "skyline" WHERE "rank"<3 AND "height_ft_m"='274 (84)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "skyline" ( "rank" real, "name" text, "height_ft_m" text, "floors_stories" real, "year_completed" real ); Question: How many floors are in the 274 (84) ft (m) building that is ranked number 1? <|assistant|> SELECT AVG("floors_stories") FROM "skyline" WHERE "height_ft_m"='274 (84)' AND "rank">1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "skyline" ( "rank" real, "name" text, "height_ft_m" text, "floors_stories" real, "year_completed" real ); Question: Which is the highest ranked building with more than 15 floors? <|assistant|> SELECT MAX("rank") FROM "skyline" WHERE "floors_stories">15;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "torneo_apertura" ( "position" real, "team" text, "played" real, "wins" real, "draws" real, "losses" real, "scored" real, "conceded" real, "points" real ); Question: What is the highest points scored for the team with a position larger than 5, who had less than 4 wins and more than 8 draws? <|assistant|> SELECT MAX("scored") FROM "torneo_apertura" WHERE "position">5 AND "wins"<4 AND "draws">8;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "torneo_apertura" ( "position" real, "team" text, "played" real, "wins" real, "draws" real, "losses" real, "scored" real, "conceded" real, "points" real ); Question: What is the average number conceded for hte team that had less than 19 points, played more than 18 games and had a position less than 10? <|assistant|> SELECT AVG("conceded") FROM "torneo_apertura" WHERE "points"<19 AND "position"<10 AND "played">18;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "torneo_apertura" ( "position" real, "team" text, "played" real, "wins" real, "draws" real, "losses" real, "scored" real, "conceded" real, "points" real ); Question: What was the sum of the draws for the team that had 11 wins, less than 38 points, and a position smaller than 4? <|assistant|> SELECT SUM("draws") FROM "torneo_apertura" WHERE "position"<4 AND "wins"=11 AND "points"<38;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "torneo_apertura" ( "position" real, "team" text, "played" real, "wins" real, "draws" real, "losses" real, "scored" real, "conceded" real, "points" real ); Question: What was the lowest number of wins for the team that scored more than 14 points and had a position of 7? <|assistant|> SELECT MIN("wins") FROM "torneo_apertura" WHERE "position"=7 AND "scored">14;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "torneo_apertura" ( "position" real, "team" text, "played" real, "wins" real, "draws" real, "losses" real, "scored" real, "conceded" real, "points" real ); Question: What is the total number scored for the team that had 19 points and a position larger than 4? <|assistant|> SELECT COUNT("scored") FROM "torneo_apertura" WHERE "position">4 AND "points"=19;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "torneo_apertura" ( "position" real, "team" text, "played" real, "wins" real, "draws" real, "losses" real, "scored" real, "conceded" real, "points" real ); Question: What is the lowest number conceded for the team that had less than 8 wins, scored 21, and had less than 23 points? <|assistant|> SELECT MIN("conceded") FROM "torneo_apertura" WHERE "wins"<8 AND "scored"=21 AND "points"<23;<|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, "game_site" text, "attendance" real ); Question: Which Date has a Result of l 14–13? <|assistant|> SELECT "date" FROM "schedule" WHERE "result"='l 14–13';<|endoftext|>