text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "achievements" ( "year" real, "competition" text, "venue" text, "position" text, "event" text ); Question: what is the venue when the competition is asian games, the event is 4x400 m relay and the year is 2002? <|assistant|> SELECT "venue" FROM "achievements" WHERE "competition"='asian games' AND "event"='4x400 m relay' AND "year"=2002;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "international_broadcasts_and_voting" ( "voting_order" real, "country" text, "spokespersons" text, "commentator" text, "broadcaster" text ); Question: During the voting order 11, when the commentator was pierre tchernia, who was the spokesperson? <|assistant|> SELECT "spokespersons" FROM "international_broadcasts_and_voting" WHERE "commentator"='pierre tchernia' AND "voting_order"=11;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "international_broadcasts_and_voting" ( "voting_order" real, "country" text, "spokespersons" text, "commentator" text, "broadcaster" text ); Question: What was the voting order when bunny carr was the commentator? <|assistant|> SELECT SUM("voting_order") FROM "international_broadcasts_and_voting" WHERE "commentator"='bunny carr';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "international_broadcasts_and_voting" ( "voting_order" real, "country" text, "spokespersons" text, "commentator" text, "broadcaster" text ); Question: Who was the commentator when the spokesperson was michael aspel? <|assistant|> SELECT "commentator" FROM "international_broadcasts_and_voting" WHERE "spokespersons"='michael aspel';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "international_broadcasts_and_voting" ( "voting_order" real, "country" text, "spokespersons" text, "commentator" text, "broadcaster" text ); Question: What was the voting order when the commentator was renato tagliani? <|assistant|> SELECT "voting_order" FROM "international_broadcasts_and_voting" WHERE "commentator"='renato tagliani';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" real, "gold" real, "silver" real, "bronze" real, "total" real ); Question: Which Bronze has a Total smaller than 1? <|assistant|> SELECT AVG("bronze") FROM "medal_table" WHERE "total"<1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" real, "gold" real, "silver" real, "bronze" real, "total" real ); Question: How much Silver has a Bronze larger than 1, and a Gold of 0, and a Rank smaller than 4? <|assistant|> SELECT COUNT("silver") FROM "medal_table" WHERE "bronze">1 AND "gold"=0 AND "rank"<4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" real, "gold" real, "silver" real, "bronze" real, "total" real ); Question: Which Bronze has a Rank of 4, and a Gold smaller than 0? <|assistant|> SELECT MAX("bronze") FROM "medal_table" WHERE "rank"=4 AND "gold"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medal_table" ( "rank" real, "gold" real, "silver" real, "bronze" real, "total" real ); Question: How much Gold has a Bronze smaller than 2, and a Silver of 0, and a Rank larger than 3? <|assistant|> SELECT SUM("gold") FROM "medal_table" WHERE "bronze"<2 AND "silver"=0 AND "rank">3;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mother_tongue_language_2006_and_2011" ( "mother_tongue" text, "population_2006" real, "percentage_2006" text, "population_2011" real, "percentage_2011" text ); Question: What percentage of the 2011 population had a mother tongue language that was spoken by 45.22% of the population in 2006 (over 120)? <|assistant|> SELECT "percentage_2011" FROM "mother_tongue_language_2006_and_2011" WHERE "population_2006">120 AND "percentage_2006"='45.22%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mother_tongue_language_2006_and_2011" ( "mother_tongue" text, "population_2006" real, "percentage_2006" text, "population_2011" real, "percentage_2011" text ); Question: What is the total number of people in 2011 speaking the mother tongue language spoken by 120 in 2006? <|assistant|> SELECT COUNT("population_2011") FROM "mother_tongue_language_2006_and_2011" WHERE "population_2006"=120;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mother_tongue_language_2006_and_2011" ( "mother_tongue" text, "population_2006" real, "percentage_2006" text, "population_2011" real, "percentage_2011" text ); Question: How many people ha Romanian as their mother tongue in 2006? <|assistant|> SELECT MAX("population_2006") FROM "mother_tongue_language_2006_and_2011" WHERE "mother_tongue"='romanian';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mother_tongue_language_2006_and_2011" ( "mother_tongue" text, "population_2006" real, "percentage_2006" text, "population_2011" real, "percentage_2011" text ); Question: What is the mother tongue language shared by 300 people in 2006? <|assistant|> SELECT "mother_tongue" FROM "mother_tongue_language_2006_and_2011" WHERE "population_2006"=300;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mother_tongue_language_2006_and_2011" ( "mother_tongue" text, "population_2006" real, "percentage_2006" text, "population_2011" real, "percentage_2011" text ); Question: What percentage of people in 2011 had a mother tongue that was shared by less than 8,085 in 2006 and less than 145 in 2011? <|assistant|> SELECT "percentage_2011" FROM "mother_tongue_language_2006_and_2011" WHERE "population_2006"<'8,085' AND "population_2011"<145;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results" ( "draw" real, "language" text, "song" text, "english_translation" text, "place" real, "points" real ); Question: What's the total number of points when the English translation is Long Live Life and the draw is less than 2? <|assistant|> SELECT COUNT("points") FROM "results" WHERE "english_translation"='long live life' AND "draw"<2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results" ( "draw" real, "language" text, "song" text, "english_translation" text, "place" real, "points" real ); Question: What's the language of Draw number 9? <|assistant|> SELECT "language" FROM "results" WHERE "draw"=9;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results" ( "draw" real, "language" text, "song" text, "english_translation" text, "place" real, "points" real ); Question: What are the lowest points when the language is Portuguese? <|assistant|> SELECT MIN("points") FROM "results" WHERE "language"='portuguese';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_six_s_ultra_prominent_summit_of_the_" ( "rank" real, "summit" text, "country" text, "island" text, "col_m" real ); Question: What's the island with a summit of Haleakalā? <|assistant|> SELECT "island" FROM "the_six_s_ultra_prominent_summit_of_the_" WHERE "summit"='haleakalā';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_six_s_ultra_prominent_summit_of_the_" ( "rank" real, "summit" text, "country" text, "island" text, "col_m" real ); Question: What's the lowest Col ranked less than 6 with an Island of Molokaʻi? <|assistant|> SELECT MIN("col_m") FROM "the_six_s_ultra_prominent_summit_of_the_" WHERE "island"='island of molokaʻi' AND "rank"<6;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_six_s_ultra_prominent_summit_of_the_" ( "rank" real, "summit" text, "country" text, "island" text, "col_m" real ); Question: What's the col (m) ranked more than 4 with a summit of Kawaikini? <|assistant|> SELECT "col_m" FROM "the_six_s_ultra_prominent_summit_of_the_" WHERE "rank">4 AND "summit"='kawaikini';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_six_s_ultra_prominent_summit_of_the_" ( "rank" real, "summit" text, "country" text, "island" text, "col_m" real ); Question: What's the rank when the col (m) is less than 33 and has a summit of Haleakalā? <|assistant|> SELECT SUM("rank") FROM "the_six_s_ultra_prominent_summit_of_the_" WHERE "col_m"<33 AND "summit"='haleakalā';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_six_s_ultra_prominent_summit_of_the_" ( "rank" real, "summit" text, "country" text, "island" text, "col_m" real ); Question: What's the summit when the rank is less than 2 and has a col (m) of 0? <|assistant|> SELECT "summit" FROM "the_six_s_ultra_prominent_summit_of_the_" WHERE "col_m"=0 AND "rank"<2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "games" ( "edition" text, "year" text, "city" text, "country" text, "date" text, "no_of_events" real, "top_team" text ); Question: Which Year has an Edition of 41st? <|assistant|> SELECT "year" FROM "games" WHERE "edition"='41st';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "games" ( "edition" text, "year" text, "city" text, "country" text, "date" text, "no_of_events" real, "top_team" text ); Question: How many Events have a Country of trinidad and tobago, and a Date of march 30-april 1? <|assistant|> SELECT "no_of_events" FROM "games" WHERE "country"='trinidad and tobago' AND "date"='march 30-april 1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "games" ( "edition" text, "year" text, "city" text, "country" text, "date" text, "no_of_events" real, "top_team" text ); Question: Which Country has a Top Team of jam, and an Edition of 31st? <|assistant|> SELECT "country" FROM "games" WHERE "top_team"='jam' AND "edition"='31st';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_titles_22_19" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents_in_the_final" text, "score_in_the_final" text ); Question: What was the outcome of the final with a partner of Brett Steven? <|assistant|> SELECT "outcome" FROM "doubles_titles_22_19" WHERE "partner"='brett steven';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_titles_21" ( "date" text, "tournament" text, "surface" text, "partner" text, "opponent_in_the_final" text, "score_in_the_final" text ); Question: On what type of surface was the tournament of Italy f28? <|assistant|> SELECT "surface" FROM "doubles_titles_21" WHERE "tournament"='italy f28';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_titles_21" ( "date" text, "tournament" text, "surface" text, "partner" text, "opponent_in_the_final" text, "score_in_the_final" text ); Question: Who was the opponent in the final of the Senegal f2 tournament> <|assistant|> SELECT "opponent_in_the_final" FROM "doubles_titles_21" WHERE "tournament"='senegal f2';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); Question: What's the score on December 12, 1998? <|assistant|> SELECT "score" FROM "international_goals" WHERE "date"='december 12, 1998';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); Question: What was the venue when the score was 7-1? <|assistant|> SELECT "venue" FROM "international_goals" WHERE "score"='7-1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); Question: What's the score of the friendly competition? <|assistant|> SELECT "score" 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" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); Question: What's the competition that happened in Singapore? <|assistant|> SELECT "competition" FROM "international_goals" WHERE "venue"='singapore';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); Question: What's the venue of the 1995 Southeast Asian Games? <|assistant|> SELECT "venue" FROM "international_goals" WHERE "competition"='1995 southeast asian games';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list" ( "president" text, "date_of_birth" text, "date_of_inauguration" text, "age_at_inauguration" text, "end_of_term" text, "length_of_retirement" text, "date_of_death" text, "lifespan" text ); Question: What was the date of the inauguration in the row with an entry of lifespan in the lifespan column? <|assistant|> SELECT "date_of_inauguration" FROM "list" WHERE "lifespan"='lifespan';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list" ( "president" text, "date_of_birth" text, "date_of_inauguration" text, "age_at_inauguration" text, "end_of_term" text, "length_of_retirement" text, "date_of_death" text, "lifespan" text ); Question: What was the date of death entry in the row that has a date of inauguration entry of date of inauguration? <|assistant|> SELECT "date_of_death" FROM "list" WHERE "date_of_inauguration"='date of inauguration';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list" ( "president" text, "date_of_birth" text, "date_of_inauguration" text, "age_at_inauguration" text, "end_of_term" text, "length_of_retirement" text, "date_of_death" text, "lifespan" text ); Question: What is the length of retirement for president Sharma, Shankar Shankar Dayal Sharma? <|assistant|> SELECT "length_of_retirement" FROM "list" WHERE "president"='sharma, shankar shankar dayal sharma';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results_of_heat_5" ( "draw" real, "artist" text, "song" text, "percentage" text, "place" real ); Question: How many draw is in a place that is less than 1? <|assistant|> SELECT COUNT("draw") FROM "results_of_heat_5" WHERE "place"<1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results_of_heat_5" ( "draw" real, "artist" text, "song" text, "percentage" text, "place" real ); Question: What percentage has a less than 5 place, and a greater than 3 draw, and "S Teb" as the song? <|assistant|> SELECT "percentage" FROM "results_of_heat_5" WHERE "place"<5 AND "draw">3 AND "song"='\"s teb\"';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "results_of_heat_5" ( "draw" real, "artist" text, "song" text, "percentage" text, "place" real ); Question: Emilya Valenti has what draw average? <|assistant|> SELECT AVG("draw") FROM "results_of_heat_5" WHERE "artist"='emilya valenti';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_line_series" ( "airing_date" text, "english_title_chinese_title" text, "number_of_episodes" real, "genre" text, "official_website" text ); Question: What's the airing date of Armed Reaction 陀槍師姐 with 20 episodes in the Modern Action genre having an official website? <|assistant|> SELECT "airing_date" FROM "second_line_series" WHERE "official_website"='official website' AND "number_of_episodes"=20 AND "genre"='modern action' AND "english_title_chinese_title"='armed reaction 陀槍師姐';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_line_series" ( "airing_date" text, "english_title_chinese_title" text, "number_of_episodes" real, "genre" text, "official_website" text ); Question: What's the airing date for the show with 62 episodes? <|assistant|> SELECT "airing_date" FROM "second_line_series" WHERE "number_of_episodes"=62;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_line_series" ( "airing_date" text, "english_title_chinese_title" text, "number_of_episodes" real, "genre" text, "official_website" text ); Question: What's the official website of Burning Flame 烈火雄心 with 22 episodes? <|assistant|> SELECT "official_website" FROM "second_line_series" WHERE "number_of_episodes">22 AND "english_title_chinese_title"='burning flame 烈火雄心';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "qualified_competitors" ( "position" text, "gymnast" text, "a_score" real, "b_score" real, "total" real ); Question: what is the position for the competitor that has a score more than 7 <|assistant|> SELECT "position" FROM "qualified_competitors" WHERE "a_score">7;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "qualified_competitors" ( "position" text, "gymnast" text, "a_score" real, "b_score" real, "total" real ); Question: what is the score for the 5th position and a score less than 7 <|assistant|> SELECT MIN("b_score") FROM "qualified_competitors" WHERE "position"='5th' AND "a_score"<7;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "qualified_competitors" ( "position" text, "gymnast" text, "a_score" real, "b_score" real, "total" real ); Question: what is the total scored for the 8th position and a score more than 6.6 <|assistant|> SELECT MAX("total") FROM "qualified_competitors" WHERE "position"='8th' AND "a_score">6.6;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "women" ( "event" text, "time" text, "nationality" text, "date" text, "meet" text, "location" text ); Question: What is the Meet of the Event with a Time of 7:55.02? <|assistant|> SELECT "meet" FROM "women" WHERE "time"='7:55.02';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "women" ( "event" text, "time" text, "nationality" text, "date" text, "meet" text, "location" text ); Question: What is the Location of the Event with a Time of 2:22.32? <|assistant|> SELECT "location" FROM "women" WHERE "time"='2:22.32';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "type_i" ( "part_number" text, "pins" text, "body_width_mm" real, "body_length_mm" real, "lead_pitch_mm" real ); Question: Which Body Width/mm has a Lead Pitch/mm smaller than 0.55, and a Body Length/mm larger than 18.4? <|assistant|> SELECT MIN("body_width_mm") FROM "type_i" WHERE "lead_pitch_mm"<0.55 AND "body_length_mm">18.4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "type_i" ( "part_number" text, "pins" text, "body_width_mm" real, "body_length_mm" real, "lead_pitch_mm" real ); Question: Which Body Length/mm has a Lead Pitch/mm smaller than 0.5? <|assistant|> SELECT AVG("body_length_mm") FROM "type_i" WHERE "lead_pitch_mm"<0.5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "type_i" ( "part_number" text, "pins" text, "body_width_mm" real, "body_length_mm" real, "lead_pitch_mm" real ); Question: How much Body Width/mm has a Body Length/mm of 18.4, and Pins of 40? <|assistant|> SELECT COUNT("body_width_mm") FROM "type_i" WHERE "body_length_mm"=18.4 AND "pins"='40';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "type_i" ( "part_number" text, "pins" text, "body_width_mm" real, "body_length_mm" real, "lead_pitch_mm" real ); Question: Which Body Width/mm has a Lead Pitch/mm smaller than 0.55, and a Part Number of tsop48? <|assistant|> SELECT MIN("body_width_mm") FROM "type_i" WHERE "lead_pitch_mm"<0.55 AND "part_number"='tsop48';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "type_i" ( "part_number" text, "pins" text, "body_width_mm" real, "body_length_mm" real, "lead_pitch_mm" real ); Question: Which Lead Pitch/mm has a Part Number of tsop40, and a Body Length/mm larger than 18.4? <|assistant|> SELECT MAX("lead_pitch_mm") FROM "type_i" WHERE "part_number"='tsop40' AND "body_length_mm">18.4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "toronto_blue_jays_vs_oakland_athletics" ( "game" real, "date" text, "location" text, "time" text, "attendance" real ); Question: What was the least attendance when the time was 3:15? <|assistant|> SELECT MIN("attendance") FROM "toronto_blue_jays_vs_oakland_athletics" WHERE "time"='3:15';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "toronto_blue_jays_vs_oakland_athletics" ( "game" real, "date" text, "location" text, "time" text, "attendance" real ); Question: What date was at Oakland-Alameda County Coliseum with a time of 3:40 and a game less than 5? <|assistant|> SELECT "date" FROM "toronto_blue_jays_vs_oakland_athletics" WHERE "game"<5 AND "location"='oakland-alameda county coliseum' AND "time"='3:40';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "by_city" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: Which Bronze has a Gold larger than 1, and a Total larger than 11, and a Silver larger than 5? <|assistant|> SELECT AVG("bronze") FROM "by_city" WHERE "gold">1 AND "total">11 AND "silver">5;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "by_city" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: How many silvers have more than 2 golds? <|assistant|> SELECT COUNT("silver") FROM "by_city" WHERE "gold">2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "usa_usage_share_data_from_stat_owl_com" ( "internet_explorer" text, "firefox_other_mozilla" text, "chrome" text, "safari" text, "opera" text ); Question: What percentage of browsers were using Firefox or other Mozilla browsers during the period in which 1.93% were using Chrome? <|assistant|> SELECT "firefox_other_mozilla" FROM "usa_usage_share_data_from_stat_owl_com" WHERE "chrome"='1.93%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "usa_usage_share_data_from_stat_owl_com" ( "internet_explorer" text, "firefox_other_mozilla" text, "chrome" text, "safari" text, "opera" text ); Question: What percentage of browsers were using Internet Explorer during the period in which 24.91% were using Chrome? <|assistant|> SELECT "internet_explorer" FROM "usa_usage_share_data_from_stat_owl_com" WHERE "chrome"='24.91%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "usa_usage_share_data_from_stat_owl_com" ( "internet_explorer" text, "firefox_other_mozilla" text, "chrome" text, "safari" text, "opera" text ); Question: What percentage of browsers were using Chrome during the period in which 72.03% were using Internet Explorer? <|assistant|> SELECT "chrome" FROM "usa_usage_share_data_from_stat_owl_com" WHERE "internet_explorer"='72.03%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "usa_usage_share_data_from_stat_owl_com" ( "internet_explorer" text, "firefox_other_mozilla" text, "chrome" text, "safari" text, "opera" text ); Question: What percentage of browsers were using Safari during the period in which 2.05% were using Chrome? <|assistant|> SELECT "safari" FROM "usa_usage_share_data_from_stat_owl_com" WHERE "chrome"='2.05%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "usa_usage_share_data_from_stat_owl_com" ( "internet_explorer" text, "firefox_other_mozilla" text, "chrome" text, "safari" text, "opera" text ); Question: What percentage of browsers were using Chrome during the period in which 0.30% were using Opera and 6.77% were using Safari? <|assistant|> SELECT "chrome" FROM "usa_usage_share_data_from_stat_owl_com" WHERE "opera"='0.30%' AND "safari"='6.77%';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "international_broadcasts" ( "country" text, "tv_network_s" text, "series_premiere" text, "weekly_schedule" text, "status" text ); Question: Which TV network was located in Brazil? <|assistant|> SELECT "tv_network_s" FROM "international_broadcasts" WHERE "country"='brazil';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "international_broadcasts" ( "country" text, "tv_network_s" text, "series_premiere" text, "weekly_schedule" text, "status" text ); Question: What country has a series premier of unknown and mbc action as their TV network? <|assistant|> SELECT "country" FROM "international_broadcasts" WHERE "series_premiere"='unknown' AND "tv_network_s"='mbc action';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "international_broadcasts" ( "country" text, "tv_network_s" text, "series_premiere" text, "weekly_schedule" text, "status" text ); Question: What is the weekly schedule for the network sky italia? <|assistant|> SELECT "weekly_schedule" FROM "international_broadcasts" WHERE "tv_network_s"='sky italia';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medals_table" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: How many Gold medals for the Nations with 6 or more Bronze medals and 18 or more Silver? <|assistant|> SELECT AVG("gold") FROM "medals_table" WHERE "bronze">6 AND "silver">18;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medals_table" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: How many Gold medals did the Soviet Union receive? <|assistant|> SELECT AVG("gold") FROM "medals_table" WHERE "nation"='soviet union';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_roster" ( "name" text, "pos" text, "height" text, "weight" text, "2012_club" text ); Question: What pos is John Mann Category:Articles with Hcards with the New York Athletic Club? <|assistant|> SELECT "pos" FROM "current_roster" WHERE "2012_club"='new york athletic club' AND "name"='john mann category:articles with hcards';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_roster" ( "name" text, "pos" text, "height" text, "weight" text, "2012_club" text ); Question: What's the weight when the pos is CB and is part of the New York Athletic Club? <|assistant|> SELECT "weight" FROM "current_roster" WHERE "pos"='cb' AND "2012_club"='new york athletic club';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "current_roster" ( "name" text, "pos" text, "height" text, "weight" text, "2012_club" text ); Question: What's the name of the person in the CF Pos? <|assistant|> SELECT "name" FROM "current_roster" WHERE "pos"='cf';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "appearances_and_goals" ( "name" text, "position" text, "league_apps" text, "league_goals" real, "fa_cup_apps" text, "fa_cup_goals" real, "league_cup_apps" text, "league_cup_goals" real, "total_apps" text, "total_goals" real ); Question: Which league cup apps has FA as the cup apps of 5? <|assistant|> SELECT "league_cup_apps" FROM "appearances_and_goals" WHERE "fa_cup_apps"='5';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "appearances_and_goals" ( "name" text, "position" text, "league_apps" text, "league_goals" real, "fa_cup_apps" text, "fa_cup_goals" real, "league_cup_apps" text, "league_cup_goals" real, "total_apps" text, "total_goals" real ); Question: What is the lowest league goals that has fw as the position, total goals greater than 9, with league cup goals greater than 4? <|assistant|> SELECT MIN("league_goals") FROM "appearances_and_goals" WHERE "position"='fw' AND "total_goals">9 AND "league_cup_goals">4;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "achievements" ( "year" real, "tournament" text, "venue" text, "result" text, "event" text ); Question: What is the earliest year that a team event was included at Vilamoura, Portugal? <|assistant|> SELECT MIN("year") FROM "achievements" WHERE "event"='team' AND "venue"='vilamoura, portugal';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "achievements" ( "year" real, "tournament" text, "venue" text, "result" text, "event" text ); Question: In which event before 2001 did the athlete place 16th? <|assistant|> SELECT "event" FROM "achievements" WHERE "year"<2001 AND "result"='16th';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "achievements" ( "year" real, "tournament" text, "venue" text, "result" text, "event" text ); Question: In which tournament was the result 25th? <|assistant|> SELECT "tournament" FROM "achievements" WHERE "result"='25th';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "national_final_28_march_1992" ( "draw" real, "artist" text, "song" text, "points" real, "place" real ); Question: What is the number of points for the song "viva rock 'n' roll", with more than 3 Draws? <|assistant|> SELECT AVG("points") FROM "national_final_28_march_1992" WHERE "song"='\"viva rock ''n'' roll\"' AND "draw">3;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "national_final_28_march_1992" ( "draw" real, "artist" text, "song" text, "points" real, "place" real ); Question: What artist has more than 6 draws, and in a place higher than 14? <|assistant|> SELECT "artist" FROM "national_final_28_march_1992" WHERE "draw">6 AND "place">14;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "national_final_28_march_1992" ( "draw" real, "artist" text, "song" text, "points" real, "place" real ); Question: What is the highest Place with more than 3 draws, for the Song "dajana", with less than 31 points? <|assistant|> SELECT MAX("place") FROM "national_final_28_march_1992" WHERE "draw">3 AND "song"='\"dajana\"' AND "points"<31;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "125_seats_needed_for_a_majority" ( "date_released" text, "institute" text, "social_democratic" text, "socialist" text, "green_communist" text, "democratic_renewal" text, "democratic_and_social_centre" text, "lead" text ); Question: What Social Democratic has a Democratic and Social Centre of 10.0% 22 seats? <|assistant|> SELECT "social_democratic" FROM "125_seats_needed_for_a_majority" WHERE "democratic_and_social_centre"='10.0% 22 seats';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "125_seats_needed_for_a_majority" ( "date_released" text, "institute" text, "social_democratic" text, "socialist" text, "green_communist" text, "democratic_renewal" text, "democratic_and_social_centre" text, "lead" text ); Question: What Social Democratic has the Democratic and Social Centre of 4.4% 4 seats? <|assistant|> SELECT "social_democratic" FROM "125_seats_needed_for_a_majority" WHERE "democratic_and_social_centre"='4.4% 4 seats';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "yearly_basis" ( "year" text, "location" text, "number_of_teams" text, "player_of_the_tournament" text, "top_goalscorer_s" text, "best_goalkeeper" text ); Question: How many teams were at the 2007 details tournament where there a top goalscorer was not awarded? <|assistant|> SELECT "number_of_teams" FROM "yearly_basis" WHERE "top_goalscorer_s"='not awarded' AND "year"='2007 details';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "yearly_basis" ( "year" text, "location" text, "number_of_teams" text, "player_of_the_tournament" text, "top_goalscorer_s" text, "best_goalkeeper" text ); Question: What is the location of the tournament where the best goalkeeper had 164 (8.2)? <|assistant|> SELECT "location" FROM "yearly_basis" WHERE "best_goalkeeper"='164 (8.2)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_to_season" ( "season" real, "level" text, "division" text, "section" text, "administration" text, "position" text ); Question: What section were they in when there were tier 2 in 1996? <|assistant|> SELECT "section" FROM "season_to_season" WHERE "level"='tier 2' AND "season"=1996;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "season_to_season" ( "season" real, "level" text, "division" text, "section" text, "administration" text, "position" text ); Question: What is the administration when the division was Ykkönen (first division), and they were in the 1st position in 1996? <|assistant|> SELECT "administration" FROM "season_to_season" WHERE "division"='ykkönen (first division)' AND "position"='1st' AND "season"=1996;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nominees" ( "year_ceremony" text, "actor_actress" text, "category" text, "film_title_used_in_nomination" text, "result" text ); Question: What was the film title that emma thompson was the actress nominated for best supporting actress? <|assistant|> SELECT "film_title_used_in_nomination" FROM "nominees" WHERE "actor_actress"='emma thompson' AND "category"='best supporting actress';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nominees" ( "year_ceremony" text, "actor_actress" text, "category" text, "film_title_used_in_nomination" text, "result" text ); Question: What category was al pacino nominated for in the film, glengarry glen ross? <|assistant|> SELECT "category" FROM "nominees" WHERE "actor_actress"='al pacino' AND "film_title_used_in_nomination"='glengarry glen ross';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nominees" ( "year_ceremony" text, "actor_actress" text, "category" text, "film_title_used_in_nomination" text, "result" text ); Question: What is the year when sigourney weaver was nominated for best actress? <|assistant|> SELECT "year_ceremony" FROM "nominees" WHERE "category"='best actress' AND "actor_actress"='sigourney weaver';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "nominees" ( "year_ceremony" text, "actor_actress" text, "category" text, "film_title_used_in_nomination" text, "result" text ); Question: What year was holly hunter a nominee? <|assistant|> SELECT "year_ceremony" FROM "nominees" WHERE "result"='nominee' AND "actor_actress"='holly hunter';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "south_carolina_counties_ranked_by_per_ca" ( "county" text, "per_capita_income" text, "median_household_income" text, "median_family_income" text, "population" real, "number_of_households" real ); Question: What is the per capita income of the county with a median family income of $40,492? <|assistant|> SELECT "per_capita_income" FROM "south_carolina_counties_ranked_by_per_ca" WHERE "median_family_income"='$40,492';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "screen_actors_guild" ( "year" real, "category" text, "recipients_and_nominees" text, "role_episode" text, "result" text ); Question: what is the earliest year when the result is won and the role/episode is fox mulder? <|assistant|> SELECT MIN("year") FROM "screen_actors_guild" WHERE "result"='won' AND "role_episode"='fox mulder';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "screen_actors_guild" ( "year" real, "category" text, "recipients_and_nominees" text, "role_episode" text, "result" text ); Question: what is the year when the role/episode is david duchovny? <|assistant|> SELECT "year" FROM "screen_actors_guild" WHERE "role_episode"='david duchovny';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "attendance" real ); Question: What date has 9 as the week? <|assistant|> SELECT "date" FROM "schedule" WHERE "week"=9;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "single_game" ( "rank" real, "player" text, "county" text, "tally" text, "total" real, "opposition" text ); Question: What is the average total of the 0-8 tally? <|assistant|> SELECT AVG("total") FROM "single_game" WHERE "tally"='0-8';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "single_game" ( "rank" real, "player" text, "county" text, "tally" text, "total" real, "opposition" text ); Question: What is the total rank of the match with tipperary as the opposition? <|assistant|> SELECT COUNT("rank") FROM "single_game" WHERE "opposition"='tipperary';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "single_game" ( "rank" real, "player" text, "county" text, "tally" text, "total" real, "opposition" text ); Question: What is the lowest total of player tommy ring, who has a rank greater than 1? <|assistant|> SELECT MIN("total") FROM "single_game" WHERE "player"='tommy ring' AND "rank">1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "single_game" ( "rank" real, "player" text, "county" text, "tally" text, "total" real, "opposition" text ); Question: What is the average rank of the match where offaly was the opposition and the total was greater than 9? <|assistant|> SELECT AVG("rank") FROM "single_game" WHERE "opposition"='offaly' AND "total">9;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "municipalities" ( "municipality" text, "inhabitants" real, "mayor" text, "party" text, "election" real ); Question: Which municipality has a party of Lega Friuli-VG that won elections before 2011? <|assistant|> SELECT "municipality" FROM "municipalities" WHERE "party"='lega friuli-vg' AND "election"<2011;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "municipalities" ( "municipality" text, "inhabitants" real, "mayor" text, "party" text, "election" real ); Question: Which party is Ettore Romoli from? <|assistant|> SELECT "party" FROM "municipalities" WHERE "mayor"='ettore romoli';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "campuses" ( "campus" text, "executive_director" text, "founded" real, "type" text, "location" text ); Question: What campus is in Brgy. Alangilan, Batangas City? <|assistant|> SELECT "campus" FROM "campuses" WHERE "location"='brgy. alangilan, batangas city';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "campuses" ( "campus" text, "executive_director" text, "founded" real, "type" text, "location" text ); Question: When was the Balayan, Batangas campus founded? <|assistant|> SELECT "founded" FROM "campuses" WHERE "location"='balayan, batangas';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "campuses" ( "campus" text, "executive_director" text, "founded" real, "type" text, "location" text ); Question: Who is the executive director of the Lemery, Batangas extension? <|assistant|> SELECT "executive_director" FROM "campuses" WHERE "type"='extension' AND "location"='lemery, batangas';<|endoftext|>