text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "teams_and_venues" ( "team" text, "location" text, "venue" text, "capacity" real, "position_in_1996" text ); Question: What team plays at Spartak, Mogilev? <|assistant|> SELECT "team" FROM "teams_and_venues" WHERE "venue"='spartak, mogilev';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "filmography" ( "year" real, "film" text, "role" text, "producer_director" text, "notes" text ); Question: Who was the Producer/Director of Fear Beneath? <|assistant|> SELECT "producer_director" FROM "filmography" WHERE "film"='fear beneath';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "filmography" ( "year" real, "film" text, "role" text, "producer_director" text, "notes" text ); Question: What film was released in 1996? <|assistant|> SELECT "film" FROM "filmography" WHERE "year"=1996;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "filmography" ( "year" real, "film" text, "role" text, "producer_director" text, "notes" text ); Question: Who is the Producer/Director of Political Engagement? <|assistant|> SELECT "producer_director" FROM "filmography" WHERE "film"='political engagement';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_7_1943_1944" ( "episode" text, "title" text, "writer_s" text, "preservation" text, "original_airdate" text ); Question: What is the original airdate for episode 7-17 (195) from writer Sidney Slon? <|assistant|> SELECT "original_airdate" FROM "season_7_1943_1944" WHERE "writer_s"='sidney slon' AND "episode"='7-17 (195)';<|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: What is the rank of Greg Norman who earned more than $12,507,322? <|assistant|> SELECT AVG("rank") FROM "leaders" WHERE "player"='greg norman' AND "earnings">'12,507,322';<|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: What is the rank of the United States player Davis Love III with earnings under $12,487,463? <|assistant|> SELECT MAX("rank") FROM "leaders" WHERE "country"='united states' AND "player"='davis love iii' AND "earnings"<'12,487,463';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "wta_tour_singles_finals_19_7_12" ( "outcome" text, "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score" text ); Question: What is the date of the tournament played in Madrid, Spain? <|assistant|> SELECT "date" FROM "wta_tour_singles_finals_19_7_12" WHERE "tournament"='madrid, spain';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2007_08_cardiff_city_f_c_season" ( "date" text, "round" text, "opponent" text, "venue" text, "result" text, "attendance" real ); Question: What opponent has final as the round? <|assistant|> SELECT "opponent" FROM "2007_08_cardiff_city_f_c_season" WHERE "round"='final';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2007_08_cardiff_city_f_c_season" ( "date" text, "round" text, "opponent" text, "venue" text, "result" text, "attendance" real ); Question: What round has hereford united as the opponent? <|assistant|> SELECT "round" FROM "2007_08_cardiff_city_f_c_season" WHERE "opponent"='hereford united';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_calendar" ( "race_title" text, "circuit" text, "location_state" text, "date" text, "winner" text, "team" text ); Question: Which Location /State has a Winner of craig lowndes, and a Date of 29–31 may? <|assistant|> SELECT "location_state" FROM "race_calendar" WHERE "winner"='craig lowndes' AND "date"='29–31 may';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_calendar" ( "race_title" text, "circuit" text, "location_state" text, "date" text, "winner" text, "team" text ); Question: Which Team has a Winner of craig lowndes, and a Circuit of phillip island grand prix circuit? <|assistant|> SELECT "team" FROM "race_calendar" WHERE "winner"='craig lowndes' AND "circuit"='phillip island grand prix circuit';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_calendar" ( "race_title" text, "circuit" text, "location_state" text, "date" text, "winner" text, "team" text ); Question: Which Location/ State has a Date of 29–31 may? <|assistant|> SELECT "location_state" FROM "race_calendar" WHERE "date"='29–31 may';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race_calendar" ( "race_title" text, "circuit" text, "location_state" text, "date" text, "winner" text, "team" text ); Question: Who won at the Circuit of lakeside international raceway? <|assistant|> SELECT "winner" FROM "race_calendar" WHERE "circuit"='lakeside international raceway';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table_of_dahlgren_boat_howitzers" ( "designation" text, "bore" text, "weight" text, "service_charge" text, "range_yards" text, "number_made" real ); Question: What is the service charge of the boat howitzers with 456 made? <|assistant|> SELECT "service_charge" FROM "table_of_dahlgren_boat_howitzers" WHERE "number_made"=456;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table_of_dahlgren_boat_howitzers" ( "designation" text, "bore" text, "weight" text, "service_charge" text, "range_yards" text, "number_made" real ); Question: What is the service chage of the boat howitzers with a 12-pdr light destination? <|assistant|> SELECT "service_charge" FROM "table_of_dahlgren_boat_howitzers" WHERE "designation"='12-pdr light';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table_of_dahlgren_boat_howitzers" ( "designation" text, "bore" text, "weight" text, "service_charge" text, "range_yards" text, "number_made" real ); Question: What is the service charge of the boat howitzers with 1009 made? <|assistant|> SELECT "service_charge" FROM "table_of_dahlgren_boat_howitzers" WHERE "number_made"=1009;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table_of_dahlgren_boat_howitzers" ( "designation" text, "bore" text, "weight" text, "service_charge" text, "range_yards" text, "number_made" real ); Question: What is the bore of the boat howitzers with a 12-pdr heavy designation? <|assistant|> SELECT "bore" FROM "table_of_dahlgren_boat_howitzers" WHERE "designation"='12-pdr heavy';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_round" ( "tie_no" real, "home_team" text, "score" text, "away_team" text, "report" text, "attendance" real ); Question: Which attendance has 9 as the tie no.? <|assistant|> SELECT "attendance" FROM "second_round" WHERE "tie_no"=9;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "jacksonville_jaguars_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: How many Picks have a Position of defensive end, and an Overall smaller than 33? <|assistant|> SELECT COUNT("pick_num") FROM "jacksonville_jaguars_draft_history" WHERE "position"='defensive end' AND "overall"<33;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "jacksonville_jaguars_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: Which Overall is the highest one that has a Name of gregory spann, and a Pick # larger than 19? <|assistant|> SELECT MAX("overall") FROM "jacksonville_jaguars_draft_history" WHERE "name"='gregory spann' AND "pick_num">19;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "jacksonville_jaguars_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: Which Pick # has a Round larger than 5, and a Position of wide receiver, and a Name of gregory spann, and an Overall larger than 228? <|assistant|> SELECT AVG("pick_num") FROM "jacksonville_jaguars_draft_history" WHERE "round">5 AND "position"='wide receiver' AND "name"='gregory spann' AND "overall">228;<|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: What is the score from the 21-27 Record? <|assistant|> SELECT "score" FROM "game_log" WHERE "record"='21-27';<|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: How many people attended the May 28 game? <|assistant|> SELECT "attendance" FROM "game_log" WHERE "date"='may 28';<|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, "drawn" real, "lost" real, "against" real, "difference" text ); Question: What is the average drawn number of the team with less than 70 points and less than 46 played? <|assistant|> SELECT AVG("drawn") FROM "campeonato_brasileiro_s_rie_a" WHERE "points"<70 AND "played"<46;<|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, "drawn" real, "lost" real, "against" real, "difference" text ); Question: What is the highest position of the team with 24 lost and a drawn greater than 9? <|assistant|> SELECT MAX("position") FROM "campeonato_brasileiro_s_rie_a" WHERE "lost"=24 AND "drawn">9;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "game" real, "april" real, "opponent" text, "score" text, "record" text, "points" real ); Question: How many Points has a Game of 82 and a April larger than 10? <|assistant|> SELECT AVG("points") FROM "regular_season" WHERE "game"=82 AND "april">10;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "game" real, "april" real, "opponent" text, "score" text, "record" text, "points" real ); Question: How many Games have a Score of 3–3 ot? <|assistant|> SELECT COUNT("game") FROM "regular_season" WHERE "score"='3–3 ot';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "game" real, "april" real, "opponent" text, "score" text, "record" text, "points" real ); Question: Which April has a Game of 84 <|assistant|> SELECT MAX("april") FROM "regular_season" WHERE "game"=84;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2006_2007_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "points" text ); Question: what's the played status when the club was banwen rfc? <|assistant|> SELECT "played" FROM "2006_2007_table" WHERE "club"='banwen rfc';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2006_2007_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "points" text ); Question: what's the points total when points against was points against? <|assistant|> SELECT "points_for" FROM "2006_2007_table" WHERE "points_against"='points against';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2006_2007_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "points" text ); Question: when points were 36 and points against 489 what is the lost? <|assistant|> SELECT "lost" FROM "2006_2007_table" WHERE "points"='36' AND "points_against"='489';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2006_2007_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "points" text ); Question: when points against was 387 what was the lost? <|assistant|> SELECT "lost" FROM "2006_2007_table" WHERE "points_against"='387';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2006_2007_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "points" text ); Question: when points for was points for what was the points? <|assistant|> SELECT "points" FROM "2006_2007_table" WHERE "points_for"='points for';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "player_selection" ( "year" real, "pick" text, "player" text, "position" text, "college" text ); Question: What was 1948's pick? <|assistant|> SELECT "pick" FROM "player_selection" WHERE "year"=1948;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "player_selection" ( "year" real, "pick" text, "player" text, "position" text, "college" text ); Question: What was the pick in 2004? <|assistant|> SELECT "pick" FROM "player_selection" WHERE "year"=2004;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "player_selection" ( "year" real, "pick" text, "player" text, "position" text, "college" text ); Question: How many years have a Pick of 12, and a Position of dt, and a College of penn state? <|assistant|> SELECT COUNT("year") FROM "player_selection" WHERE "pick"='12' AND "position"='dt' AND "college"='penn state';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "lpga_tour_record" ( "year" real, "wins" real, "earnings" text, "rank" real, "scoring_average" real ); Question: What is the scoring average where the wins are 0? <|assistant|> SELECT COUNT("scoring_average") FROM "lpga_tour_record" WHERE "wins"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "lpga_tour_record" ( "year" real, "wins" real, "earnings" text, "rank" real, "scoring_average" real ); Question: What year has earnings of $557,158? <|assistant|> SELECT MAX("year") FROM "lpga_tour_record" WHERE "earnings"='557,158';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "game" real, "february" real, "opponent" text, "score" text, "record" text, "points" real ); Question: Which Points have an Opponent of @ florida panthers, and a Game larger than 58? <|assistant|> SELECT MIN("points") FROM "regular_season" WHERE "opponent"='@ florida panthers' AND "game">58;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "roman_catholicism_in_asia" ( "region" text, "total_population" real, "catholic" real, "pct_catholic" text, "pct_of_global_catholic_pop" text ); Question: what is the catholic when the % catholic is 1.39%? <|assistant|> SELECT "catholic" FROM "roman_catholicism_in_asia" WHERE "pct_catholic"='1.39%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "roman_catholicism_in_asia" ( "region" text, "total_population" real, "catholic" real, "pct_catholic" text, "pct_of_global_catholic_pop" text ); Question: with catholic of 3.33% and total population more than 1,528,384,440, what is the % global catholic pop.? <|assistant|> SELECT "pct_of_global_catholic_pop" FROM "roman_catholicism_in_asia" WHERE "total_population">'1,528,384,440' AND "pct_catholic"='3.33%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "game" real, "february" real, "opponent" text, "score" text, "record" text, "points" real ); Question: Which February has a Game of 64? <|assistant|> SELECT AVG("february") FROM "regular_season" WHERE "game"=64;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "game" real, "february" real, "opponent" text, "score" text, "record" text, "points" real ); Question: Which Points have a Game smaller than 60, and a Score of 2–0, and a February larger than 1? <|assistant|> SELECT AVG("points") FROM "regular_season" WHERE "game"<60 AND "score"='2–0' AND "february">1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "game" real, "february" real, "opponent" text, "score" text, "record" text, "points" real ); Question: Which Game is the highest one that has a February of 25? <|assistant|> SELECT MAX("game") FROM "regular_season" WHERE "february"=25;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "game" real, "february" real, "opponent" text, "score" text, "record" text, "points" real ); Question: Which Game is the highest one that has a Score of 3–4 ot, and Points larger than 75? <|assistant|> SELECT MAX("game") FROM "regular_season" WHERE "score"='3–4 ot' AND "points">75;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "regular_season" ( "game" real, "february" real, "opponent" text, "score" text, "record" text, "points" real ); Question: How much February has a Score of 5–2, and Points of 70? <|assistant|> SELECT COUNT("february") FROM "regular_season" WHERE "score"='5–2' AND "points"=70;<|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, "game_site" text, "attendance" real ); Question: Which result happened more recently than week 2, and had a date of November 30, 1958? <|assistant|> SELECT "result" FROM "schedule" WHERE "week">2 AND "date"='november 30, 1958';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "official_versions" ( "version" text, "length" text, "album" text, "remixed_by" text, "year" real ); Question: what album is 4:30 long <|assistant|> SELECT "album" FROM "official_versions" WHERE "length"='4:30';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "teams" ( "previous_season" text, "team" text, "town" text, "arena_capacity" text, "website" text, "head_coach" text, "foreign_players_max_2" text ); Question: What is the Head Coach of Novy Urengoy? <|assistant|> SELECT "head_coach" FROM "teams" WHERE "town"='novy urengoy';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "teams" ( "previous_season" text, "team" text, "town" text, "arena_capacity" text, "website" text, "head_coach" text, "foreign_players_max_2" text ); Question: What is the Arena o Kazan? <|assistant|> SELECT "arena_capacity" FROM "teams" WHERE "town"='kazan';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "teams" ( "previous_season" text, "team" text, "town" text, "arena_capacity" text, "website" text, "head_coach" text, "foreign_players_max_2" text ); Question: What is the Website of Head Coach Yuriy Korotkevich? <|assistant|> SELECT "website" FROM "teams" WHERE "head_coach"='yuriy korotkevich';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_5" ( "date" text, "tournament" text, "surface" text, "partnering" text, "opponents" text, "score" text ); Question: Opponents of sebastián decoud santiago giraldo had what surface? <|assistant|> SELECT "surface" FROM "doubles_5" WHERE "opponents"='sebastián decoud santiago giraldo';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_5" ( "date" text, "tournament" text, "surface" text, "partnering" text, "opponents" text, "score" text ); Question: Partnering of franco ferreiro had what tournament? <|assistant|> SELECT "tournament" FROM "doubles_5" WHERE "partnering"='franco ferreiro';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_5" ( "date" text, "tournament" text, "surface" text, "partnering" text, "opponents" text, "score" text ); Question: Date of april 10, 2006 had what surface? <|assistant|> SELECT "surface" FROM "doubles_5" WHERE "date"='april 10, 2006';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_5" ( "date" text, "tournament" text, "surface" text, "partnering" text, "opponents" text, "score" text ); Question: Surface of clay, and a Partnering of júlio silva had what score? <|assistant|> SELECT "score" FROM "doubles_5" WHERE "surface"='clay' AND "partnering"='júlio silva';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_5" ( "date" text, "tournament" text, "surface" text, "partnering" text, "opponents" text, "score" text ); Question: Date of november 3, 2008 had what score? <|assistant|> SELECT "score" FROM "doubles_5" WHERE "date"='november 3, 2008';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sapporo" ( "rank" real, "name" text, "nationality" text, "1st_m" real, "2nd_m" real, "points" real, "overall_wc_points_rank" text ); Question: Which Points have a Name of denis kornilov? <|assistant|> SELECT AVG("points") FROM "sapporo" WHERE "name"='denis kornilov';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sapporo" ( "rank" real, "name" text, "nationality" text, "1st_m" real, "2nd_m" real, "points" real, "overall_wc_points_rank" text ); Question: Which Rank is the highest one that has a 1st (m) larger than 130, and a Name of thomas morgenstern, and a 2nd (m) larger than 139? <|assistant|> SELECT MAX("rank") FROM "sapporo" WHERE "1st_m">130 AND "name"='thomas morgenstern' AND "2nd_m">139;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sapporo" ( "rank" real, "name" text, "nationality" text, "1st_m" real, "2nd_m" real, "points" real, "overall_wc_points_rank" text ); Question: Which Rank that a Name of thomas morgenstern, and Points larger than 288.7? <|assistant|> SELECT SUM("rank") FROM "sapporo" WHERE "name"='thomas morgenstern' AND "points">288.7;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sapporo" ( "rank" real, "name" text, "nationality" text, "1st_m" real, "2nd_m" real, "points" real, "overall_wc_points_rank" text ); Question: How many Points have a Nationality of nor, and an Overall WC points (Rank) of 374 (13), and a Rank smaller than 4? <|assistant|> SELECT COUNT("points") FROM "sapporo" WHERE "nationality"='nor' AND "overall_wc_points_rank"='374 (13)' AND "rank"<4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "jacksonville_jaguars_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: What is the overall number for Louisiana Tech college, and a pick more than 10? <|assistant|> SELECT SUM("overall") FROM "jacksonville_jaguars_draft_history" WHERE "college"='louisiana tech' AND "pick_num">10;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "jacksonville_jaguars_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: What was the pick number for Deji Karim, in a round lower than 6? <|assistant|> SELECT AVG("pick_num") FROM "jacksonville_jaguars_draft_history" WHERE "name"='deji karim' AND "round"<6;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "jacksonville_jaguars_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: Which college had an overall number more than 180? <|assistant|> SELECT "college" FROM "jacksonville_jaguars_draft_history" WHERE "overall">180;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "jacksonville_jaguars_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); Question: What is the overall number for a pick of #10, from Louisiana Tech, and a round bigger than 3? <|assistant|> SELECT SUM("overall") FROM "jacksonville_jaguars_draft_history" WHERE "pick_num"=10 AND "college"='louisiana tech' AND "round">3;<|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's the Pick average that has a School/Club Team of Alabama, with a Round that's smaller than 9? <|assistant|> SELECT AVG("pick") FROM "nfl_draft" WHERE "school_club_team"='alabama' AND "round"<9;<|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's the sum of the Pick that has the Player of Robert Ingalls? <|assistant|> SELECT COUNT("pick") FROM "nfl_draft" WHERE "player"='robert ingalls';<|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's the sum of the Pick that has the Position of Tackle, the Player Woody Adams, and a Round that's larger than 22? <|assistant|> SELECT COUNT("pick") FROM "nfl_draft" WHERE "position"='tackle' AND "player"='woody adams' AND "round">22;<|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 Position has a Round that's larger than 21? <|assistant|> SELECT "position" FROM "nfl_draft" WHERE "round">21;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "most_official_appearances" ( "ranking" real, "nationality" text, "name" text, "position" text, "years" text, "league" real, "europe" real, "others" real, "total" real ); Question: What is the sum of the Europe totals for players with other appearances of 0, league appearances under 328, and a position of MF? <|assistant|> SELECT SUM("europe") FROM "most_official_appearances" WHERE "others"=0 AND "league"<328 AND "position"='mf';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sources_of_income" ( "region" text, "employment_salaries_wages" text, "self_employed" text, "investment_income" text, "working_tax_credit" text, "state_pensions" text, "occupational_pensions" text, "disability_benefits" text, "other_social_security_benefits" text, "other_income_sources" text ); Question: Occupational pensions of 7%, and a Working tax credit of 2%, and a Other social security benefits of 6% has what investment income? <|assistant|> SELECT "investment_income" FROM "sources_of_income" WHERE "occupational_pensions"='7%' AND "working_tax_credit"='2%' AND "other_social_security_benefits"='6%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sources_of_income" ( "region" text, "employment_salaries_wages" text, "self_employed" text, "investment_income" text, "working_tax_credit" text, "state_pensions" text, "occupational_pensions" text, "disability_benefits" text, "other_social_security_benefits" text, "other_income_sources" text ); Question: Region of eastern england has what investment income? <|assistant|> SELECT "investment_income" FROM "sources_of_income" WHERE "region"='eastern england';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sources_of_income" ( "region" text, "employment_salaries_wages" text, "self_employed" text, "investment_income" text, "working_tax_credit" text, "state_pensions" text, "occupational_pensions" text, "disability_benefits" text, "other_social_security_benefits" text, "other_income_sources" text ); Question: State pensions of 7%, and a Self employed of 7%, and a Other income sources of 2% has what investment income? <|assistant|> SELECT "investment_income" FROM "sources_of_income" WHERE "state_pensions"='7%' AND "self_employed"='7%' AND "other_income_sources"='2%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sources_of_income" ( "region" text, "employment_salaries_wages" text, "self_employed" text, "investment_income" text, "working_tax_credit" text, "state_pensions" text, "occupational_pensions" text, "disability_benefits" text, "other_social_security_benefits" text, "other_income_sources" text ); Question: Other income sources of 2%, and a State pensions of 7%, and a Working tax credit of 2%, and a Employment ( salaries & wages) of 66% has what occupational pensions? <|assistant|> SELECT "occupational_pensions" FROM "sources_of_income" WHERE "other_income_sources"='2%' AND "state_pensions"='7%' AND "working_tax_credit"='2%' AND "employment_salaries_wages"='66%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sources_of_income" ( "region" text, "employment_salaries_wages" text, "self_employed" text, "investment_income" text, "working_tax_credit" text, "state_pensions" text, "occupational_pensions" text, "disability_benefits" text, "other_social_security_benefits" text, "other_income_sources" text ); Question: Investment income of 2%, and an other income sources of 3%, and an employment (salaries & wages) of 71% involves which self employed? <|assistant|> SELECT "self_employed" FROM "sources_of_income" WHERE "investment_income"='2%' AND "other_income_sources"='3%' AND "employment_salaries_wages"='71%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sources_of_income" ( "region" text, "employment_salaries_wages" text, "self_employed" text, "investment_income" text, "working_tax_credit" text, "state_pensions" text, "occupational_pensions" text, "disability_benefits" text, "other_social_security_benefits" text, "other_income_sources" text ); Question: Employment ( salaries & wages) of 64%, and a Occupational pensions of 6% has what working tax credit? <|assistant|> SELECT "working_tax_credit" FROM "sources_of_income" WHERE "employment_salaries_wages"='64%' AND "occupational_pensions"='6%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "world_championship_group_c_denmark" ( "games" real, "drawn" real, "lost" real, "points_difference" text, "points" real ); Question: How many Drawn is which has a Games smaller than 6? <|assistant|> SELECT SUM("drawn") FROM "world_championship_group_c_denmark" WHERE "games"<6;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "world_championship_group_c_denmark" ( "games" real, "drawn" real, "lost" real, "points_difference" text, "points" real ); Question: What is the Points that has 61 - 15 Point difference and a Drawn larger than 1? <|assistant|> SELECT AVG("points") FROM "world_championship_group_c_denmark" WHERE "points_difference"='61 - 15' AND "drawn">1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "world_championship_group_c_denmark" ( "games" real, "drawn" real, "lost" real, "points_difference" text, "points" real ); Question: How many Drawn has a Games larger than 6? <|assistant|> SELECT SUM("drawn") FROM "world_championship_group_c_denmark" WHERE "games">6;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "births_by_mother" ( "year" real, "jewish" real, "muslim" real, "christian" real, "druze" real, "total" real ); Question: How many jewish have a muslim less than 36,041, a total less than 161,042, a year after 2006, with a druze greater than 2,534? <|assistant|> SELECT SUM("jewish") FROM "births_by_mother" WHERE "muslim"<'36,041' AND "total"<'161,042' AND "year">2006 AND "druze">'2,534';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "births_by_mother" ( "year" real, "jewish" real, "muslim" real, "christian" real, "druze" real, "total" real ); Question: What is the lowest year that has a druze greater than 2,534, with a total less than 121,333? <|assistant|> SELECT MIN("year") FROM "births_by_mother" WHERE "druze">'2,534' AND "total"<'121,333';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "births_by_mother" ( "year" real, "jewish" real, "muslim" real, "christian" real, "druze" real, "total" real ); Question: What is the lowest jewish that has a druze less than 2,517, and a year prior to 2007? <|assistant|> SELECT MIN("jewish") FROM "births_by_mother" WHERE "druze"<'2,517' AND "year"<2007;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "births_by_mother" ( "year" real, "jewish" real, "muslim" real, "christian" real, "druze" real, "total" real ); Question: What is the average muslim that has a druze less than 2,534, a year prior to 2005, and a jewish greater than 100,657? <|assistant|> SELECT AVG("muslim") FROM "births_by_mother" WHERE "druze"<'2,534' AND "year"=2005 AND "jewish">'100,657';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "births_by_mother" ( "year" real, "jewish" real, "muslim" real, "christian" real, "druze" real, "total" real ); Question: How many muslims have a jewish of 112,803, and a year after 2008? <|assistant|> SELECT SUM("muslim") FROM "births_by_mother" WHERE "jewish"='112,803' AND "year">2008;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "voting_details" ( "constituency" text, "electorate" real, "turnout" text, "spoilt" text, "valid_poll" real, "quota" text, "seats" real, "candidates" real ); Question: What is the smallest electorate with 78,076 quota and less than 13 candidates? <|assistant|> SELECT MIN("electorate") FROM "voting_details" WHERE "quota"='78,076' AND "candidates"<13;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "voting_details" ( "constituency" text, "electorate" real, "turnout" text, "spoilt" text, "valid_poll" real, "quota" text, "seats" real, "candidates" real ); Question: What is the turnout with 15 candidates and more than 377,591 valid poll? <|assistant|> SELECT "turnout" FROM "voting_details" WHERE "candidates"=15 AND "valid_poll">'377,591';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "accolades" ( "publication" text, "country" text, "accolade" text, "year" real, "rank" real ); Question: What country is ranked 79? <|assistant|> SELECT "country" FROM "accolades" WHERE "rank"=79;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "accolades" ( "publication" text, "country" text, "accolade" text, "year" real, "rank" real ); Question: What is the lowest rank for an album after 1999 and an Accolade of the 100 greatest indie rock albums of all time? <|assistant|> SELECT MIN("rank") FROM "accolades" WHERE "year">1999 AND "accolade"='the 100 greatest indie rock albums of all time';<|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, "time_et" text, "result" text ); Question: Which Week is on sunday november 28? <|assistant|> SELECT MIN("week") FROM "schedule" WHERE "date"='sunday november 28';<|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, "time_et" text, "result" text ); Question: How many weeks have an Opponent of at new york giants? <|assistant|> SELECT COUNT("week") FROM "schedule" WHERE "opponent"='at new york giants';<|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, "time_et" text, "result" text ); Question: When is the Opponent of new england patriots? <|assistant|> SELECT "time_et" FROM "schedule" WHERE "opponent"='new england patriots';<|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, "time_et" text, "result" text ); Question: Which week has a Result of w 23–6? <|assistant|> SELECT "week" FROM "schedule" WHERE "result"='w 23–6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "municipalities_of_midhordland" ( "name" text, "innhabitants" real, "area" real, "mayor" text, "party" text, "municipal_code" real, "language_form" text ); Question: How many people did Mayor Olav Martin Vik preside over? <|assistant|> SELECT AVG("innhabitants") FROM "municipalities_of_midhordland" WHERE "mayor"='olav martin vik';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "municipalities_of_midhordland" ( "name" text, "innhabitants" real, "area" real, "mayor" text, "party" text, "municipal_code" real, "language_form" text ); Question: What's the area of askøy, with a Municipal code less than 1247? <|assistant|> SELECT SUM("area") FROM "municipalities_of_midhordland" WHERE "name"='askøy' AND "municipal_code"<1247;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "municipalities_of_midhordland" ( "name" text, "innhabitants" real, "area" real, "mayor" text, "party" text, "municipal_code" real, "language_form" text ); Question: What Mayor is from the KRF Party? <|assistant|> SELECT "mayor" FROM "municipalities_of_midhordland" WHERE "party"='krf';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "municipalities_of_midhordland" ( "name" text, "innhabitants" real, "area" real, "mayor" text, "party" text, "municipal_code" real, "language_form" text ); Question: What's the Municipal code of the FRP Party with an area of 100? <|assistant|> SELECT SUM("municipal_code") FROM "municipalities_of_midhordland" WHERE "party"='frp' AND "area"=100;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "municipalities_of_midhordland" ( "name" text, "innhabitants" real, "area" real, "mayor" text, "party" text, "municipal_code" real, "language_form" text ); Question: How many people does the KRF Party preside over? <|assistant|> SELECT AVG("innhabitants") FROM "municipalities_of_midhordland" WHERE "party"='krf';<|endoftext|>
<|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: What is the total number of overall draft picks for player whose position is C and was picked after round 9? <|assistant|> SELECT COUNT("overall") FROM "1980_packers_draft_selections" WHERE "position"='c' AND "round">9;<|endoftext|>
<|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: What position was Jafus White who was picked after round 1? <|assistant|> SELECT "position" FROM "1980_packers_draft_selections" WHERE "round">1 AND "player"='jafus white';<|endoftext|>
<|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: What is the total number of overall draft picks for Fred Nixon? <|assistant|> SELECT COUNT("overall") FROM "1980_packers_draft_selections" WHERE "player"='fred nixon';<|endoftext|>