instruction
stringlengths
212
6.3k
output
stringlengths
6
2.03k
### Instruction: CREATE TABLE artist ( Artist_ID int, Name text, Country text, Year_Join int, Age int ) CREATE TABLE exhibition_record ( Exhibition_ID int, Date text, Attendance int ) CREATE TABLE exhibition ( Exhibition_ID int, Year int, Theme text, Artist_ID int, ...
SELECT Name, Age FROM artist ORDER BY Age DESC
### Instruction: CREATE TABLE table_12286 ( "Position" real, "Team" text, "Played" real, "Drawn" real, "Lost" real, "Goals For" real, "Goals Against" real, "Goal Difference" text, "Points 1" text ) -- Using valid SQLite, answer the following questions for the tables provided above....
SELECT COUNT("Goals Against") FROM table_12286 WHERE "Team" = 'clitheroe' AND "Lost" > '2'
### Instruction: CREATE TABLE college ( College_ID int, Name text, Leader_Name text, College_Location text ) CREATE TABLE round ( Round_ID int, Member_ID int, Decoration_Theme text, Rank_in_Round int ) CREATE TABLE member ( Member_ID int, Name text, Country text, Colleg...
SELECT Country, COUNT(Country) FROM member GROUP BY Country ORDER BY COUNT(Country) DESC
### Instruction: CREATE TABLE table_203_576 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the difference in silver medals between ...
SELECT (SELECT "silver" FROM table_203_576 WHERE "nation" = 'china') - (SELECT "silver" FROM table_203_576 WHERE "nation" = 'chinese taipei')
### Instruction: CREATE TABLE table_203_237 ( id number, "n" number, "p" text, "nat." text, "name" text, "age" number, "moving from" text, "type" text, "transfer\nwindow" text, "ends" number, "transfer\nfee" text ) -- Using valid SQLite, answer the following questions for t...
SELECT "transfer\nwindow" FROM table_203_237 GROUP BY "transfer\nwindow" ORDER BY COUNT(*) DESC LIMIT 1
### Instruction: CREATE TABLE table_27023 ( "Year" real, "Starts" real, "Wins" real, "Top 5" real, "Top 10" real, "Poles" real, "Avg. Start" text, "Avg. Finish" text, "Winnings" text, "Position" text, "Team(s)" text ) -- Using valid SQLite, answer the following questions fo...
SELECT "Winnings" FROM table_27023 WHERE "Position" = '23rd'
### Instruction: CREATE TABLE table_70416 ( "Name" text, "Born" text, "Age at first step" text, "Mission" text, "Lunar EVA dates" text, "Service" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which astronaut went on the Apollo 16 mission at the...
SELECT "Name" FROM table_70416 WHERE "Mission" = 'apollo 16' AND "Age at first step" = '36y 6m 18d'
### Instruction: CREATE TABLE table_32599 ( "Name" text, "Party" text, "Province (Division)" text, "Date appointed" text, "Appointed by" text, "Left office" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who appointed the conservative from Ontar...
SELECT "Appointed by" FROM table_32599 WHERE "Party" = 'conservative' AND "Province (Division)" = 'ontario' AND "Date appointed" = 'june 18, 1993'
### Instruction: CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight real ) CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, ...
SELECT People_ID, Height FROM people GROUP BY Sex
### Instruction: CREATE TABLE table_17222 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the ...
SELECT MIN("No. in series") FROM table_17222 WHERE "Title" = 'I Forgot to Remember to Forget'
### Instruction: CREATE TABLE table_4957 ( "Name" text, "GP-GS" text, "Gain" real, "Loss" real, "Long" real, "Avg/G" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much Avg/G has a Long of 51, and a Loss of 333, and a Gain larger than 2013? ...
SELECT COUNT("Avg/G") FROM table_4957 WHERE "Long" = '51' AND "Loss" = '333' AND "Gain" > '2013'
### Instruction: CREATE TABLE table_49055 ( "Call sign" text, "Frequency MHz" real, "City of license" text, "ERP W" real, "Class" text, "FCC info" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In which city is the station licensed whose frequen...
SELECT "City of license" FROM table_49055 WHERE "Frequency MHz" = '102.3' AND "ERP W" < '1,000'
### Instruction: CREATE TABLE table_256286_41 ( yes_votes VARCHAR, no_votes VARCHAR, _percentage_yes VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the aggregate number of yes votes where no votes is littler than 299939.1619948521 and % yes is 66...
SELECT COUNT(yes_votes) FROM table_256286_41 WHERE no_votes < 299939.1619948521 AND _percentage_yes = "66.49%"
### Instruction: CREATE TABLE table_204_322 ( id number, "township" text, "fips" number, "population" number, "population\ndensity\n/km2 (/sq mi)" text, "land area\nkm2 (sq mi)" text, "water area\nkm2 (sq mi)" text, "water %" text, "geographic coordinates" text ) -- Using valid SQL...
SELECT "township" FROM table_204_322 ORDER BY "population" DESC LIMIT 1
### Instruction: CREATE TABLE table_66833 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text ) -- Using valid SQLite, answer the foll...
SELECT "Played" FROM table_66833 WHERE "Points for" = '473'
### Instruction: CREATE TABLE table_74585 ( "District" text, "Name" text, "Party" text, "Residence" text, "Assumed office" real, "Next election" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the party of the Senator in District A, who a...
SELECT "Party" FROM table_74585 WHERE "Next election" > '2014' AND "Assumed office" < '2013' AND "District" = 'a'
### Instruction: CREATE TABLE table_70511 ( "Call sign" text, "Frequency MHz" real, "City of license" text, "ERP W" real, "Height m ( ft )" text, "Class" text, "FCC info" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the Call sign wi...
SELECT "Call sign" FROM table_70511 WHERE "Frequency MHz" < '95.9' AND "ERP W" = '10'
### Instruction: CREATE TABLE table_20090 ( "Locale" text, "Skip" text, "W" real, "L" real, "PF" real, "PA" real, "Ends Won" real, "Ends Lost" real, "Blank Ends" real, "Stolen Ends" real, "Shot Pct." text ) -- Using valid SQLite, answer the following questions for the table...
SELECT "Stolen Ends" FROM table_20090 WHERE "Locale" = 'Sweden'
### Instruction: CREATE TABLE table_24540 ( "University" text, "Established as a university" real, "First establishment" real, "Student population ( FTE , 2009)" real, "Research grants (2009, in billion SEK )" text ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT "Student population ( FTE , 2009)" FROM table_24540 WHERE "Research grants (2009, in billion SEK )" = '1.812'
### Instruction: CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER ) CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Whare the ...
SELECT friend, age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM Person)
### Instruction: CREATE TABLE table_24236 ( "Name" text, "Municipal status" text, "Census division" text, "Population (2011)" real, "Population (2006)" real, "Change (%)" text, "Area (km\u00b2)" text, "Population density" text ) -- Using valid SQLite, answer the following questions for...
SELECT "Municipal status" FROM table_24236 WHERE "Population density" = '895.5'
### Instruction: CREATE TABLE photos ( id number, camera_lens_id number, mountain_id number, color text, name text ) CREATE TABLE mountain ( id number, name text, height number, prominence number, range text, country text ) CREATE TABLE camera_lens ( id number, bran...
SELECT id, color, name FROM photos
### Instruction: CREATE TABLE table_77858 ( "Code" real, "Type" text, "Name" text, "Area (km 2 )" real, "Population" real, "Regional County Municipality" text, "Metropolitan area" text, "Region" real ) -- Using valid SQLite, answer the following questions for the tables provided above....
SELECT MAX("Area (km 2 )") FROM table_77858 WHERE "Code" = '66097' AND "Region" > '6'
### Instruction: CREATE TABLE table_53690 ( "Points" real, "Player" text, "Tries" real, "Goals" real, "Field Goals" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average amount of goals that has a points smaller of 882, less than 5 fiel...
SELECT AVG("Goals") FROM table_53690 WHERE "Points" < '882' AND "Field Goals" < '5' AND "Player" = 'ty williams' AND "Tries" < '85'
### Instruction: CREATE TABLE table_29006 ( "Pick #" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the player for the position defence ...
SELECT "Player" FROM table_29006 WHERE "Position" = 'Defence' AND "College/junior/club team" = 'Ottawa 67''s (OHL)'
### Instruction: CREATE TABLE table_35704 ( "Source" text, "Date" text, "Fidesz" text, "MSZP" text, "SZDSZ" text, "Jobbik" text, "others" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the SZDSZ percentage with an MSZP of 25% on 25/2...
SELECT "SZDSZ" FROM table_35704 WHERE "MSZP" = '25%' AND "Date" = '25/2/2009'
### Instruction: CREATE TABLE table_14962 ( "Home" text, "Score" text, "Away" text, "Venue" text, "Golden point(s) scorer" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Away team has the Golden point(s) scorer Trent Hodkinson and the Home of M...
SELECT "Away" FROM table_14962 WHERE "Golden point(s) scorer" = 'trent hodkinson' AND "Home" = 'manly-warringah sea eagles'
### Instruction: CREATE TABLE table_59771 ( "Year" real, "Pick" text, "Player" text, "Position" text, "Country" text, "Previous team (League)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Player, when Previous Team (League) is 'Medicin...
SELECT "Player" FROM table_59771 WHERE "Previous team (League)" = 'medicine hat tigers ( whl )' AND "Year" < '2002'
### Instruction: CREATE TABLE exhibition_record ( Exhibition_ID int, Date text, Attendance int ) CREATE TABLE artist ( Artist_ID int, Name text, Country text, Year_Join int, Age int ) CREATE TABLE exhibition ( Exhibition_ID int, Year int, Theme text, Artist_ID int, ...
SELECT Country, COUNT(Country) FROM artist GROUP BY Country ORDER BY Country
### Instruction: CREATE TABLE table_43114 ( "Player" text, "Club" text, "League" real, "FA Cup" real, "FA Trophy" real, "League Cup" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many FA Trophy has a Total larger than 17 a...
SELECT COUNT("FA Trophy") FROM table_43114 WHERE "Total" > '17' AND "Player" = 'david gamble' AND "League Cup" > '0'
### Instruction: CREATE TABLE table_train_232 ( "id" int, "metastatic_cancer" bool, "hemoglobin_a1c_hba1c" float, "diabetic" string, "short_life_expectancy" bool, "body_mass_index_bmi" float, "a1c" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tab...
SELECT * FROM table_train_232 WHERE metastatic_cancer = 1 OR short_life_expectancy = 1
### Instruction: CREATE TABLE table_13475 ( "Class" text, "Wheel arrangement" text, "Fleet number(s)" text, "Manufacturer" text, "Serial numbers" text, "Year made" text, "Quantity made" text, "Quantity preserved" text ) -- Using valid SQLite, answer the following questions for the tabl...
SELECT "Manufacturer" FROM table_13475 WHERE "Year made" = '4-6-0 — ooooo — ten-wheeler'
### Instruction: CREATE TABLE table_203_142 ( id number, "pos" text, "no" number, "rider" text, "bike" text, "laps" number, "time" text, "grid" number, "points" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- in the 2007 phillip isl...
SELECT COUNT("rider") FROM table_203_142 WHERE "points" <> "" AND "points" >= 10
### Instruction: CREATE TABLE table_38092 ( "7:00" text, "7:30" text, "8:00" text, "8:30" text, "9:00" text, "9:30" text, "10:00" text, "10:30" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 8:00 feature with a 7:00 feature A...
SELECT "8:00" FROM table_38092 WHERE "7:00" = 'air farce'
### Instruction: CREATE TABLE table_9166 ( "Season" text, "Games" real, "Lost" real, "Points" real, "Pct %" real, "Goals For" real, "Goals Against" real, "Standing" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Goals for were r...
SELECT COUNT("Goals For") FROM table_9166 WHERE "Pct %" < '0.519' AND "Points" > '65'
### Instruction: CREATE TABLE table_76917 ( "Title" text, "Details" text, "Track Title" text, "Label" text, "Year" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which label has a year older than 2004 and a 2xcd detail as well as the sonic seducer c...
SELECT "Label" FROM table_76917 WHERE "Year" > '2004' AND "Details" = '2xcd' AND "Title" = 'sonic seducer cold hands seduction vol. 69'
### Instruction: CREATE TABLE table_203_737 ( id number, "#" number, "employer" text, "# of employees" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the difference between the number of employees at mundelein elementary school district 75 and...
SELECT ABS((SELECT "# of employees" FROM table_203_737 WHERE "employer" = 'mundelein elementary school district 75') - (SELECT "# of employees" FROM table_203_737 WHERE "employer" = 'fremont school district 79'))
### Instruction: CREATE TABLE table_60301 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( \u00a3 )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Northern Ireland Player has more than 36,000 Money with ...
SELECT "Player" FROM table_60301 WHERE "Money ( \u00a3 )" > '36,000' AND "To par" = '–7' AND "Country" = 'northern ireland'
### Instruction: CREATE TABLE table_25655 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "N.Z. viewers (thousand)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- H...
SELECT "N.Z. viewers (thousand)" FROM table_25655 WHERE "Title" = 'Make Mad the Guilty and Appal the Free'
### Instruction: CREATE TABLE products ( product_type_code VARCHAR, product_name VARCHAR, product_price VARCHAR, product_id VARCHAR ) CREATE TABLE product_suppliers ( product_id VARCHAR, supplier_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above....
SELECT T2.product_type_code, T2.product_name, T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3
### Instruction: CREATE TABLE table_3957 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the t...
SELECT MIN("No. in season") FROM table_3957 WHERE "Production code" = '2T6206'
### Instruction: CREATE TABLE table_204_820 ( id number, "date" text, "constituency" text, "c/u" text, "former incumbent" text, "winner" text, "cause" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- did john lee win before lord hugh seymor ? ...
SELECT (SELECT "date" FROM table_204_820 WHERE "winner" = 'john lee') < (SELECT "date" FROM table_204_820 WHERE "winner" = 'lord hugh seymour')
### Instruction: CREATE TABLE table_7001 ( "Category" text, "Frequency" text, "White" real, "Brown" real, "Black" real, "Amerindian" real, "Yellow" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of Yellow, w...
SELECT SUM("Yellow") FROM table_7001 WHERE "Category" = 'bugre (indian)' AND "Amerindian" < '50,00'
### Instruction: CREATE TABLE table_27039 ( "\u2116" real, "#" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (million)" text ) -- Using valid SQLite, answer the following questions for the tables provided abov...
SELECT "Production code" FROM table_27039 WHERE "Written by" = 'J. H. Wyman & Jeff Pinkner'
### Instruction: CREATE TABLE table_17797 ( "Year" real, "Road Opened" text, "Road Closed" text, "Freight Carried s Tonne" real, "Super B Capacity Reached [ citation needed ]" text, "Number of Truck Loads North" real ) -- Using valid SQLite, answer the following questions for the tables provid...
SELECT "Super B Capacity Reached [ citation needed ]" FROM table_17797 WHERE "Number of Truck Loads North" = '7735'
### Instruction: CREATE TABLE table_76895 ( "Mode" text, "D\u00e9part de la main gauche" text, "Accord du 1st string" text, "2nd string" text, "3rd string" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For the 2nd string of Do and an Accord du 1st ...
SELECT "D\u00e9part de la main gauche" FROM table_76895 WHERE "2nd string" = 'do' AND "Accord du 1st string" = 'fa'
### Instruction: CREATE TABLE table_36945 ( "Season" text, "Tropical Lows" real, "Tropical Cyclones" real, "Severe Tropical Cyclones" real, "Strongest storm" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the largest number for tropical Lows...
SELECT MAX("Tropical Lows") FROM table_36945 WHERE "Season" = '1990–91' AND "Tropical Cyclones" > '10'
### Instruction: CREATE TABLE table_31641 ( "Census year" real, "Total" real, "Macedonians" real, "Albanians" real, "Turks" real, "Roma" real, "Vlachs" real, "Serbs" real, "Bosniaks" real, "Other" real ) -- Using valid SQLite, answer the following questions for the tables provi...
SELECT MAX("Bosniaks") FROM table_31641 WHERE "Census year" > '2002'
### Instruction: CREATE TABLE table_38477 ( "School Year" text, "Class A" text, "Class AA" text, "Class AAA" text, "Class AAAA" text, "Class AAAAA" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the class AAAAA of the school year 1993-94...
SELECT "Class AAAAA" FROM table_38477 WHERE "Class AAA" = 'mont belvieu barbers hill' AND "School Year" = '1993-94'
### Instruction: CREATE TABLE table_203_296 ( id number, "country" text, "total gdp (nominal)\n(billion us$)" text, "gdp per capita\n(us$, ppp)" text, "gdp growth,\n2007-2011\n(in %)" number, "hdi" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- ...
SELECT "country" FROM table_203_296 ORDER BY "total gdp (nominal)\n(billion us$)" DESC LIMIT 1
### Instruction: CREATE TABLE table_2930 ( "Year" real, "Population" real, "Serbs" text, "Germans" text, "Romanians" text, "Hungarians" text, "Croats" text, "Roma" text, "Slovaks" text, "Rest" text ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT "Croats" FROM table_2930 WHERE "Romanians" = '16.65%'
### Instruction: CREATE TABLE table_27595 ( "June 10-11" text, "March 27-29" text, "January 15-16" text, "November 3" text, "August 21-22" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is shown for november 3 when august 21-22 is august 22, 19...
SELECT "November 3" FROM table_27595 WHERE "August 21-22" = 'August 22, 1998'
### Instruction: CREATE TABLE table_204_133 ( id number, "school year" text, "class a" text, "class aa" text, "class aaa" text, "class aaaa" text, "class aaaaa" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which school won class a in the s...
SELECT "class a" FROM table_204_133 WHERE id = (SELECT id FROM table_204_133 WHERE "school year" = '1999-2000') - 1
### Instruction: CREATE TABLE table_53576 ( "Race" text, "Circuit" text, "Date" text, "Pole position" text, "Fastest lap" text, "Winning driver" text, "Constructor" text, "Tyre" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided abov...
SELECT "Date" FROM table_53576 WHERE "Constructor" = 'maserati' AND "Fastest lap" = 'stirling moss'
### Instruction: CREATE TABLE table_39290 ( "Date" text, "Jurisdiction" text, "Ronald Reagan" text, "George H. W. Bush" text, "John B. Anderson" text, "Howard Baker" text, "John Connally" text, "Phil Crane" text, "Bob Dole" text ) -- Using valid SQLite, answer the following questio...
SELECT "Howard Baker" FROM table_39290 WHERE "George H. W. Bush" = '66%'
### Instruction: CREATE TABLE table_train_14 ( "id" int, "bone_marrow_transplant" bool, "pregnancy_or_lactation" bool, "organ_transplantation" bool, "advanced_pulmonary_fibrosis" bool, "cardiopulmonary_resuscitation" bool, "myocardial_infarction" bool, "NOUSE" float ) -- Using valid SQ...
SELECT * FROM table_train_14 WHERE advanced_pulmonary_fibrosis = 1
### Instruction: CREATE TABLE table_43227 ( "Protocol" text, "Creator" text, "License" text, "Transport Layer Security" text, "Bulletins to all contacts" text, "Batch file sharing" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Were there Bullet...
SELECT "Bulletins to all contacts" FROM table_43227 WHERE "Transport Layer Security" = 'no' AND "License" = 'proprietary' AND "Creator" = 'microsoft'
### Instruction: CREATE TABLE table_22259 ( "#" real, "Cover Date" text, "Story Title" text, "Writer/s" text, "Artist/s" text, "Letterer/s" text, "Colourist/s" text, "Editor/s" text, "Comments" text ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT "Story Title" FROM table_22259 WHERE "Artist/s" = 'Barry Kitson and Farmer'
### Instruction: CREATE TABLE table_28970 ( "Species" text, "Common Name" text, "Protein Name" text, "Accession Number" text, "NT Length" text, "NT Identity" text, "AA Length" text, "AA Identity" text, "E-Value" text ) -- Using valid SQLite, answer the following questions for the t...
SELECT "Protein Name" FROM table_28970 WHERE "E-Value" = '2.50E-41'
### Instruction: CREATE TABLE table_30526 ( "Name of Rivalry" text, "Rival" text, "Games Played" real, "First Meeting" real, "Last Meeting" real, "AU Won" real, "AU Lost" real, "Ties" real, "Streak" text, "Latest win" text ) -- Using valid SQLite, answer the following questions...
SELECT "Rival" FROM table_30526 WHERE "First Meeting" = '1899'
### Instruction: CREATE TABLE table_60514 ( "Location" text, "Year" real, "Champion" text, "Runner-up" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Champion at Sopot prior to 2006 with a Score of 6 4, 6 7(7), 6 3? ### R...
SELECT "Champion" FROM table_60514 WHERE "Location" = 'sopot' AND "Year" < '2006' AND "Score" = '6–4, 6–7(7), 6–3'
### Instruction: CREATE TABLE table_24965 ( "No." real, "Season" text, "Championship" real, "No. of teams" real, "Start (reg. season)" text, "Finish (incl. championship)" text, "Top record" text, "National Champion" text ) -- Using valid SQLite, answer the following questions for the t...
SELECT "Start (reg. season)" FROM table_24965 WHERE "Top record" = 'Lindenwood (20–0–0)'
### Instruction: CREATE TABLE table_1851 ( "Main contestant" text, "Co-contestant (Yaar vs. Pyaar)" text, "Date performed" text, "Scores by each individual judge" text, "Total score/week" text, "Position" text, "Status" text ) -- Using valid SQLite, answer the following questions for the t...
SELECT "Total score/week" FROM table_1851 WHERE "Date performed" = 'August 14' AND "Position" = 'Bottom 2'
### Instruction: CREATE TABLE table_23068 ( "Previous season 2007/2008" text, "Team" text, "Town" text, "Arena (capacity)" text, "Website" text, "Head Coach" text, "Foreign Players (max. 2)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Wha...
SELECT "Arena (capacity)" FROM table_23068 WHERE "Head Coach" = 'Roberto Serniotti'
### Instruction: CREATE TABLE table_60889 ( "Team" text, "Club home city" text, "2006\u201307 Season" text, "Stadium" text, "Stadium capacity" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Stadium, when Club Home City is 'Pe ', and when 200...
SELECT "Stadium" FROM table_60889 WHERE "Club home city" = 'peć' AND "2006\u201307 Season" = '1st'
### Instruction: CREATE TABLE table_39874 ( "Season" text, "Team" text, "Conf." text, "Conf. finish" text, "Div." text, "Div. Finish" text, "Awards" text, "Head coach" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the division i...
SELECT "Div." FROM table_39874 WHERE "Conf." = 'western' AND "Div. Finish" = '2nd' AND "Head coach" = 'rick adelman'
### Instruction: CREATE TABLE table_47384 ( "Poll Source" text, "Dates administered" text, "Democrat: Brian Schweitzer" text, "Republican: Roy Brown" text, "Libertarian: Stan Jones" text, "Lead Margin" real ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT SUM("Lead Margin") FROM table_47384 WHERE "Democrat: Brian Schweitzer" = '55%' AND "Libertarian: Stan Jones" = '2%'
### Instruction: CREATE TABLE table_14186 ( "Question #" real, "Prize Level (in Rupees)" real, "Range (in %)" real, "Walk-Away Prize" real, "Prize If Wrong" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the prize level when the Prize if Wro...
SELECT SUM("Prize Level (in Rupees)") FROM table_14186 WHERE "Prize If Wrong" = '1,000' AND "Question #" < '2'
### Instruction: CREATE TABLE table_25117 ( "Player" text, "Nat" text, "Pos" text, "L Apps" real, "L G" real, "C Apps" real, "C G" real, "Total Apps" real, "Total G" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total numbe...
SELECT COUNT("L G") FROM table_25117 WHERE "C G" > '1.0' AND "C Apps" = '3'
### Instruction: CREATE TABLE table_57517 ( "Date of Issue" text, "Theme" text, "Design" text, "Illustration" text, "Paper Type" text, "First Day Cover Cancellation" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Theme with a Paper T...
SELECT "Theme" FROM table_57517 WHERE "Paper Type" = 'tullis russell coatings' AND "Date of Issue" = '1 october 2008'
### Instruction: CREATE TABLE table_204_799 ( id number, "name" text, "built" text, "listed" text, "location" text, "county" text, "type" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- homochitto river bridge is in the same county as what ot...
SELECT "name" FROM table_204_799 WHERE "built" = 1920 AND "county" = (SELECT "county" FROM table_204_799 WHERE "name" = 'homochitto river bridge')
### Instruction: CREATE TABLE member ( Member_ID text, Name text, Nationality text, Role text ) CREATE TABLE performance ( Performance_ID real, Date text, Host text, Location text, Attendance int ) CREATE TABLE member_attendance ( Member_ID int, Performance_ID int, Num_...
SELECT Location, COUNT(Location) FROM performance GROUP BY Location ORDER BY Location DESC
### Instruction: CREATE TABLE people ( People_ID int, Name text, Country text, Is_Male text, Age int ) CREATE TABLE church ( Church_ID int, Name text, Organized_by text, Open_Date int, Continuation_of text ) CREATE TABLE wedding ( Church_ID int, Male_ID int, Female_...
SELECT Open_Date, COUNT(Open_Date) FROM church
### Instruction: CREATE TABLE table_name_40 ( week VARCHAR, away_team VARCHAR, overall_record VARCHAR, home_team VARCHAR, divisional_record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the Week that has the Home Team of detroit,...
SELECT week FROM table_name_40 WHERE home_team = "detroit" AND divisional_record = "(3-0)" AND overall_record = "(5-1)" AND away_team = "minnesota"
### Instruction: CREATE TABLE shop ( shop_id number, shop_name text, location text, open_date text, open_year number ) CREATE TABLE device ( device_id number, device text, carrier text, package_version text, applications text, software_platform text ) CREATE TABLE stock ( ...
SELECT shop_name FROM shop WHERE NOT shop_id IN (SELECT shop_id FROM stock)
### Instruction: CREATE TABLE table_44821 ( "Player" text, "Nationality" text, "Position" text, "Years for Grizzlies" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the 1999-2002 Years for Grizzlies small forward Pla...
SELECT "Player" FROM table_44821 WHERE "Nationality" = 'united states' AND "Position" = 'small forward' AND "Years for Grizzlies" = '1999-2002'
### Instruction: CREATE TABLE table_41470 ( "Season" text, "PAT Pct." text, "20-29" text, "30-39" text, "40-49" text, "FG-FGA" text, "FG Pct." text, "Long" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What 20-29 was ...
SELECT "20-29" FROM table_41470 WHERE "Season" = '2008'
### Instruction: CREATE TABLE table_30384 ( "Team" text, "P" real, "W" real, "D" real, "L" real, "Tries for" real, "Tries against" real, "Try diff" text, "Points for" real, "Points against" real, "Points diff" text, "Pts" real ) -- Using valid SQLite, answer the followi...
SELECT "Tries for" FROM table_30384 WHERE "L" < '2.0'
### Instruction: CREATE TABLE table_33824 ( "Province" text, "Swimsuit" real, "Evening Gown" real, "Interview" real, "Average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Interview has a Swimsuit larger than 7.6, and a Province of la vega, ...
SELECT SUM("Interview") FROM table_33824 WHERE "Swimsuit" > '7.6' AND "Province" = 'la vega' AND "Average" < '8.38'
### Instruction: CREATE TABLE table_63742 ( "Rank" real, "Name" text, "Altitude (meters)" real, "Range" text, "Parent Range" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What name is associated with a rank greater than 69, an altitude (meters) sma...
SELECT "Name" FROM table_63742 WHERE "Range" = 'sivorgfjella' AND "Rank" > '69' AND "Altitude (meters)" < '2154'
### Instruction: CREATE TABLE table_24968 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the ...
SELECT "Original air date" FROM table_24968 WHERE "U.S. viewers (millions)" = '2.15'
### Instruction: CREATE TABLE table_202_253 ( id number, "team" text, "titles" text, "runners-up" text, "third place" text, "fourth place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many titles has jamaica won since trinidad and tobago '...
SELECT COUNT(*) FROM table_202_253 WHERE "team" = 'jamaica' AND "titles" > (SELECT MAX("titles") FROM table_202_253 WHERE "team" = 'trinidad and tobago')
### Instruction: CREATE TABLE table_41218 ( "Ballarat FL" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest draw that has less than 4 wins, 14 losses, and aga...
SELECT MIN("Draws") FROM table_41218 WHERE "Wins" < '4' AND "Losses" = '14' AND "Against" > '1836'
### Instruction: CREATE TABLE table_29826 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT "Team" FROM table_29826 WHERE "High points" = 'Andray Blatche , JaVale McGee (20)'
### Instruction: CREATE TABLE table_24432 ( "Year" text, "Date" text, "Driver" text, "Team" text, "Manufacturer" text, "Laps" text, "Miles (km)" text, "Race Time" text, "Average Speed (mph)" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tab...
SELECT "Team" FROM table_24432 WHERE "Date" = 'June 16' AND "Driver" = 'Jeff Gordon'
### Instruction: CREATE TABLE table_train_272 ( "id" int, "fasting_plasma_glucose_fpg" float, "creatinine_clearance_cl" float, "baseline_hemoglobin_hgb" float, "sensitization_on_pra" bool, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables pro...
SELECT * FROM table_train_272 WHERE creatinine_clearance_cl < 60
### Instruction: CREATE TABLE table_25790 ( "Rank" real, "City/Town" text, "County" text, "Region/Province" text, "Population" real, "Country" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When birkenhead is the city/town and merseyside is the ...
SELECT COUNT("Rank") FROM table_25790 WHERE "Country" = 'England' AND "County" = 'Merseyside' AND "City/Town" = 'Birkenhead'
### Instruction: CREATE TABLE table_55478 ( "Tournament" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which tournament had a 2R categorization in 2009 and SF in ...
SELECT "Tournament" FROM table_55478 WHERE "2009" = '2r' AND "2010" = 'sf'
### Instruction: CREATE TABLE table_51473 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the away team that playe...
SELECT "Away team" FROM table_51473 WHERE "Crowd" > '12,000' AND "Venue" = 'punt road oval'
### Instruction: CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) -- Using valid SQLite, answer the following ...
SELECT Name, MIN(Price) FROM Products GROUP BY Name ORDER BY Name
### Instruction: CREATE TABLE table_48837 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Opponent, when Location is 'Boston Garden', when Game is greate...
SELECT "Opponent" FROM table_48837 WHERE "Location" = 'boston garden' AND "Game" > '1' AND "Score" = '115-105'
### Instruction: CREATE TABLE table_204_679 ( id number, "place" text, "player" text, "country" text, "score" text, "to par" number, "money ($)" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the difference in prize money between b...
SELECT ABS((SELECT "money ($)" FROM table_204_679 WHERE "player" = 'ben hogan') - (SELECT "money ($)" FROM table_204_679 WHERE "player" = 'sam snead'))
### Instruction: CREATE TABLE table_24647 ( "Year" real, "Starts" real, "Wins" real, "Top 5" real, "Top 10" real, "Poles" real, "Avg. Start" text, "Avg. Finish" text, "Winnings" text, "Position" text, "Team(s)" text ) -- Using valid SQLite, answer the following questions fo...
SELECT COUNT("Year") FROM table_24647 WHERE "Position" = '97th'
### Instruction: CREATE TABLE table_train_165 ( "id" int, "gender" string, "hemoglobin_a1c_hba1c" float, "visual_impairment" bool, "blood_glucose" int, "body_mass_index_bmi" float, "a1c" float, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for t...
SELECT * FROM table_train_165 WHERE body_mass_index_bmi >= 30
### Instruction: CREATE TABLE table_34 ( "Player" text, "Total W\u2013L" text, "Singles W\u2013L" text, "Doubles W\u2013L" text, "Ties played" real, "Debut" real, "Years played" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the tota...
SELECT COUNT("Ties played") FROM table_34 WHERE "Total W\u2013L" = '38–24'
### Instruction: CREATE TABLE artist ( Artist_ID int, Name text, Country text, Year_Join int, Age int ) CREATE TABLE exhibition_record ( Exhibition_ID int, Date text, Attendance int ) CREATE TABLE exhibition ( Exhibition_ID int, Year int, Theme text, Artist_ID int, ...
SELECT Country, COUNT(Country) FROM artist GROUP BY Country ORDER BY Country
### Instruction: CREATE TABLE authors ( authid VARCHAR, fname VARCHAR, lname VARCHAR ) CREATE TABLE authorship ( authid VARCHAR, paperid VARCHAR ) CREATE TABLE papers ( title VARCHAR, paperid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Aaron" AND t1.lname = "Turon"
### Instruction: CREATE TABLE enzyme ( id number, name text, location text, product text, chromosome text, omim number, porphyria text ) CREATE TABLE medicine_enzyme_interaction ( enzyme_id number, medicine_id number, interaction_type text ) CREATE TABLE medicine ( id numbe...
SELECT trade_name, COUNT(*) FROM medicine GROUP BY trade_name
### Instruction: CREATE TABLE table_39398 ( "Year" real, "Champion" text, "Country" text, "Venue" text, "Location" text, "Score" text, "Winner's share ( $ )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the sum of the winner's sha...
SELECT SUM("Winner's share ( $ )") FROM table_39398 WHERE "Champion" = 'brad bryant' AND "Year" < '2007'
### Instruction: CREATE TABLE table_43155 ( "Week" real, "Date" text, "Time ( PT )" text, "Opponent" text, "Result" text, "Record" text, "Game site" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What record has candlestick park as the game ...
SELECT "Record" FROM table_43155 WHERE "Game site" = 'candlestick park' AND "Date" = 'october 12, 2008'