text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "external_links" ( "year" real, "champion" text, "score" text, "defeated" text, "location" text ); Question: what is the location when the champion is brigham young-hawaii, defeated is western oregon and the score is 3-0 (15-5, 15-9, 15-6)? <|assistant|> SELECT "location" FROM "external_links" WHERE "champion"='brigham young-hawaii' AND "defeated"='western oregon' AND "score"='3-0 (15-5, 15-9, 15-6)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "external_links" ( "year" real, "champion" text, "score" text, "defeated" text, "location" text ); Question: what is the year when the location is san diego, california and defeated is houston baptist (texas)? <|assistant|> SELECT COUNT("year") FROM "external_links" WHERE "location"='san diego, california' AND "defeated"='houston baptist (texas)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "units" ( "unit" text, "type" text, "gross_mw" text, "construction_start" text, "operation_start" text ); Question: Operation start of 2015 has what gross mw? <|assistant|> SELECT "gross_mw" FROM "units" WHERE "operation_start"='2015';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "units" ( "unit" text, "type" text, "gross_mw" text, "construction_start" text, "operation_start" text ); Question: Gross MW of 220, and a Unit of kakrapar 1 involves what operation start? <|assistant|> SELECT "operation_start" FROM "units" WHERE "gross_mw"='220' AND "unit"='kakrapar 1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "units" ( "unit" text, "type" text, "gross_mw" text, "construction_start" text, "operation_start" text ); Question: Type of phase ii has what gross mw? <|assistant|> SELECT "gross_mw" FROM "units" WHERE "type"='phase ii';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "units" ( "unit" text, "type" text, "gross_mw" text, "construction_start" text, "operation_start" text ); Question: Construction start of phase i includes what type? <|assistant|> SELECT "type" FROM "units" WHERE "construction_start"='phase i';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "units" ( "unit" text, "type" text, "gross_mw" text, "construction_start" text, "operation_start" text ); Question: Construction start of 1 december 1984 is what unit? <|assistant|> SELECT "unit" FROM "units" WHERE "construction_start"='1 december 1984';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "units" ( "unit" text, "type" text, "gross_mw" text, "construction_start" text, "operation_start" text ); Question: Construction start of phase ii has what operation start? <|assistant|> SELECT "operation_start" FROM "units" WHERE "construction_start"='phase ii';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sanskrit_and_pali_influence" ( "value" text, "khmer" text, "word_form" text, "ungegn" text, "ala_lc" text, "notes" text ); Question: what's the ungen for ត្រីទស? <|assistant|> SELECT "ungegn" FROM "sanskrit_and_pali_influence" WHERE "word_form"='ត្រីទស';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sanskrit_and_pali_influence" ( "value" text, "khmer" text, "word_form" text, "ungegn" text, "ala_lc" text, "notes" text ); Question: what notes have the khmer ២៨? <|assistant|> SELECT "notes" FROM "sanskrit_and_pali_influence" WHERE "khmer"='២៨';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "sanskrit_and_pali_influence" ( "value" text, "khmer" text, "word_form" text, "ungegn" text, "ala_lc" text, "notes" text ); Question: what's the ungegn for the ១០០ khmer? <|assistant|> SELECT "ungegn" FROM "sanskrit_and_pali_influence" WHERE "khmer"='១០០';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "inhabited_territories_of_the_united_stat" ( "territory" text, "abbr" text, "capital" text, "acquired" real, "territorial_status" text, "population_2010" real, "house_seat" real ); Question: What was the population of Puerto Rico in 2010? <|assistant|> SELECT MAX("population_2010") FROM "inhabited_territories_of_the_united_stat" WHERE "territory"='puerto rico';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "inhabited_territories_of_the_united_stat" ( "territory" text, "abbr" text, "capital" text, "acquired" real, "territorial_status" text, "population_2010" real, "house_seat" real ); Question: What is the territory that was acquired past 1899 and has a capital of saipan? <|assistant|> SELECT "territory" FROM "inhabited_territories_of_the_united_stat" WHERE "acquired">1899 AND "capital"='saipan';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "see_also" ( "representative" text, "title" text, "presentation_of_credentials" text, "termination_of_mission" text, "appointed_by" text ); Question: Name the termination of mission for appointed by of franklin pierce <|assistant|> SELECT "termination_of_mission" FROM "see_also" WHERE "appointed_by"='franklin pierce';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "see_also" ( "representative" text, "title" text, "presentation_of_credentials" text, "termination_of_mission" text, "appointed_by" text ); Question: Name the representative with presentation of credentials of august 16, 1928 <|assistant|> SELECT "representative" FROM "see_also" WHERE "presentation_of_credentials"='august 16, 1928';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "see_also" ( "representative" text, "title" text, "presentation_of_credentials" text, "termination_of_mission" text, "appointed_by" text ); Question: Name the representative appointed by george w. bush with presentation of credentials 9 november 2007 <|assistant|> SELECT "representative" FROM "see_also" WHERE "appointed_by"='george w. bush' AND "presentation_of_credentials"='9 november 2007';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "see_also" ( "representative" text, "title" text, "presentation_of_credentials" text, "termination_of_mission" text, "appointed_by" text ); Question: Name the title with representative edward h. strobel <|assistant|> SELECT "title" FROM "see_also" WHERE "representative"='edward h. strobel';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" real ); Question: Which Country that has 600? <|assistant|> SELECT "country" FROM "final_round" WHERE "money"=600;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: What is the to par that has macdonald smith as the player? <|assistant|> SELECT "to_par" FROM "second_round" WHERE "player"='macdonald smith';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: Which country has t6 as a place and 75-70=145 as the score? <|assistant|> SELECT "country" FROM "second_round" WHERE "place"='t6' AND "score"='75-70=145';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: What is the to par that has jimmy hines as the player? <|assistant|> SELECT "to_par" FROM "second_round" WHERE "player"='jimmy hines';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: Which score has t3 as the place? <|assistant|> SELECT "score" FROM "second_round" WHERE "place"='t3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: Which place has horton smith as the player? <|assistant|> SELECT "place" FROM "second_round" WHERE "player"='horton smith';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: Which place has United States as the country and Craig Wood as the player? <|assistant|> SELECT "place" FROM "second_round" WHERE "country"='united states' AND "player"='craig wood';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "2013" text ); Question: What was the 2013 finish for the tournament that had a 2007 finish of A? <|assistant|> SELECT "2013" FROM "singles_performance_timeline" WHERE "2007"='a';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "2013" text ); Question: What was the 2012 finish in the US Open? <|assistant|> SELECT "2012" FROM "singles_performance_timeline" WHERE "tournament"='us open';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "2013" text ); Question: Which tournament had a 2010 finish of 4R? <|assistant|> SELECT "tournament" FROM "singles_performance_timeline" WHERE "2010"='4r';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_championship" ( "18_september_2007_19_45" text, "preston_north_end" text, "home" text, "won_2_1" text, "5_754" real ); Question: Name the 18th september 2007-19:45 with preston north end of watford <|assistant|> SELECT "18_september_2007_19_45" FROM "the_championship" WHERE "preston_north_end"='watford';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "the_championship" ( "18_september_2007_19_45" text, "preston_north_end" text, "home" text, "won_2_1" text, "5_754" real ); Question: Name the won 2-1 for preston north end of preston <|assistant|> SELECT "won_2_1" FROM "the_championship" WHERE "preston_north_end"='preston';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "indy_500_results" ( "year" text, "start" text, "qual" text, "rank" text, "finish" text, "laps" real ); Question: What is the qualification for rank of 29 in 1957? <|assistant|> SELECT "qual" FROM "indy_500_results" WHERE "rank"='29' AND "year"='1957';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: What is the Place when the To par was +3 and Score was 74-73=147? <|assistant|> SELECT "place" FROM "second_round" WHERE "to_par"='+3' AND "score"='74-73=147';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: When the To par is E, what is the Score? <|assistant|> SELECT "score" FROM "second_round" WHERE "to_par"='e';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: What was Lloyd Mangrum's Score? <|assistant|> SELECT "score" FROM "second_round" WHERE "player"='lloyd mangrum';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: What Dave Douglas' Place? <|assistant|> SELECT "place" FROM "second_round" WHERE "player"='dave douglas';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: What's Chick Harbert's To par? <|assistant|> SELECT "to_par" FROM "second_round" WHERE "player"='chick harbert';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: What United States Player has a To par of +4 and a Score of 71-77=148? <|assistant|> SELECT "player" FROM "second_round" WHERE "country"='united states' AND "to_par"='+4' AND "score"='71-77=148';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" real ); Question: What is South Korea's to par value? <|assistant|> SELECT "to_par" FROM "final_round" WHERE "country"='south korea';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" real ); Question: What are Tiger Woods' average earnings? <|assistant|> SELECT AVG("money") FROM "final_round" WHERE "player"='tiger woods';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "round" real, "time" text, "location" text ); Question: What's the method for a record of 4-2 and round smaller than 3? <|assistant|> SELECT "method" FROM "mixed_martial_arts_record" WHERE "round"<3 AND "record"='4-2';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "round" real, "time" text, "location" text ); Question: Where's the location for the opponent James Zikic and 3 rounds? <|assistant|> SELECT "location" FROM "mixed_martial_arts_record" WHERE "round"=3 AND "opponent"='james zikic';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "house_of_schleswig_holstein_sonderburg_g" ( "name" text, "birth" text, "marriage" text, "became_consort" text, "ceased_to_be_consort" text, "spouse" text ); Question: Name the spouse for louise of hesse-kassel <|assistant|> SELECT "spouse" FROM "house_of_schleswig_holstein_sonderburg_g" WHERE "name"='louise of hesse-kassel';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "house_of_schleswig_holstein_sonderburg_g" ( "name" text, "birth" text, "marriage" text, "became_consort" text, "ceased_to_be_consort" text, "spouse" text ); Question: Name the became consort for christian ix spouse <|assistant|> SELECT "became_consort" FROM "house_of_schleswig_holstein_sonderburg_g" WHERE "spouse"='christian ix';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "house_of_schleswig_holstein_sonderburg_g" ( "name" text, "birth" text, "marriage" text, "became_consort" text, "ceased_to_be_consort" text, "spouse" text ); Question: Name the marriagefor ceased to be consort of 29 september 1898 <|assistant|> SELECT "marriage" FROM "house_of_schleswig_holstein_sonderburg_g" WHERE "ceased_to_be_consort"='29 september 1898';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "house_of_schleswig_holstein_sonderburg_g" ( "name" text, "birth" text, "marriage" text, "became_consort" text, "ceased_to_be_consort" text, "spouse" text ); Question: Tell me the name of the person married to frederick ix <|assistant|> SELECT "name" FROM "house_of_schleswig_holstein_sonderburg_g" WHERE "spouse"='frederick ix';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "house_of_schleswig_holstein_sonderburg_g" ( "name" text, "birth" text, "marriage" text, "became_consort" text, "ceased_to_be_consort" text, "spouse" text ); Question: Name the birth of the person married 24 may 1935 <|assistant|> SELECT "birth" FROM "house_of_schleswig_holstein_sonderburg_g" WHERE "marriage"='24 may 1935';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "semifinal_2" ( "rank" real, "lane" real, "name" text, "nationality" text, "time" text ); Question: What was the rank of the player in lane 6? <|assistant|> SELECT AVG("rank") FROM "semifinal_2" WHERE "lane"=6;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "complete_24_hours_of_le_mans_results" ( "year" real, "class" text, "tyres" text, "team" text, "co_drivers" text, "laps" real, "pos" text, "class_pos" text ); Question: Name the average year with Laps of 6 <|assistant|> SELECT AVG("year") FROM "complete_24_hours_of_le_mans_results" WHERE "laps"=6;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "language" ( "language" text, "number" text, "percentage_pct" text, "males" text, "females" text ); Question: Which Language has a Number of 553 633? <|assistant|> SELECT "language" FROM "language" WHERE "number"='553 633';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "language" ( "language" text, "number" text, "percentage_pct" text, "males" text, "females" text ); Question: Which Males have a percentage of 0.42? <|assistant|> SELECT "males" FROM "language" WHERE "percentage_pct"='0.42';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "language" ( "language" text, "number" text, "percentage_pct" text, "males" text, "females" text ); Question: What's the Language with a percentage of 6.49? <|assistant|> SELECT "language" FROM "language" WHERE "percentage_pct"='6.49';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "language" ( "language" text, "number" text, "percentage_pct" text, "males" text, "females" text ); Question: What Number has a Language listed as other? <|assistant|> SELECT "number" FROM "language" WHERE "language"='other';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medals_table" ( "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: what is the highest gold count when total is more than 3, bronze less than 3, and nation of belarus with silver count more than 2? <|assistant|> SELECT MAX("gold") FROM "medals_table" WHERE "total">3 AND "bronze"<3 AND "nation"='belarus' AND "silver">2;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medals_table" ( "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: with silver count at 0, what is the lowest bronze count? <|assistant|> SELECT MIN("bronze") FROM "medals_table" WHERE "silver"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "medals_table" ( "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); Question: what is the gold count with total less than 3 and more than 1 silver? <|assistant|> SELECT MIN("gold") FROM "medals_table" WHERE "total"<3 AND "silver">1;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "jdf_coast_guard" ( "name_of_ship" text, "length" text, "max_speed" text, "crew_capacity" text, "class" text, "builder" text, "delivery" real ); Question: Who built the ship that is 42.8 m long and was delivered in 2007? <|assistant|> SELECT "builder" FROM "jdf_coast_guard" WHERE "length"='42.8 m' AND "delivery"=2007;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "executive_commissioners" ( "year" text, "human_resources_operations" text, "local_affairs" text, "academic_university_affairs" text, "external_affairs" text ); Question: Who was the Human Resources & Operations person between 2003-2004? <|assistant|> SELECT "human_resources_operations" FROM "executive_commissioners" WHERE "year"='2003-2004';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "executive_commissioners" ( "year" text, "human_resources_operations" text, "local_affairs" text, "academic_university_affairs" text, "external_affairs" text ); Question: Who was in local affairs when the Human Resources & Operations was N. Charles Hamilton? <|assistant|> SELECT "local_affairs" FROM "executive_commissioners" WHERE "human_resources_operations"='n. charles hamilton';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "executive_commissioners" ( "year" text, "human_resources_operations" text, "local_affairs" text, "academic_university_affairs" text, "external_affairs" text ); Question: Who was in Human Resources & Operations when David Hornsby was in Academic & University Affairs? <|assistant|> SELECT "human_resources_operations" FROM "executive_commissioners" WHERE "academic_university_affairs"='david hornsby';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "executive_commissioners" ( "year" text, "human_resources_operations" text, "local_affairs" text, "academic_university_affairs" text, "external_affairs" text ); Question: Who was in external affairs when Jakki Doyle was in Human Resources & Operations? <|assistant|> SELECT "external_affairs" FROM "executive_commissioners" WHERE "human_resources_operations"='jakki doyle';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "executive_commissioners" ( "year" text, "human_resources_operations" text, "local_affairs" text, "academic_university_affairs" text, "external_affairs" text ); Question: Who was in local affairs in 2012-2013? <|assistant|> SELECT "local_affairs" FROM "executive_commissioners" WHERE "year"='2012-2013';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "executive_commissioners" ( "year" text, "human_resources_operations" text, "local_affairs" text, "academic_university_affairs" text, "external_affairs" text ); Question: Who was in Academic & University Affairs when Andrew Langille was in local affairs? <|assistant|> SELECT "academic_university_affairs" FROM "executive_commissioners" WHERE "local_affairs"='andrew langille';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1994" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); Question: Which Perth's gold coast and Adelaide were yes when Auckland was no? <|assistant|> SELECT "perth" FROM "1994" WHERE "gold_coast"='yes' AND "adelaide"='yes' AND "auckland"='no';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1994" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); Question: Which Melbourne had a gold coast and sydney which were yes, but an adelaide that was no? <|assistant|> SELECT "melbourne" FROM "1994" WHERE "gold_coast"='yes' AND "adelaide"='no' AND "sydney"='yes';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1994" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); Question: Which Adelaide's Melbourne and Perth were yes when Auckland was no? <|assistant|> SELECT "adelaide" FROM "1994" WHERE "melbourne"='yes' AND "auckland"='no' AND "perth"='yes';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1994" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); Question: Which Sydney's Melbourne was no, when Auckland was yes? <|assistant|> SELECT "sydney" FROM "1994" WHERE "melbourne"='no' AND "auckland"='yes';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1994" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); Question: Which Syndney's Gold coast, Adelaide, Melbourne, and Auckland were all no? <|assistant|> SELECT "sydney" FROM "1994" WHERE "gold_coast"='no' AND "adelaide"='no' AND "melbourne"='no' AND "auckland"='no';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1994" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); Question: Which Adelaide's Melbourne, Sydney, and Gold Coast were all no? <|assistant|> SELECT "adelaide" FROM "1994" WHERE "melbourne"='no' AND "sydney"='no' AND "gold_coast"='no';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "stage_results" ( "date" text, "course" text, "distance" text, "type" text, "winner" text ); Question: Name the date which has type of plain stage <|assistant|> SELECT "date" FROM "stage_results" WHERE "type"='plain stage';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "stage_results" ( "date" text, "course" text, "distance" text, "type" text, "winner" text ); Question: Name the distance for Course of vittorio veneto to marina romea <|assistant|> SELECT "distance" FROM "stage_results" WHERE "course"='vittorio veneto to marina romea';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_6_3_titles_3_runners_up" ( "outcome" text, "date" text, "surface" text, "partner" text, "opponents" text, "score" text ); Question: Who was the partner that played a match on a grass court? <|assistant|> SELECT "partner" FROM "doubles_6_3_titles_3_runners_up" WHERE "surface"='grass';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_6_3_titles_3_runners_up" ( "outcome" text, "date" text, "surface" text, "partner" text, "opponents" text, "score" text ); Question: What was the score of the match in which mardy fish was the partner? <|assistant|> SELECT "score" FROM "doubles_6_3_titles_3_runners_up" WHERE "partner"='mardy fish';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_6_3_titles_3_runners_up" ( "outcome" text, "date" text, "surface" text, "partner" text, "opponents" text, "score" text ); Question: Who were the opponents in the match that was played on a hard court and had a runner-up outcome? <|assistant|> SELECT "opponents" FROM "doubles_6_3_titles_3_runners_up" WHERE "surface"='hard' AND "outcome"='runner-up';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" real, "time" text, "location" text ); Question: What is the time when the opponent is phil collins? <|assistant|> SELECT "time" FROM "mixed_martial_arts_record" WHERE "opponent"='phil collins';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" real, "time" text, "location" text ); Question: what is the total number of rounds when method is tko (punches) and time is 0:40? <|assistant|> SELECT COUNT("round") FROM "mixed_martial_arts_record" WHERE "method"='tko (punches)' AND "time"='0:40';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" real, "time" text, "location" text ); Question: what is the method when the time is 0:51? <|assistant|> SELECT "method" FROM "mixed_martial_arts_record" WHERE "time"='0:51';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" real, "time" text, "location" text ); Question: what is the time when the event is bellator 89? <|assistant|> SELECT "time" FROM "mixed_martial_arts_record" WHERE "event"='bellator 89';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2009_rankings" ( "rank" real, "team" text, "country" text, "value_m" real, "debt_as_pct_of_value" real, "pct_change_on_year" text, "revenue_m" real, "operating_income_m" real ); Question: Name the average debt as % of value for operating income more than -16 and % change on year being 62 <|assistant|> SELECT AVG("debt_as_pct_of_value") FROM "2009_rankings" WHERE "pct_change_on_year"='62' AND "operating_income_m">-16;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2009_rankings" ( "rank" real, "team" text, "country" text, "value_m" real, "debt_as_pct_of_value" real, "pct_change_on_year" text, "revenue_m" real, "operating_income_m" real ); Question: Name the country where % change on year is 21 and value is less than 86 <|assistant|> SELECT "country" FROM "2009_rankings" WHERE "debt_as_pct_of_value"<86 AND "pct_change_on_year"='21';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2009_rankings" ( "rank" real, "team" text, "country" text, "value_m" real, "debt_as_pct_of_value" real, "pct_change_on_year" text, "revenue_m" real, "operating_income_m" real ); Question: Name the total number of revenue for italy with team of internazionale with operating income less than 27 <|assistant|> SELECT COUNT("revenue_m") FROM "2009_rankings" WHERE "country"='italy' AND "team"='internazionale' AND "operating_income_m"<27;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2009_rankings" ( "rank" real, "team" text, "country" text, "value_m" real, "debt_as_pct_of_value" real, "pct_change_on_year" text, "revenue_m" real, "operating_income_m" real ); Question: Name the most revenue for operating income more than 27 for hamburg and debt as % of value less than 0 <|assistant|> SELECT MAX("revenue_m") FROM "2009_rankings" WHERE "operating_income_m">27 AND "team"='hamburg' AND "debt_as_pct_of_value"<0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1989_90_liverpool_f_c_season" ( "round" text, "kick_off" text, "opponents" text, "h_a" text, "result" text, "attendance" real, "report" text ); Question: What is the result for an H/A of H and a round value of R6 replay? <|assistant|> SELECT "result" FROM "1989_90_liverpool_f_c_season" WHERE "h_a"='h' AND "round"='r6 replay';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "1989_90_liverpool_f_c_season" ( "round" text, "kick_off" text, "opponents" text, "h_a" text, "result" text, "attendance" real, "report" text ); Question: What was the kickoff date for the round value of R4? <|assistant|> SELECT "kick_off" FROM "1989_90_liverpool_f_c_season" WHERE "round"='r4';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "third_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); Question: What country was Henry Picard from? <|assistant|> SELECT "country" FROM "third_round" WHERE "player"='henry picard';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "installations" ( "name" text, "park" text, "country" text, "inversions" real, "opened" text, "status" text ); Question: Name the sum of inversions for opened of april 20, 2002 <|assistant|> SELECT SUM("inversions") FROM "installations" WHERE "opened"='april 20, 2002';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "installations" ( "name" text, "park" text, "country" text, "inversions" real, "opened" text, "status" text ); Question: Name the opened for spain <|assistant|> SELECT "opened" FROM "installations" WHERE "country"='spain';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "installations" ( "name" text, "park" text, "country" text, "inversions" real, "opened" text, "status" text ); Question: Name the status for six flags new england <|assistant|> SELECT "status" FROM "installations" WHERE "park"='six flags new england';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" text ); Question: Name the to par with money of 200,000 for australia <|assistant|> SELECT "to_par" FROM "final_round" WHERE "money"='200,000' AND "country"='australia';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" text ); Question: Name the money for ireland <|assistant|> SELECT "money" FROM "final_round" WHERE "country"='ireland';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" text ); Question: Name the money for pádraig harrington <|assistant|> SELECT "money" FROM "final_round" WHERE "player"='pádraig harrington';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" text ); Question: Name the to par for score of 69-73-68-70=280 <|assistant|> SELECT "to_par" FROM "final_round" WHERE "score"='69-73-68-70=280';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" text ); Question: Name the money for the to par of -6 <|assistant|> SELECT "money" FROM "final_round" WHERE "to_par"='-6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_health_minsters" ( "minister" text, "party" text, "governments" text, "term_start" text, "term_end" text ); Question: On what date or dates did the term with the Centre Party end? <|assistant|> SELECT "term_end" FROM "list_of_health_minsters" WHERE "party"='centre party';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "list_of_health_minsters" ( "minister" text, "party" text, "governments" text, "term_start" text, "term_end" text ); Question: When did the term end for the term that had government 27 and Minister Tzachi Hanegbi? <|assistant|> SELECT "term_end" FROM "list_of_health_minsters" WHERE "governments"='27' AND "minister"='tzachi hanegbi';<|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: What is the location/state of the race on the Wanneroo raceway? <|assistant|> SELECT "location_state" FROM "race_calendar" WHERE "circuit"='wanneroo raceway';<|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: What is the location/state of the Launceston race? <|assistant|> SELECT "location_state" FROM "race_calendar" WHERE "race_title"='launceston';<|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: What is the team of winner Dick Johnson? <|assistant|> SELECT "team" FROM "race_calendar" WHERE "winner"='dick johnson';<|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: What is the race title of the Oran Park raceway circuit with team jps team bmw? <|assistant|> SELECT "race_title" FROM "race_calendar" WHERE "team"='jps team bmw' AND "circuit"='oran park raceway';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "population" ( "year" real, "population_region_total" real, "population_maryborough" real, "population_hervey_bay" real, "population_woocoo" real, "population_tiaro" real ); Question: Name the total number of population hervey bay with population woocoo less than 640 and population of maryborough less than 19,257 <|assistant|> SELECT COUNT("population_hervey_bay") FROM "population" WHERE "population_woocoo"<640 AND "population_maryborough"<'19,257';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "population" ( "year" real, "population_region_total" real, "population_maryborough" real, "population_hervey_bay" real, "population_woocoo" real, "population_tiaro" real ); Question: Name the average population hervey bay with population maryborough more than 11,415 and population region total less than 48,308 and population tiaro less than 2,066 and population woocoo of 491 <|assistant|> SELECT AVG("population_hervey_bay") FROM "population" WHERE "population_maryborough">'11,415' AND "population_region_total"<'48,308' AND "population_tiaro"<'2,066' AND "population_woocoo"=491;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "population" ( "year" real, "population_region_total" real, "population_maryborough" real, "population_hervey_bay" real, "population_woocoo" real, "population_tiaro" real ); Question: Name the most population hervey bay for when population maryborough of 22,977 and population tiaro less than 3,287 <|assistant|> SELECT MAX("population_hervey_bay") FROM "population" WHERE "population_maryborough"='22,977' AND "population_tiaro"<'3,287';<|endoftext|>