text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "200_or_more_deaths" ( "disaster" text, "type" text, "location" text, "deaths" text, "date" text ); Question: Where was the disaster located that took place on 1916? <|assistant|> SELECT "location" FROM "200_or_more_deaths" WHERE "date"='1916';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race" ( "driver" text, "team" text, "laps" real, "time_retired" text, "grid" real, "points" real ); Question: Which Laps is the highest one that has a Time/Retired of +3.370 secs? <|assistant|> SELECT MAX("laps") FROM "race" WHERE "time_retired"='+3.370 secs';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "race" ( "driver" text, "team" text, "laps" real, "time_retired" text, "grid" real, "points" real ); Question: Which Grid has a Team of rusport, and Laps larger than 221? <|assistant|> SELECT SUM("grid") FROM "race" WHERE "team"='rusport' AND "laps">221;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1996_to_1999" ( "year" real, "title" text, "role" text, "producer" text, "director" text ); Question: What title has a producer of MAQ and Anna as a role? <|assistant|> SELECT "title" FROM "1996_to_1999" WHERE "producer"='maq' AND "role"='anna';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1996_to_1999" ( "year" real, "title" text, "role" text, "producer" text, "director" text ); Question: How many years was Kay Tagal Kang Hinintay directed by Rory Quintos and produced by Star Cinema? <|assistant|> SELECT COUNT("year") FROM "1996_to_1999" WHERE "producer"='star cinema' AND "director"='rory quintos' AND "title"='kay tagal kang hinintay';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1996_to_1999" ( "year" real, "title" text, "role" text, "producer" text, "director" text ); Question: Which title was directed by Joyce Bernal? <|assistant|> SELECT "title" FROM "1996_to_1999" WHERE "director"='joyce bernal';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results" ( "draw" real, "artist" text, "song" text, "composer" text, "lyricist" text, "place" real, "points" real ); Question: What song is it that artist morena camilleri does and has more than 38 points <|assistant|> SELECT "song" FROM "results" WHERE "points">38 AND "artist"='morena camilleri';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results" ( "draw" real, "artist" text, "song" text, "composer" text, "lyricist" text, "place" real, "points" real ); Question: What is the total number of points for ray agius <|assistant|> SELECT SUM("points") FROM "results" WHERE "lyricist"='ray agius';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "wins" ( "season" real, "challenge" text, "class" text, "place" real, "name" text ); Question: What play did henry s. uber / betty uber (eng) finish in? <|assistant|> SELECT COUNT("place") FROM "wins" WHERE "name"='henry s. uber / betty uber (eng)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_members_of_the_howard_county_del" ( "district" text, "counties_represented" text, "delegate" text, "party" text, "first_elected" real, "committee" text ); Question: When Baltimore County, Howard are represented, what's the first elected when the committee is environmental matters (vice-chair)? <|assistant|> SELECT MAX("first_elected") FROM "current_members_of_the_howard_county_del" WHERE "counties_represented"='baltimore county, howard' AND "committee"='environmental matters (vice-chair)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_members_of_the_howard_county_del" ( "district" text, "counties_represented" text, "delegate" text, "party" text, "first_elected" real, "committee" text ); Question: What party is the delegate of Turner, Frank S. Frank S. Turner of Howard County? <|assistant|> SELECT "party" FROM "current_members_of_the_howard_county_del" WHERE "counties_represented"='howard' AND "delegate"='turner, frank s. frank s. turner';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1932_north_atlantic_tropical_cyclone_sta" ( "storm_name" text, "dates_active" text, "max_1_min_wind_mph_km_h" text, "min_press_mbar" text, "damage_millions_usd" text, "deaths" text ); Question: What is the damage of storm three? <|assistant|> SELECT "damage_millions_usd" FROM "1932_north_atlantic_tropical_cyclone_sta" WHERE "storm_name"='three';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "grands_prix" ( "round" real, "date" text, "grand_prix" text, "circuit" text, "125cc_winner" text, "250cc_winner" text, "moto_gp_winner" text, "report" text ); Question: Which Date has a MotoGP winner of casey stoner, and a 250cc winner of hiroshi aoyama? <|assistant|> SELECT "date" FROM "grands_prix" WHERE "moto_gp_winner"='casey stoner' AND "250cc_winner"='hiroshi aoyama';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "grands_prix" ( "round" real, "date" text, "grand_prix" text, "circuit" text, "125cc_winner" text, "250cc_winner" text, "moto_gp_winner" text, "report" text ); Question: Which 250cc winner has a 125cc winner of bradley smith, and a MotoGP winner of casey stoner? <|assistant|> SELECT "250cc_winner" FROM "grands_prix" WHERE "125cc_winner"='bradley smith' AND "moto_gp_winner"='casey stoner';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "grands_prix" ( "round" real, "date" text, "grand_prix" text, "circuit" text, "125cc_winner" text, "250cc_winner" text, "moto_gp_winner" text, "report" text ); Question: Which Round is the lowest one that has a Circuit of donington? <|assistant|> SELECT MIN("round") FROM "grands_prix" WHERE "circuit"='donington';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "grands_prix" ( "round" real, "date" text, "grand_prix" text, "circuit" text, "125cc_winner" text, "250cc_winner" text, "moto_gp_winner" text, "report" text ); Question: Which MotoGP winner has a 250cc winner of marco simoncelli, and a Round of 15? <|assistant|> SELECT "moto_gp_winner" FROM "grands_prix" WHERE "250cc_winner"='marco simoncelli' AND "round"=15;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "grands_prix" ( "round" real, "date" text, "grand_prix" text, "circuit" text, "125cc_winner" text, "250cc_winner" text, "moto_gp_winner" text, "report" text ); Question: Which 250cc winner has a 125cc winner of bradley smith, and a Circuit of mugello? <|assistant|> SELECT "250cc_winner" FROM "grands_prix" WHERE "125cc_winner"='bradley smith' AND "circuit"='mugello';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "grands_prix" ( "round" real, "date" text, "grand_prix" text, "circuit" text, "125cc_winner" text, "250cc_winner" text, "moto_gp_winner" text, "report" text ); Question: Which 250cc winner has a Round larger than 6, and a Date of 26 july? <|assistant|> SELECT "250cc_winner" FROM "grands_prix" WHERE "round">6 AND "date"='26 july';<|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, "venue" text, "attendance" real ); Question: Attendance of 48,510 had what highest week? <|assistant|> SELECT MAX("week") FROM "schedule" WHERE "attendance"='48,510';<|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, "venue" text, "attendance" real ); Question: Opponent of at san francisco 49ers had what lowest week? <|assistant|> SELECT MIN("week") FROM "schedule" WHERE "opponent"='at san francisco 49ers';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "preseason" ( "week" real, "date" text, "opponent" text, "result" text, "record" text ); Question: On what Date is the Minnesota Vikings the Opponent? <|assistant|> SELECT "date" FROM "preseason" WHERE "opponent"='minnesota vikings';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "preseason" ( "week" real, "date" text, "opponent" text, "result" text, "record" text ); Question: What is the Date of Week 5? <|assistant|> SELECT "date" FROM "preseason" WHERE "week"=5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "preseason" ( "week" real, "date" text, "opponent" text, "result" text, "record" text ); Question: What is the Date of Week 2? <|assistant|> SELECT "date" FROM "preseason" WHERE "week"=2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "record" text ); Question: What was the score when the game has a loss of Lary (10-12)? <|assistant|> SELECT "score" FROM "game_log" WHERE "loss"='lary (10-12)';<|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 is the result of the friendly match? <|assistant|> SELECT "result" FROM "international_goals" WHERE "competition"='friendly';<|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 is the score of the match on June 4, 2008? <|assistant|> SELECT "score" FROM "international_goals" WHERE "date"='june 4, 2008';<|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: Which Year is the lowest one that has a Length of 3:50? <|assistant|> SELECT MIN("year") FROM "official_versions" WHERE "length"='3:50';<|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: Which Length has a Year of 2000? <|assistant|> SELECT "length" FROM "official_versions" WHERE "year"=2000;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "melodifestivalen_2000" ( "draw" real, "artist" text, "song" text, "points" real, "place" text ); Question: In what place is the artist Midnight Band with a draw larger than 2 and less than 139 points. <|assistant|> SELECT "place" FROM "melodifestivalen_2000" WHERE "draw">2 AND "points"<139 AND "artist"='midnight band';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "most_wickets_in_a_season" ( "rank" text, "s_wicket" text, "player" text, "matches" text, "season" text ); Question: what player matched up with 9 <|assistant|> SELECT "player" FROM "most_wickets_in_a_season" WHERE "matches"='9';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "first_stage" ( "team_1" text, "agg" text, "team_2" text, "1st_leg" text, "2nd_leg" text ); Question: What is the 2nd leg of the Internacional Team 1? <|assistant|> SELECT "2nd_leg" FROM "first_stage" WHERE "team_1"='internacional';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "davis_cup_and_federation_cup_venues" ( "rank" real, "stadium" text, "capacity" real, "city" text, "country" text ); Question: Which Rank has a Capacity smaller than 12,000, and a Country of united states? <|assistant|> SELECT SUM("rank") FROM "davis_cup_and_federation_cup_venues" WHERE "capacity"<'12,000' AND "country"='united states';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "davis_cup_and_federation_cup_venues" ( "rank" real, "stadium" text, "capacity" real, "city" text, "country" text ); Question: Which City has a Country of spain, and a Stadium of palacio de deportes de santander? <|assistant|> SELECT "city" FROM "davis_cup_and_federation_cup_venues" WHERE "country"='spain' AND "stadium"='palacio de deportes de santander';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "davis_cup_and_federation_cup_venues" ( "rank" real, "stadium" text, "capacity" real, "city" text, "country" text ); Question: Which Capacity is the lowest one that has a Rank smaller than 15, and a City of belgrade? <|assistant|> SELECT MIN("capacity") FROM "davis_cup_and_federation_cup_venues" WHERE "rank"<15 AND "city"='belgrade';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "davis_cup_and_federation_cup_venues" ( "rank" real, "stadium" text, "capacity" real, "city" text, "country" text ); Question: Which Capacity is the lowest one that has a City of brisbane, and a Rank smaller than 1? <|assistant|> SELECT MIN("capacity") FROM "davis_cup_and_federation_cup_venues" WHERE "city"='brisbane' AND "rank"<1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_table" ( "club" text, "total_points" text, "bonus_points" text, "match_points" text, "games" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "diff" text ); Question: What are the total points that had 68 match points, 9 bonus points and 30 games? <|assistant|> SELECT "total_points" FROM "season_table" WHERE "games"='30' AND "bonus_points"='9' AND "match_points"='68';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "see_also" ( "name" text, "number" real, "from" text, "length_km" real, "length_mi" real ); Question: What's the shortest length from north klondike highway that has a length less than 326? <|assistant|> SELECT MIN("length_km") FROM "see_also" WHERE "name"='north klondike highway' AND "length_mi"<326;<|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, "save" text ); Question: what team had a score of 2-1 <|assistant|> SELECT "opponent" FROM "game_log" WHERE "score"='2-1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "save" text ); Question: what team played on may 11 <|assistant|> SELECT "opponent" FROM "game_log" WHERE "date"='may 11';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "matches" ( "season" text, "competition" text, "round" text, "club" text, "home" text, "away" text ); Question: what place has the club of sevilla <|assistant|> SELECT "away" FROM "matches" WHERE "club"='sevilla';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "former_members" ( "school" text, "location" text, "mascot" text, "num_county" text, "year_joined" real, "previous_conference" text, "year_left" real, "new_conference" text ); Question: Which new conference is located in Greentown? <|assistant|> SELECT "new_conference" FROM "former_members" WHERE "location"='greentown';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "former_members" ( "school" text, "location" text, "mascot" text, "num_county" text, "year_joined" real, "previous_conference" text, "year_left" real, "new_conference" text ); Question: What is the most current year with a previous conference of Mid-Indiana in Converse? <|assistant|> SELECT MAX("year_joined") FROM "former_members" WHERE "previous_conference"='mid-indiana' AND "location"='converse';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "former_members" ( "school" text, "location" text, "mascot" text, "num_county" text, "year_joined" real, "previous_conference" text, "year_left" real, "new_conference" text ); Question: What year did Culver leave? <|assistant|> SELECT SUM("year_left") FROM "former_members" WHERE "location"='culver';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "former_members" ( "school" text, "location" text, "mascot" text, "num_county" text, "year_joined" real, "previous_conference" text, "year_left" real, "new_conference" text ); Question: What is the mascot with a #/County of 34 Howard? <|assistant|> SELECT "mascot" FROM "former_members" WHERE "num_county"='34 howard';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1968" ( "date" text, "city" text, "opponent" text, "results" text, "type_of_game" text ); Question: What day was a friendly game held that had a score of 2:3? <|assistant|> SELECT "date" FROM "1968" WHERE "type_of_game"='friendly' AND "results"='2:3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1968" ( "date" text, "city" text, "opponent" text, "results" text, "type_of_game" text ); Question: What type of game was held on December 22? <|assistant|> SELECT "type_of_game" FROM "1968" WHERE "date"='december 22';<|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: what game had a doubles round in 1979 <|assistant|> SELECT "mixed_doubles" FROM "past_winners" WHERE "year"=1979;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "members" ( "name" text, "date" text, "goals" real, "assists" real, "team" text, "venue" text, "opponent" text, "competition" text, "total_goals" real, "total_assists" real ); Question: Where were less than 72 goals made and more than 40 assists made? <|assistant|> SELECT "venue" FROM "members" WHERE "goals"<72 AND "assists">40;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "members" ( "name" text, "date" text, "goals" real, "assists" real, "team" text, "venue" text, "opponent" text, "competition" text, "total_goals" real, "total_assists" real ); Question: Which opponent plays against the Pohang Steelers? <|assistant|> SELECT "name" FROM "members" WHERE "opponent"='pohang steelers';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "members" ( "name" text, "date" text, "goals" real, "assists" real, "team" text, "venue" text, "opponent" text, "competition" text, "total_goals" real, "total_assists" real ); Question: What competition had more than 40 assists? <|assistant|> SELECT "competition" FROM "members" WHERE "assists">40;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "pairs" ( "rank" real, "name" text, "nation" text, "points" real, "places" real ); Question: What Nation Placed 122.5? <|assistant|> SELECT "nation" FROM "pairs" WHERE "places"=122.5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "pairs" ( "rank" real, "name" text, "nation" text, "points" real, "places" real ); Question: What is the Places amount of the United States Ranking 8? <|assistant|> SELECT AVG("places") FROM "pairs" WHERE "nation"='united states' AND "rank"=8;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "radio_series" ( "date" text, "episode" real, "performer_1" text, "performer_2" text, "performer_3" text, "performer_4" text ); Question: What is the average episode number where jimmy mulville was the 4th performer? <|assistant|> SELECT AVG("episode") FROM "radio_series" WHERE "performer_4"='jimmy mulville';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "radio_series" ( "date" text, "episode" real, "performer_1" text, "performer_2" text, "performer_3" text, "performer_4" text ); Question: What is the total number of episodes where hugh laurie was the 3rd performer? <|assistant|> SELECT COUNT("episode") FROM "radio_series" WHERE "performer_3"='hugh laurie';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "radio_series" ( "date" text, "episode" real, "performer_1" text, "performer_2" text, "performer_3" text, "performer_4" text ); Question: What is the lowest episode number where john bird was the 4th performer? <|assistant|> SELECT MIN("episode") FROM "radio_series" WHERE "performer_4"='john bird';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "radio_series" ( "date" text, "episode" real, "performer_1" text, "performer_2" text, "performer_3" text, "performer_4" text ); Question: Who was the 3rd performer when Rory Bremner was the 4th performer? <|assistant|> SELECT "performer_3" FROM "radio_series" WHERE "performer_4"='rory bremner';<|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, "location" text, "time_et" text, "result" text, "record" text ); Question: What time did the game featuring the Detroit Lions at Three Rivers Stadium occur? <|assistant|> SELECT "time_et" FROM "schedule" WHERE "location"='three rivers stadium' AND "opponent"='detroit lions';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "by_configuration" ( "rocket" text, "country" text, "type" text, "launches" real, "successes" real, "failures" real, "partial_failures" real ); Question: What is the highest number of successful launches associated with over 1 launch and under 0 fails? <|assistant|> SELECT MAX("successes") FROM "by_configuration" WHERE "launches">1 AND "failures"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "by_configuration" ( "rocket" text, "country" text, "type" text, "launches" real, "successes" real, "failures" real, "partial_failures" real ); Question: What are the fewest partial failures associated with 1 launch, India, gslv type, and a Rocket of gslv mk ii? <|assistant|> SELECT MIN("partial_failures") FROM "by_configuration" WHERE "launches"=1 AND "country"='india' AND "type"='gslv' AND "rocket"='gslv mk ii';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "locomotives_in_service" ( "name" text, "locomotive_type" text, "wheel_arr" text, "builder" text, "year_built" real, "whistle" text, "in_traffic" text ); Question: What kind of locomotive is Winston Churchill? <|assistant|> SELECT "locomotive_type" FROM "locomotives_in_service" WHERE "name"='winston churchill';<|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: How many draws were there when there were points less than 23, 6 losses, and more than 21 against? <|assistant|> SELECT COUNT("drawn") FROM "campeonato_brasileiro_s_rie_a" WHERE "points"<23 AND "lost"=6 AND "against">21;<|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 smallest amount of draws when the position is less than 7 and the against is 19? <|assistant|> SELECT MIN("drawn") FROM "campeonato_brasileiro_s_rie_a" WHERE "position"<7 AND "against"=19;<|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 amount of plays for fluminense? <|assistant|> SELECT MAX("played") FROM "campeonato_brasileiro_s_rie_a" WHERE "team"='fluminense';<|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 least amount of points when there were less than 4 losses and less than 16 against? <|assistant|> SELECT MIN("points") FROM "campeonato_brasileiro_s_rie_a" WHERE "lost"<4 AND "against"<16;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "available_games" ( "title" text, "publisher" text, "developer" text, "release_date" text, "esrb" text ); Question: Who does Rockstar Games use as a developer? <|assistant|> SELECT "developer" FROM "available_games" WHERE "publisher"='rockstar games';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "available_games" ( "title" text, "publisher" text, "developer" text, "release_date" text, "esrb" text ); Question: When Did Microsoft Game Studios release Amped: Freestyle Snowboarding? <|assistant|> SELECT "release_date" FROM "available_games" WHERE "publisher"='microsoft game studios' AND "title"='amped: freestyle snowboarding';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "saturday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "10_00" text, "10_30" text ); Question: Which 10:30 has an 8:30 of la soirée du hockey? <|assistant|> SELECT "10_30" FROM "saturday" WHERE "8_30"='la soirée du hockey';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "saturday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "10_00" text, "10_30" text ); Question: Which 7:30 has an 8:00 of movies & specials? <|assistant|> SELECT "7_30" FROM "saturday" WHERE "8_00"='movies & specials';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "saturday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "10_00" text, "10_30" text ); Question: Which 10:30 has an 7:30 of earth: final conflict? <|assistant|> SELECT "10_30" FROM "saturday" WHERE "7_30"='earth: final conflict';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "saturday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "10_00" text, "10_30" text ); Question: Which 8:00 has a 10:00 of movies & specials? <|assistant|> SELECT "8_00" FROM "saturday" WHERE "10_00"='movies & specials';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "saturday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "10_00" text, "10_30" text ); Question: Which 7:30 has a 10:30 of le grand journal? <|assistant|> SELECT "7_30" FROM "saturday" WHERE "10_30"='le grand journal';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "saturday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "10_00" text, "10_30" text ); Question: Which 7:00 has an 8:00 of la soirée du hockey? <|assistant|> SELECT "7_00" FROM "saturday" WHERE "8_00"='la soirée du hockey';<|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: Which Score has a Home of quebec nordiques, and a Visitor of vancouver blazers on february 28? <|assistant|> SELECT "score" FROM "game_log" WHERE "home"='quebec nordiques' AND "visitor"='vancouver blazers' AND "date"='february 28';<|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: When has a Visitor of new england whalers, and a Record of 9–9–1? Question 2 <|assistant|> SELECT "date" FROM "game_log" WHERE "visitor"='new england whalers' AND "record"='9–9–1';<|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: Which Home has a Visitor of quebec nordiques, and a Score of 3–4, and a Record of 8–8–1? <|assistant|> SELECT "home" FROM "game_log" WHERE "visitor"='quebec nordiques' AND "score"='3–4' AND "record"='8–8–1';<|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: WHich Score has a Record of 31–28–3? <|assistant|> SELECT "score" FROM "game_log" WHERE "record"='31–28–3';<|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: When has Score of 4–5, and a Record of 21–21–3? <|assistant|> SELECT "date" FROM "game_log" WHERE "score"='4–5' AND "record"='21–21–3';<|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 is the Score of a Record 24–23–3? <|assistant|> SELECT "score" FROM "game_log" WHERE "record"='24–23–3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medalists" ( "medal" text, "name" text, "games" text, "sport" text, "event" text ); Question: During which games did Tunisia win gold in the men's 5000 m? <|assistant|> SELECT "games" FROM "medalists" WHERE "event"='men''s 5000 m' AND "medal"='gold';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medalists" ( "medal" text, "name" text, "games" text, "sport" text, "event" text ); Question: What medal was won in the men's light welterweight event at the 1996 Atlanta games? <|assistant|> SELECT "medal" FROM "medalists" WHERE "event"='men''s light welterweight' AND "games"='1996 atlanta';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medalists" ( "medal" text, "name" text, "games" text, "sport" text, "event" text ); Question: At which games did Tunisia win a bronze in the men's 1500 m freestyle? <|assistant|> SELECT "games" FROM "medalists" WHERE "medal"='bronze' AND "event"='men''s 1500 m freestyle';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medalists" ( "medal" text, "name" text, "games" text, "sport" text, "event" text ); Question: What medal was won in the men's 5000 m event? <|assistant|> SELECT "medal" FROM "medalists" WHERE "event"='men''s 5000 m';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "tuesday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text, "10_30" text ); Question: What is on the at 8:00 on the same channel that has Costello on at 8:30? <|assistant|> SELECT "8_00" FROM "tuesday" WHERE "8_30"='costello';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "tuesday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text, "10_30" text ); Question: What is on at 7:30 on the same channel as Wheel of Fortune at 7:00? <|assistant|> SELECT "7_30" FROM "tuesday" WHERE "7_00"='wheel of fortune';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "tuesday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text, "10_30" text ); Question: What is on at 8:00 on the same change as W-Five at 10:00? <|assistant|> SELECT "8_00" FROM "tuesday" WHERE "10_00"='w-five';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "tuesday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text, "10_30" text ); Question: What is on at 9:30 on the same channel as Fin du Monde at 10:00? <|assistant|> SELECT "9_30" FROM "tuesday" WHERE "10_00"='fin du monde';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "tuesday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text, "10_30" text ); Question: What is on at 8:30 on the same channel as Les Machos at 9:00? <|assistant|> SELECT "8_30" FROM "tuesday" WHERE "9_00"='les machos';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "melodifestivalen_2001" ( "draw" real, "artist" text, "song" text, "points" real, "place" text ); Question: What is the draw with less than 107 points by the artist Jan Johansen? <|assistant|> SELECT COUNT("draw") FROM "melodifestivalen_2001" WHERE "artist"='jan johansen' AND "points"<107;<|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: In what Year did the Norton Team have 0 Points and 350cc Class? <|assistant|> SELECT AVG("year") FROM "motorcycle_grand_prix_results" WHERE "class"='350cc' AND "team"='norton' AND "points"<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 Wins before 1960 with less than 2 Points? <|assistant|> SELECT SUM("wins") FROM "motorcycle_grand_prix_results" WHERE "year"<1960 AND "points"<2;<|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 was the earliest Year the Linto Team had less than 15 Points with more than 0 Wins? <|assistant|> SELECT MIN("year") FROM "motorcycle_grand_prix_results" WHERE "wins">0 AND "team"='linto' AND "points"<15;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008_2009_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text ); Question: What were the points for a team that 414 points against? <|assistant|> SELECT "points_for" FROM "2008_2009_table" WHERE "points_against"='414';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008_2009_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text ); Question: Who was the player that had drawn 1 and tried for 20? <|assistant|> SELECT "played" FROM "2008_2009_table" WHERE "drawn"='1' AND "tries_for"='20';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008_2009_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text ); Question: What were the points for that had a game where there was 678 against? <|assistant|> SELECT "points_for" FROM "2008_2009_table" WHERE "points_against"='678';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008_2009_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text ); Question: What were the points against in a game that was played correct as of 2009-05-16? <|assistant|> SELECT "points_against" FROM "2008_2009_table" WHERE "played"='correct as of 2009-05-16';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008_2009_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text ); Question: What was the tries again llanishen rfc? <|assistant|> SELECT "tries_against" FROM "2008_2009_table" WHERE "club"='llanishen rfc';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2008_2009_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text ); Question: What was drawn for llanishen rfc? <|assistant|> SELECT "drawn" FROM "2008_2009_table" WHERE "club"='llanishen rfc';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "district" real, "incumbent" text, "2008_status" text, "democratic" text, "republican" text ); Question: Which District has a 2008 Status of re-election, and a Democratic david price? <|assistant|> SELECT AVG("district") FROM "summary" WHERE "2008_status"='re-election' AND "democratic"='david price';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "district" real, "incumbent" text, "2008_status" text, "democratic" text, "republican" text ); Question: Which District has a Republican of dan mansell? <|assistant|> SELECT AVG("district") FROM "summary" WHERE "republican"='dan mansell';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "summary" ( "district" real, "incumbent" text, "2008_status" text, "democratic" text, "republican" text ); Question: Which Republican has a District of 10? <|assistant|> SELECT "republican" FROM "summary" WHERE "district"=10;<|endoftext|>