instruction
stringlengths
212
6.3k
output
stringlengths
6
2.03k
### Instruction: CREATE TABLE table_204_388 ( id number, "#" number, "date" text, "visitor" text, "score" text, "home" text, "record" text, "pts" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who was the next team that the boston brui...
SELECT "visitor" FROM table_204_388 WHERE id = (SELECT id FROM table_204_388 WHERE "date" = 'november 11' AND "visitor" = 'boston bruins') + 1
### Instruction: CREATE TABLE table_812 ( "Club" text, "Played" text, "Won" 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, a...
SELECT "Tries against" FROM table_812 WHERE "Points against" = '287'
### Instruction: CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height re...
SELECT Name, Weight FROM people ORDER BY Name
### Instruction: CREATE TABLE Reviewer ( rID int, name text ) CREATE TABLE Movie ( mID int, title text, year int, director text ) CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date ) -- Using valid SQLite, answer the following questions for the tables provided...
SELECT title, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title ORDER BY title DESC
### Instruction: CREATE TABLE table_203_356 ( id number, "type" text, "diagonal (mm)" text, "width (mm)" text, "height (mm)" text, "area (mm2)" text, "stops (area)" number, "crop factor" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- wha...
SELECT "type" FROM table_203_356 WHERE id = (SELECT id FROM table_203_356 WHERE "type" = '1/1.6"') + 1
### Instruction: CREATE TABLE table_29321 ( "Team" text, "Outgoing head coach" text, "Manner of departure" text, "Date of vacancy" text, "Position in table" text, "Incoming head coach" text, "Date of appointment" text ) -- Using valid SQLite, answer the following questions for the tables p...
SELECT "Date of vacancy" FROM table_29321 WHERE "Manner of departure" = 'Resigned' AND "Position in table" = '10th'
### Instruction: CREATE TABLE table_37985 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Venue" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent after week 9 with over 49,221 attending, and a R...
SELECT "Opponent" FROM table_37985 WHERE "Week" > '9' AND "Attendance" > '49,221' AND "Result" = 'w 38-20'
### Instruction: CREATE TABLE table_name_18 ( latitude VARCHAR, longitude VARCHAR, land___sqmi__ VARCHAR, geo_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the latitude that has a sqmi smaller than 34.401, a Geo ID smaller than 3807157722...
SELECT latitude FROM table_name_18 WHERE land___sqmi__ < 34.401 AND geo_id < 3807157722 AND longitude = -98.475995
### Instruction: CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following ...
SELECT T2.Name, COUNT(*) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name
### Instruction: CREATE TABLE table_60895 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of Total, when Year(s) Won is '1966 , 1970 , 1978', and when To par ...
SELECT SUM("Total") FROM table_60895 WHERE "Year(s) won" = '1966 , 1970 , 1978' AND "To par" < '4'
### Instruction: CREATE TABLE table_6694 ( "Party" text, "Votes (Gib.)" real, "Votes (SW Eng)" real, "% (Gib.)" real, "% (SW Eng)" real, "Change (SW Eng)" real, "Seats" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of votes ...
SELECT SUM("Votes (Gib.)") FROM table_6694 WHERE "% (Gib.)" = '0.53' AND "Seats" > '0'
### Instruction: CREATE TABLE table_78383 ( "Animal Name" text, "Species" text, "Books" text, "TV Series" text, "Gender" text, "TV Seasons" real, "Mate" text, "Offspring" text, "First Appearance" text, "Last Appearance" text ) -- Using valid SQLite, answer the following questio...
SELECT "Animal Name" FROM table_78383 WHERE "TV Series" = 'yes' AND "Species" = 'terrapins'
### Instruction: CREATE TABLE table_70005 ( "Unit" text, "Reactortype" text, "Net capacity" text, "Gross capacity" text, "Construction started" text, "Electricity Grid" text, "Commercial Operation" text, "Shutdown" text ) -- Using valid SQLite, answer the following questions for the ta...
SELECT "Electricity Grid" FROM table_70005 WHERE "Commercial Operation" = '24.03.1973'
### Instruction: CREATE TABLE table_204_140 ( id number, "round" number, "#" number, "player" text, "position" text, "nationality" text, "college/junior/club team (league)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- there are the same nu...
SELECT "position" FROM table_204_140 WHERE "position" <> 'center' GROUP BY "position" HAVING COUNT(*) = (SELECT COUNT(*) FROM table_204_140 WHERE "position" = 'center')
### Instruction: CREATE TABLE table_24840 ( "Type" text, "Registration" text, "Design" text, "Construction" text, "Service" text, "Construction date" text, "Conformity to original design" text, "Interest" text, "Number existing in Switzerland" text, "Number existing worldwide" te...
SELECT "Type" FROM table_24840 WHERE "Registration" = 'HB-OPU'
### Instruction: CREATE TABLE table_204_604 ( id number, "year" number, "date" text, "driver" text, "team" text, "manufacturer" text, "race distance\nlaps" number, "race distance\nmiles (km)" text, "race time" text, "average speed\n(mph)" number, "report" text ) -- Using va...
SELECT "driver" FROM table_204_604 WHERE "year" = 2014
### Instruction: CREATE TABLE table_2567 ( "Fuel - Liquid, US Gallons" text, "GGE" text, "GGE %" text, "BTU/Gal" real, "kWh/Gal" text, "HP -hr/Gal" text, "Cal/litre" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the HP -hr/gal of the...
SELECT "HP -hr/Gal" FROM table_2567 WHERE "GGE" = '0.9000'
### Instruction: CREATE TABLE table_1523 ( "Poll Source" text, "Dates administered" text, "Democrat: Jim Martin" text, "Republican: Saxby Chambliss" text, "Lead Margin" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date administered whe...
SELECT "Dates administered" FROM table_1523 WHERE "Republican: Saxby Chambliss" = '54%' AND "Democrat: Jim Martin" = '36%'
### Instruction: CREATE TABLE table_641 ( "Episode #" real, "Title" text, "Part 1" text, "Part 2" text, "Part 3" text, "Part 4" text, "Part 5" text, "Part 6" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the air date of part 2 ...
SELECT "Part 2" FROM table_641 WHERE "Part 1" = 'January 31, 2008'
### Instruction: CREATE TABLE table_24723 ( "Year" real, "Film" text, "Budget" text, "Domestic Box Office" text, "Foreign Box Office" text, "Total" text, "US DVD sales" text, "Total (with DVD sales)" text ) -- Using valid SQLite, answer the following questions for the tables provided a...
SELECT "Domestic Box Office" FROM table_24723 WHERE "Foreign Box Office" = '$26,600,000'
### Instruction: CREATE TABLE table_49741 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Money of the Player with a To par of +3 and Score of 7...
SELECT MAX("Money ( $ )") FROM table_49741 WHERE "To par" = '+3' AND "Score" = '76-69-69-69=283'
### Instruction: CREATE TABLE table_56204 ( "Year" text, "Date" text, "Venue" text, "Winner" text, "Country" text, "Score" text, "To par" text, "Margin of victory" text, "Runner(s)-up" text, "Winner's share ( \u20ac )" text ) -- Using valid SQLite, answer the following question...
SELECT "Margin of victory" FROM table_56204 WHERE "Winner" = 'nikki garrett'
### Instruction: CREATE TABLE table_22091 ( "Edition" text, "Round" text, "Date" text, "Partnering" text, "Against" text, "Surface" text, "Opponents" text, "W\u2013L" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What...
SELECT "Against" FROM table_22091 WHERE "Date" = '21–23 September 2007'
### Instruction: CREATE TABLE table_52451 ( "Round" real, "Grand Prix" text, "Pole Position" text, "Fastest Lap" text, "Winning Driver" text, "Winning Constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had the fas...
SELECT "Fastest Lap" FROM table_52451 WHERE "Pole Position" = 'david coulthard' AND "Winning Driver" = 'michael schumacher'
### Instruction: CREATE TABLE table_46369 ( "Year" real, "Show" text, "Season" real, "Episode" text, "Episode number" real, "Original airdate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of Season(s), when Original Ai...
SELECT COUNT("Season") FROM table_46369 WHERE "Original airdate" = 'january 24, 1999' AND "Year" < '1999'
### Instruction: CREATE TABLE table_72244 ( "#" real, "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Attendance" text, "Record" text, "Streak" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the...
SELECT "Home" FROM table_72244 WHERE "Streak" = 'L3' AND "Leading scorer" = 'Roy : 23'
### Instruction: CREATE TABLE table_75313 ( "Season" text, "Season Premiere" text, "Season Finale" text, "Winner" text, "Runner-up" text, "Number of Contestants" real, "Winner's Country" text, "Runner Up's Country" text ) -- Using valid SQLite, answer the following questions for the ta...
SELECT "Season" FROM table_75313 WHERE "Runner Up's Country" = 'mexico' AND "Winner" = 'melissa marty'
### Instruction: CREATE TABLE table_204_71 ( id number, "rank" number, "heat" number, "name" text, "nationality" text, "time" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the time difference in seconds between rachel ...
SELECT ABS((SELECT "time" FROM table_204_71 WHERE "name" = 'rachel king') - (SELECT "time" FROM table_204_71 WHERE "name" = 'sriyani kulawansa'))
### Instruction: CREATE TABLE table_4956 ( "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 Loss larger than 117, and a Name of opponents, and a Gain sm...
SELECT COUNT("Avg/G") FROM table_4956 WHERE "Loss" > '117' AND "Name" = 'opponents' AND "Gain" < '2444'
### Instruction: CREATE TABLE table_23775 ( "Result" text, "Date" text, "Race" text, "Venue" text, "Distance" text, "Class" text, "Weight (kg)" text, "Time" text, "Jockey" text, "Odds" text, "Winner/2nd" text ) -- Using valid SQLite, answer the following questions for the t...
SELECT "Result" FROM table_23775 WHERE "Time" = '1-26.21'
### Instruction: CREATE TABLE table_54059 ( "Episode" text, "Air Date" text, "Rating" real, "Share" real, "18\u201349 (Rating/Share)" text, "Viewers (m)" real, "Weekly Rank" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total sh...
SELECT SUM("Share") FROM table_54059 WHERE "Air Date" = 'november 19, 2007'
### Instruction: CREATE TABLE table_204_409 ( id number, "date" text, "race name" text, "location" text, "uci rating" number, "winner" text, "team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what race had the same location as tour d'egyp...
SELECT "race name" FROM table_204_409 WHERE "race name" <> "tour d'egypte" AND "location" = (SELECT "location" FROM table_204_409 WHERE "race name" = "tour d'egypte")
### Instruction: CREATE TABLE table_64060 ( "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Opponent in Final" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date had Alexander Krasnorutskiy as a partner with ...
SELECT "Date" FROM table_64060 WHERE "Partner" = 'alexander krasnorutskiy' AND "Score" = '6–3, 4–6, 6–2'
### Instruction: CREATE TABLE table_204_230 ( id number, "team #1" text, "agg." text, "team #2" text, "1st match" text, "2nd match" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- was the score in the 1st match between svendborg and goteborgs kvi...
SELECT "1st match" = "2nd match" FROM table_204_230 WHERE "team #1" = 'svendborg' AND "team #2" = 'goteborgs kvinnliga'
### Instruction: CREATE TABLE table_3724 ( "Model Number" text, "Frequency" text, "L2 Cache" text, "HT" text, "Mult. 1" text, "Voltage" text, "TDP" text, "Socket" text, "Release date" text, "Order Part Number" text ) -- Using valid SQLite, answer the following questions for the...
SELECT COUNT("TDP") FROM table_3724 WHERE "Order Part Number" = 'AMQL65DAM22GG'
### Instruction: CREATE TABLE table_63132 ( "County" text, "Per capita income" text, "Median household income" text, "Median family income" text, "Population" real, "Number of households" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is th...
SELECT AVG("Population") FROM table_63132 WHERE "Median household income" = '$87,832' AND "Number of households" < '64,886'
### Instruction: CREATE TABLE table_57699 ( "Disc" real, "Track" real, "English title" text, "Japanese title" text, "R\u014dmaji title" text, "Artist" text, "Track time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which R maji title has a...
SELECT "R\u014dmaji title" FROM table_57699 WHERE "Track" > '20' AND "Track time" = '4:28'
### Instruction: CREATE TABLE table_77681 ( "Model number" text, "sSpec number" text, "Frequency" text, "L2 cache" text, "Mult." text, "Voltage" text, "Socket" text, "Release date" text, "Part number(s)" text, "Release price ( USD )" text ) -- Using valid SQLite, answer the fol...
SELECT "Part number(s)" FROM table_77681 WHERE "Frequency" = '2.4 ghz'
### Instruction: CREATE TABLE table_18252 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's district with candidates being curt weldon (r) 6...
SELECT "District" FROM table_18252 WHERE "Candidates" = 'Curt Weldon (R) 61.3% Bill Spingler (D) 38.7%'
### Instruction: CREATE TABLE table_25549 ( "Year" real, "Dates" text, "Champion" text, "Country" text, "Score" text, "Margin of victory" text, "Tournament location" text, "Purse ( $ )" real, "Winners share ($)" real ) -- Using valid SQLite, answer the following questions for the t...
SELECT MIN("Winners share ($)") FROM table_25549 WHERE "Champion" = 'Se Ri Pak (2)'
### Instruction: CREATE TABLE table_name_78 ( percentage_of_marine_area__foreez_ VARCHAR, ecozone VARCHAR, area__km²__exclusive_economic_zone VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many values for percentage of marine area are for the Atlanti...
SELECT COUNT(percentage_of_marine_area__foreez_) FROM table_name_78 WHERE ecozone = "atlantic marine" AND area__km²__exclusive_economic_zone < 996 OFFSET 439
### Instruction: CREATE TABLE table_50340 ( "League" text, "Season" text, "Name" text, "Place" real, "Record" text, "Head Coach" text, "Points" text, "Rebounds" text, "Assists" text, "Steals" text, "Turnover" text ) -- Using valid SQLite, answer the following questions for ...
SELECT "Rebounds" FROM table_50340 WHERE "Name" = 'pom baskets jena'
### Instruction: CREATE TABLE table_45378 ( "Channel" text, "Play-by-play" text, "Color commentator(s)" text, "Studio host" text, "Studio analysts" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which channel will have play by play commentator Paul ...
SELECT "Channel" FROM table_45378 WHERE "Play-by-play" = 'paul sunderland' AND "Studio host" = 'bill macdonald' AND "Studio analysts" = 'jack haley'
### Instruction: CREATE TABLE enzyme ( name VARCHAR, location VARCHAR, product VARCHAR, id VARCHAR ) CREATE TABLE medicine_enzyme_interaction ( enzyme_id VARCHAR, interaction_type VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the d...
SELECT DISTINCT T1.name, T1.location, T1.product FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.enzyme_id = T1.id WHERE T2.interaction_type = 'inhibitor'
### Instruction: CREATE TABLE table_27810 ( "Position" real, "Sail number" text, "Yacht" text, "State/country" text, "Yacht type" text, "LOA (Metres)" text, "Skipper" text, "Elapsed time d:hh:mm:ss" text ) -- Using valid SQLite, answer the following questions for the tables provided ab...
SELECT "LOA (Metres)" FROM table_27810 WHERE "Skipper" = 'Jez Fanstone'
### Instruction: CREATE TABLE table_44632 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is To Par, when Money ( $ ) is Playoff, and when Score is 68-...
SELECT "To par" FROM table_44632 WHERE "Money ( $ )" = 'playoff' AND "Score" = '68-73-77-65=283'
### Instruction: CREATE TABLE table_79005 ( "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 MAX("Lost") FROM table_79005 WHERE "Drawn" = '11' AND "Team" = 'leek town'
### Instruction: CREATE TABLE table_25598 ( "No." real, "Season" real, "Bowler" text, "Batsmen" text, "For" text, "Against" text, "Ground" text, "Scorecard" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the bowler when the batsm...
SELECT "Bowler" FROM table_25598 WHERE "Batsmen" = 'Dwaraka Ravi Teja RP Singh Pragyan Ojha'
### Instruction: CREATE TABLE table_name_64 ( gfr_2006 INTEGER, whites_as__percentage_of_pop VARCHAR, tfr_2006 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest total GFR that has 95.80% of the population as Whites, and a TFR total larger...
SELECT MIN(gfr_2006) FROM table_name_64 WHERE whites_as__percentage_of_pop = "95.80%" AND tfr_2006 > 2.14
### Instruction: CREATE TABLE table_74004 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the first elected for hosea moffitt (f) 57.9% josi...
SELECT "First elected" FROM table_74004 WHERE "Candidates" = 'Hosea Moffitt (F) 57.9% Josiah Masters (DR) 42.1%'
### Instruction: CREATE TABLE table_14011 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the bronze medal count of Spain that has less than 39 Gold, 3 silver...
SELECT "Bronze" FROM table_14011 WHERE "Gold" < '39' AND "Silver" = '3' AND "Rank" < '35' AND "Nation" = 'spain'
### Instruction: CREATE TABLE news_report ( journalist_ID int, Event_ID int, Work_Type text ) CREATE TABLE event ( Event_ID int, Date text, Venue text, Name text, Event_Attendance int ) CREATE TABLE journalist ( journalist_ID int, Name text, Nationality text, Age text, ...
SELECT Nationality, SUM(Age) FROM journalist GROUP BY Nationality ORDER BY Nationality DESC
### Instruction: CREATE TABLE table_8902 ( "Consonant final stem" text, "Example: did-" text, "Vowel final stem" text, "Example: ch'aghara-" text, "Noun example: datv-" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What example for did- is shown fo...
SELECT "Example: did-" FROM table_8902 WHERE "Consonant final stem" = '-i' AND "Noun example: datv-" = 'datv-it'
### Instruction: CREATE TABLE table_4585 ( "Stage" text, "Start time" text, "Stage name" text, "Distance" text, "Winning driver" text, "Time" text, "Avg. Speed" text, "Rally leader" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was...
SELECT "Avg. Speed" FROM table_4585 WHERE "Distance" = '18.00km' AND "Winning driver" = 'jean-claude andruet'
### Instruction: CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following ...
SELECT Code, Price FROM Products WHERE Price BETWEEN 60 AND 120
### Instruction: CREATE TABLE table_train_231 ( "id" int, "hemoglobin_a1c_hba1c" float, "heart_disease" bool, "stroke" bool, "renal_disease" bool, "estimated_glomerular_filtration_rate_egfr" int, "allergy_to_milk" bool, "NOUSE" float ) -- Using valid SQLite, answer the following questi...
SELECT * FROM table_train_231 WHERE heart_disease = 1 OR stroke = 1
### Instruction: CREATE TABLE table_74298 ( "Period ended" text, "Turnover (\u00a3m)" text, "Profit before tax (\u00a3m)" text, "Dividend per share (p)" text, "Adjusted earnings per share diluted (p)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- W...
SELECT "Profit before tax (\u00a3m)" FROM table_74298 WHERE "Turnover (\u00a3m)" = '431.06'
### Instruction: CREATE TABLE table_8382 ( "Pick" real, "Player" text, "Pos." text, "Nationality" text, "Team" text, "Previous team" text, "NBA years [a ]" text, "Career with the franchise [b ]" text ) -- Using valid SQLite, answer the following questions for the tables provided above....
SELECT "Player" FROM table_8382 WHERE "Pick" > '24' AND "NBA years [a ]" = '9'
### Instruction: CREATE TABLE table_13524 ( "School" text, "Location" text, "Mascot" text, "Enrollment" real, "IHSAA Class" text, "# / County" text, "Year Joined" real, "Previous Conference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. --...
SELECT COUNT("Enrollment") FROM table_13524 WHERE "# / County" = '57 noble' AND "IHSAA Class" = 'aa'
### Instruction: CREATE TABLE participates_in ( stuid VARCHAR ) CREATE TABLE activity ( actid VARCHAR, activity_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the ids of the students who participate in Canoeing and Kayaking. ### Response:
SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Kayaking'
### Instruction: CREATE TABLE table_25248 ( "Year" text, "Date" text, "Driver" text, "Team" text, "Manufacturer" text, "Laps" real, "Miles (km)" text, "Race Time" text, "Average Speed (mph)" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tab...
SELECT "Date" FROM table_25248 WHERE "Race Time" = '2:43:19'
### Instruction: CREATE TABLE table_20067 ( "Name" text, "Year" real, "Landfall" text, "NHC Advisory Number" text, "V(mph)" real, "R(miles)" real, "Saffir-Simpson Category" real, "CHI" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What ...
SELECT "CHI" FROM table_20067 WHERE "NHC Advisory Number" = '49B'
### Instruction: CREATE TABLE school_bus ( School_ID int, Driver_ID int, Years_Working int, If_full_time bool ) CREATE TABLE driver ( Driver_ID int, Name text, Party text, Home_city text, Age int ) CREATE TABLE school ( School_ID int, Grade text, School text, Locati...
SELECT Home_city, AVG(Age) FROM driver GROUP BY Home_city
### Instruction: CREATE TABLE table_13883 ( "Athlete" text, "Event" text, "Round of 32" text, "Round of 16" text, "Quarterfinals" text, "Semifinals" text, "Finals" text, "Rank" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the a...
SELECT "Athlete" FROM table_13883 WHERE "Finals" = 'did not advance' AND "Event" = '56kg'
### Instruction: CREATE TABLE table_12727 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Tie no of the Carlisle United Away game on 17/11/1990 with a Score of 5 0?...
SELECT "Tie no" FROM table_12727 WHERE "Date" = '17/11/1990' AND "Score" = '5–0' AND "Away team" = 'carlisle united'
### Instruction: CREATE TABLE table_39622 ( "School" text, "Mascot" text, "Location" text, "Enrollment" real, "IHSAA Class" text, "IHSAA Football Class" text, "# / County" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- At Indianapolis North ...
SELECT "IHSAA Football Class" FROM table_39622 WHERE "Enrollment" > '1,829' AND "School" = 'indianapolis north central'
### Instruction: CREATE TABLE table_18826 ( "Club" text, "Played" text, "Won" 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,...
SELECT "Club" FROM table_18826 WHERE "Tries for" = '83'
### Instruction: CREATE TABLE station ( station_id number, name text, annual_entry_exit number, annual_interchanges number, total_passengers number, location text, main_services text, number_of_platforms number ) CREATE TABLE train_station ( train_id number, station_id number ) ...
SELECT name FROM station WHERE NOT station_id IN (SELECT station_id FROM train_station)
### Instruction: CREATE TABLE table_42207 ( "Name" text, "Innings" real, "Runs Scored" real, "Balls Faced" real, "Average" real, "S.R." real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of balls faced associated with a strike rate o...
SELECT SUM("Balls Faced") FROM table_42207 WHERE "S.R." > '48.28' AND "Innings" = '3' AND "Average" < '5'
### Instruction: CREATE TABLE table_74675 ( "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. -- How much is the sum of every cr...
SELECT SUM("Crowd") FROM table_74675 WHERE "Away team score" = '7.13 (55)' AND "Away team" = 'richmond'
### Instruction: CREATE TABLE table_name_98 ( revenue__bn INTEGER, rank VARCHAR, profit__bn$_ VARCHAR, assets__bn$_ VARCHAR, headquarters VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of revenue in Hong Kong with a rank greater t...
SELECT SUM(revenue__bn) AS $_ FROM table_name_98 WHERE assets__bn$_ < 3.46 AND headquarters = "hong kong" AND profit__bn$_ > 0.17 AND rank > 42
### Instruction: CREATE TABLE table_4560 ( "Year" real, "Network" text, "Play-by-play" text, "Color commentator(s)" text, "Sideline reporter(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who are the sideline reporter(s) on NBC with al michaels ...
SELECT "Sideline reporter(s)" FROM table_4560 WHERE "Network" = 'nbc' AND "Play-by-play" = 'al michaels' AND "Year" > '2013'
### Instruction: CREATE TABLE aircraft ( aid number, name text, distance number ) CREATE TABLE certificate ( eid number, aid number ) CREATE TABLE flight ( flno number, origin text, destination text, distance number, departure_date time, arrival_date time, price number,...
SELECT origin, destination FROM flight WHERE price > 300
### Instruction: CREATE TABLE table_28906 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the incumbent for jacob spangler (dr) 67.1% jacob ...
SELECT "Incumbent" FROM table_28906 WHERE "Candidates" = 'Jacob Spangler (DR) 67.1% Jacob Hay (F) 32.9%'
### Instruction: CREATE TABLE table_55002 ( "Year" text, "Make & Model" text, "Length" text, "Engine Type" text, "Numbers" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If length is ft (m) with numbers of 6600-6684 (84 buses) for 2003, what is the ...
SELECT "Engine Type" FROM table_55002 WHERE "Length" = 'ft (m)' AND "Year" = '2003' AND "Numbers" = '6600-6684 (84 buses)'
### Instruction: CREATE TABLE table_203_102 ( id number, "event" text, "performance" text, "athlete" text, "nation" text, "place" text, "date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- in 2008 in track and field events who broke more wo...
SELECT "athlete" FROM table_203_102 WHERE "athlete" IN ('usain bolt', 'haile gebrselassie') GROUP BY "athlete" ORDER BY COUNT(*) DESC LIMIT 1
### Instruction: CREATE TABLE table_1612 ( "Game" real, "Date" text, "Opponent" 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 provid...
SELECT COUNT("High points") FROM table_1612 WHERE "Location/Attendance" = 'UIC Pavilion 6,304'
### Instruction: CREATE TABLE table_203_362 ( id number, "school" text, "location" text, "outright titles" number, "shared titles" number, "runners-up" number, "total finals" number, "last title" number, "last final" number ) -- Using valid SQLite, answer the following questions fo...
SELECT "school" FROM table_203_362 WHERE "school" IN ('campbell college', 'regent house grammar school') ORDER BY "last title" DESC LIMIT 1
### Instruction: CREATE TABLE table_1734 ( "N" real, "P" text, "Name" text, "EU" text, "Country" text, "Age" real, "Type" text, "Moving from" text, "Transfer window" text, "Ends" text, "Transfer fee" text, "Source" text ) -- Using valid SQLite, answer the following ques...
SELECT "Country" FROM table_1734 WHERE "Moving from" = 'Bristol City'
### Instruction: CREATE TABLE table_45522 ( "Poll Source" text, "Dates administered" text, "Democrat: Tom Harkin" text, "Republican: Christopher Reed" text, "Lead Margin" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Democrat: Tom Harkin's...
SELECT "Democrat: Tom Harkin" FROM table_45522 WHERE "Poll Source" = 'rasmussen reports' AND "Lead Margin" = '14'
### Instruction: CREATE TABLE table_name_26 ( network VARCHAR, call_sign VARCHAR, vidéotron__gatineau_ VARCHAR, rogers_cable__ottawa_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Network is on a Vid otron (Gatineau) channel lower than 8 and a...
SELECT network FROM table_name_26 WHERE vidéotron__gatineau_ < 8 AND rogers_cable__ottawa_ < 8 AND call_sign = "cjoh-dt"
### Instruction: CREATE TABLE table_train_4 ( "id" int, "pregnancy_or_lactation" bool, "severe_sepsis" bool, "acute_venous_thromboembolism_vte" bool, "allergy_to_carbapenem" bool, "septic_shock" bool, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions fo...
SELECT * FROM table_train_4 WHERE acute_venous_thromboembolism_vte = 1
### Instruction: CREATE TABLE table_32759 ( "Name" text, "Release date" text, "Latest version" text, "Status support" text, "Source model" text, "Architecture" text, "Target market" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which of the...
SELECT "Latest version" FROM table_32759 WHERE "Architecture" = '16-bit' AND "Release date" = '1985-11-20'
### Instruction: CREATE TABLE table_2928 ( "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 MIN("Population") FROM table_2928 WHERE "Serbs" = '73.53%'
### Instruction: CREATE TABLE table_54962 ( "State" text, "Interview" real, "Swimsuit" real, "Evening gown" real, "Average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of the swimsuit scores from Missouri that have evening gown sc...
SELECT SUM("Swimsuit") FROM table_54962 WHERE "Evening gown" < '8.77' AND "State" = 'missouri' AND "Average" < '8.823'
### Instruction: CREATE TABLE table_27563 ( "Season" real, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "F/Laps" real, "Podiums" real, "Points" real, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT "Position" FROM table_27563 WHERE "Season" = '2012' AND "Team" = 'Racing Engineering'
### Instruction: CREATE TABLE school ( School_ID int, Grade text, School text, Location text, Type text ) CREATE TABLE school_bus ( School_ID int, Driver_ID int, Years_Working int, If_full_time bool ) CREATE TABLE driver ( Driver_ID int, Name text, Party text, Home_...
SELECT Party, COUNT(*) FROM driver GROUP BY Party ORDER BY COUNT(*)
### Instruction: CREATE TABLE table_25719 ( "#" real, "Producing Nation" text, "10 3 bbl/d (2006)" text, "10 3 bbl/d (2007)" real, "10 3 bbl/d (2008)" real, "10 3 bbl/d (2009)" real, "Present Share" text ) -- Using valid SQLite, answer the following questions for the tables provided above....
SELECT "Present Share" FROM table_25719 WHERE "Producing Nation" = 'Australia'
### Instruction: CREATE TABLE table_24195 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real, "U.S. viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the ...
SELECT COUNT("U.S. viewers (millions)") FROM table_24195 WHERE "Title" = 'Bite Me'
### Instruction: CREATE TABLE table_19189 ( "Cast" text, "1951 ( BBC )" text, "1957 (BBC)" text, "1968 (BBC)" text, "1970 (film)" text, "2000 ( Carlton Television )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the 1970 film for when 1968...
SELECT "1970 (film)" FROM table_19189 WHERE "1968 (BBC)" = 'Neil McDermott'
### Instruction: CREATE TABLE station ( Station_ID int, Name text, Annual_entry_exit real, Annual_interchanges real, Total_Passengers real, Location text, Main_Services text, Number_of_Platforms int ) CREATE TABLE train_station ( Train_ID int, Station_ID int ) CREATE TABLE trai...
SELECT Name, COUNT(Name) FROM train GROUP BY Name
### Instruction: CREATE TABLE table_55573 ( "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. -- What did the home team score wh...
SELECT "Home team score" FROM table_55573 WHERE "Crowd" > '20,851' AND "Away team" = 'hawthorn'
### Instruction: CREATE TABLE table_5332 ( "Specification" text, "Gender" text, "Junior High School (12\u201315 yrs)" text, "Senior High School (15\u201318 yrs)" text, "University students and Adults (18yrs+)" text ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT "Junior High School (12\u201315 yrs)" FROM table_5332 WHERE "Gender" = 'male and female'
### Instruction: CREATE TABLE table_203_473 ( id number, "no." number, "date" text, "tournament" text, "winning score" text, "margin\nof victory" text, "runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- when was the tournament wit...
SELECT "date" FROM table_203_473 WHERE "margin\nof victory" > (SELECT "margin\nof victory" FROM table_203_473 WHERE "tournament" = 'hertz bay hill classic')
### Instruction: CREATE TABLE table_50708 ( "Appearances" real, "School" text, "Wins" real, "Losses" real, "Percent" text, "Last Appearance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Wins, when Percent is 0.000, when Sch...
SELECT MAX("Wins") FROM table_50708 WHERE "Percent" = '0.000' AND "School" = 'oklahoma state' AND "Appearances" < '1'
### Instruction: CREATE TABLE table_38287 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text ) -- Using valid SQLite, answer the following questions for the tables provided abov...
SELECT "Tries against" FROM table_38287 WHERE "Lost" = '12' AND "Club" = 'pontycymmer rfc'
### Instruction: CREATE TABLE train ( train_id number, name text, time text, service text ) CREATE TABLE station ( station_id number, name text, annual_entry_exit number, annual_interchanges number, total_passengers number, location text, main_services text, number_of_pl...
SELECT name, location, number_of_platforms FROM station
### Instruction: CREATE TABLE table_53396 ( "English Name" text, "Simplified" text, "Traditional" text, "Pinyin" text, "Hakka" text, "Area" real, "Population" real, "Density" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the sum ...
SELECT SUM("Population") FROM table_53396 WHERE "Simplified" = '上杭县' AND "Area" < '2,879'
### Instruction: CREATE TABLE table_43159 ( "Year" text, "Champion" text, "Country" text, "To par" text, "Margin of victory" text, "Winner's share ( $ )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the victory margin in 2013 with a Wi...
SELECT "Margin of victory" FROM table_43159 WHERE "Winner's share ( $ )" = '1,440,000' AND "Year" = '2013'
### Instruction: CREATE TABLE table_46234 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "Location Attendance" text, "Series" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Team has...
SELECT "Team" FROM table_46234 WHERE "Location Attendance" = 'staples center 18,997' AND "Series" = '1–0'