instruction
stringlengths
212
6.3k
output
stringlengths
6
2.03k
### Instruction: CREATE TABLE table_44869 ( "Year" real, "Country" text, "Course" text, "Location" text, "Total score" text, "To par [a ]" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- With a year larger than 1905, and a location of philadelphi...
SELECT "Course" FROM table_44869 WHERE "To par [a ]" = 'n/a' AND "Country" = 'scotland' AND "Year" > '1905' AND "Location" = 'philadelphia, pennsylvania'
### Instruction: CREATE TABLE table_30956 ( "Episode" text, "First broadcast" text, "Andrew and Georgies guest" text, "Jamie and Johns guest Dermot OLeary replaced Jamie Redknapp as team captain for one week in series 3, episode 8." text, "Scores" text ) -- Using valid SQLite, answer the following...
SELECT "Andrew and Georgies guest" FROM table_30956 WHERE "Jamie and Johns guest Dermot OLeary replaced Jamie Redknapp as team captain for one week in series 3, episode 8." = 'Phil Taylor'
### Instruction: CREATE TABLE table_51654 ( "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 "Race" FROM table_51654 WHERE "Pole position" = 'alberto ascari' AND "Winning driver" = 'alberto ascari' AND "Fastest lap" = 'luigi villoresi'
### Instruction: CREATE TABLE county ( county_id number, county_name text, population number, zip_code text ) CREATE TABLE election ( election_id number, counties_represented text, district number, delegate text, party number, first_elected number, committee text ) CREATE T...
SELECT county_name FROM county ORDER BY population
### 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 Founder, AVG(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder
### 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 Founder, SUM(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder
### Instruction: CREATE TABLE table_204_335 ( id number, "outcome" text, "no." number, "date" number, "tournament" text, "surface" text, "partner" text, "opponents in the final" text, "score in the final" text ) -- Using valid SQLite, answer the following questions for the tables p...
SELECT "date" FROM table_204_335 WHERE "date" IN (1971, 1972) AND "outcome" = 'winner' GROUP BY "date" ORDER BY COUNT(*) DESC LIMIT 1
### 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 Headquarter, COUNT(DISTINCT T1.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code ORDER BY Headquarter
### Instruction: CREATE TABLE table_1229 ( "Station" text, "Year opened" text, "Metropolitan borough [c ]" text, "Zone" real, "Servedby Route maps:- [ dead link ] [ dead link ]" text, "Station users 2006\u201307" real, "Station users 2007\u201308" real ) -- Using valid SQLite, answer the f...
SELECT "Station users 2006\u201307" FROM table_1229 WHERE "Station" = 'Bloxwich North'
### Instruction: CREATE TABLE table_17628 ( "Municipality" text, "Population" real, "Police officers" real, "Residents per officer" real, "Total costs (2005)" text, "Cost per capita" text, "Case burden" real, "Crime rate per 1,000 people" real, "Police force" text ) -- Using valid ...
SELECT MAX("Crime rate per 1,000 people") FROM table_17628 WHERE "Cost per capita" = '$152'
### Instruction: CREATE TABLE table_59617 ( "Combined" text, "50 yard Freestyle" text, "100 yard Freestyle" text, "200 yard Freestyle" text, "500 yard Freestyle" text, "100 yard Backstroke" text, "100 yard Butterfly" text ) -- Using valid SQLite, answer the following questions for the tabl...
SELECT "100 yard Butterfly" FROM table_59617 WHERE "100 yard Freestyle" = 'cody miller (palo verde)'
### Instruction: CREATE TABLE table_16105 ( "Date" text, "Album name" text, "Track" text, "Track title" text, "Lyricist" text, "Music genre/style" text, "Major instrument(s)" text, "Lyrics theme/style" text, "Duration" text ) -- Using valid SQLite, answer the following questions fo...
SELECT "Duration" FROM table_16105 WHERE "Major instrument(s)" = 'Piano' AND "Date" = '2004-02-03'
### Instruction: CREATE TABLE table_66899 ( "Year" text, "Superintendent" text, "Glendale Principal" text, "H.H. Principal" text, "Maplemere Principal" text, "W.R. Principal" text, "M.S. Principal" text, "H.S. Principal" text, "H. S. Asst. Principal" text ) -- Using valid SQLite, a...
SELECT "H.S. Principal" FROM table_66899 WHERE "Year" = '1973-1974'
### Instruction: CREATE TABLE table_35608 ( "Team" text, "Copa Libertadores 1996" text, "Supercopa Sudamericana 1996" text, "Copa CONMEBOL 1996" text, "Recopa Sudamericana 1996" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the recoupa suda...
SELECT "Recopa Sudamericana 1996" FROM table_35608 WHERE "Copa Libertadores 1996" = 'round of 16'
### Instruction: CREATE TABLE table_62680 ( "Constituency number" text, "Name" text, "Reserved for ( SC / ST /None)" text, "District" text, "Number of electorates (2009)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the reserved for (SC/ST...
SELECT "Reserved for ( SC / ST /None)" FROM table_62680 WHERE "Number of electorates (2009)" > '101,595' AND "Constituency number" = '49'
### Instruction: CREATE TABLE table_59485 ( "Position" real, "Club" text, "Played" real, "Points" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real ) -- Using valid SQLite, answer the following questions for the table...
SELECT SUM("Goal Difference") FROM table_59485 WHERE "Draws" = '8' AND "Goals against" = '32' AND "Wins" < '12'
### 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 SUM(Number_of_Platforms), SUM(Total_Passengers) FROM station GROUP BY Location
### Instruction: CREATE TABLE table_train_196 ( "id" int, "systolic_blood_pressure_sbp" int, "heart_disease" bool, "renal_disease" bool, "diabetic" string, "diastolic_blood_pressure_dbp" int, "serum_creatinine" float, "hypertension" bool, "NOUSE" float ) -- Using valid SQLite, answ...
SELECT * FROM table_train_196 WHERE renal_disease = 1 OR serum_creatinine > 1.5
### Instruction: CREATE TABLE table_64586 ( "Tournament" text, "2000" text, "1999" text, "1998" text, "1997" text, "1996" text, "1995" text, "1994" text, "1993" text, "1992" text, "1991" text ) -- Using valid SQLite, answer the following questions for the tables provided ab...
SELECT "1991" FROM table_64586 WHERE "1997" = '18'
### Instruction: CREATE TABLE voting_record ( stuid number, registration_date text, election_cycle text, president_vote number, vice_president_vote number, secretary_vote number, treasurer_vote number, class_president_vote number, class_senator_vote number ) CREATE TABLE student ( ...
SELECT major FROM student WHERE sex = "F" GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1
### Instruction: CREATE TABLE table_28992 ( "Proto-Slavic" text, "Russian" text, "Ukrainian" text, "Belarusian" text, "Polish" text, "Czech" text, "Slovak" text, "Slovene" text, "Serbo-Croatian" text, "Bulgarian" text, "Macedonian" text ) -- Using valid SQLite, answer the f...
SELECT COUNT("Slovene") FROM table_28992 WHERE "Belarusian" = 'рыба (rýba)'
### Instruction: CREATE TABLE book_club ( book_title VARCHAR, book_club_id VARCHAR ) CREATE TABLE movie ( title VARCHAR, movie_id VARCHAR ) CREATE TABLE culture_company ( movie_id VARCHAR, book_club_id VARCHAR, incorporated_in VARCHAR ) -- Using valid SQLite, answer the following questio...
SELECT T1.title, T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id JOIN book_club AS T3 ON T3.book_club_id = T2.book_club_id WHERE T2.incorporated_in = 'China'
### Instruction: CREATE TABLE table_42320 ( "CERCLIS ID" text, "Name" text, "County" text, "Proposed" text, "Listed" text, "Construction completed" text, "Partially deleted" text, "Deleted" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- ...
SELECT "Construction completed" FROM table_42320 WHERE "Listed" = '09/21/1984' AND "Deleted" = '11/04/1999'
### Instruction: CREATE TABLE table_23451 ( "Wireless LAN" text, "Chipset" text, "Centrino" text, "Processor" text, "Codename" text, "Release Date" real, "Process Technology" text, "Microarchitecture" text ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT "Chipset" FROM table_23451 WHERE "Codename" = 'Arrandale' AND "Wireless LAN" = 'Intel Centrino Ultimate-N 6300'
### Instruction: CREATE TABLE table_54599 ( "Year" real, "Date" text, "Type" text, "President" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Type with a Location with justus lipsius building, brussels, and a Year of 201...
SELECT "Type" FROM table_54599 WHERE "Location" = 'justus lipsius building, brussels' AND "Year" = '2012' AND "President" = 'herman van rompuy (1st term)' AND "Date" = '23 may'
### Instruction: CREATE TABLE table_67122 ( "Year" real, "Tournament" text, "Round 1" real, "Round 2" real, "Round 3" real, "Round 4" real, "Score" real, "To par" text, "Place" text, "Money (\uffe5)" real ) -- Using valid SQLite, answer the following questions for the tables pr...
SELECT MAX("Round 4") FROM table_67122 WHERE "Score" = '284' AND "Year" > '1998'
### Instruction: CREATE TABLE submission ( Submission_ID int, Scores real, Author text, College text ) CREATE TABLE workshop ( Workshop_ID int, Date text, Venue text, Name text ) CREATE TABLE Acceptance ( Submission_ID int, Workshop_ID int, Result text ) -- Using valid SQ...
SELECT Author, COUNT(DISTINCT T1.Workshop_ID) FROM Acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY Author
### Instruction: CREATE TABLE table_3733 ( "Country" text, "Total Drivers" real, "Champions" text, "Championships" text, "Current 3 November 2013" real, "First driver(s)" text, "Last/Current driver(s) 3 November 2013" text ) -- Using valid SQLite, answer the following questions for the tab...
SELECT "Country" FROM table_3733 WHERE "Last/Current driver(s) 3 November 2013" = 'Daniel Abt ( 2012 )'
### Instruction: CREATE TABLE screen_mode ( Char_cells VARCHAR, Pixels VARCHAR, Hardware_colours VARCHAR, Graphics_mode VARCHAR ) CREATE TABLE phone ( screen_mode VARCHAR, Hardware_Model_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Fi...
SELECT T1.Char_cells, T1.Pixels, T1.Hardware_colours FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T2.Hardware_Model_name = "LG-P760"
### Instruction: CREATE TABLE table_1537 ( "Place" real, "Weightlifter" text, "Body weight" text, "one hand snatch" text, "one hand clean & jerk" text, "Press" text, "Snatch" text, "1." text, "2." text, "3." text, "Total" text ) -- Using valid SQLite, answer the following q...
SELECT "Total" FROM table_1537 WHERE "one hand clean & jerk" = '87.5' AND "Snatch" = '87.5'
### 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 T1.Code, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder
### Instruction: CREATE TABLE table_204_169 ( id number, "athlete" text, "event" text, "race 1\ntime" text, "race 2\ntime" text, "total\ntime" text, "total\nrank" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the difference in tim...
SELECT ABS((SELECT "race 1\ntime" FROM table_204_169 WHERE "athlete" = 'petar popangelov') - (SELECT "race 2\ntime" FROM table_204_169 WHERE "athlete" = 'petar popangelov'))
### Instruction: CREATE TABLE table_39289 ( "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 "John B. Anderson" FROM table_39289 WHERE "Phil Crane" = '0%' AND "Ronald Reagan" = '43%'
### 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 Sex, AVG(Weight) FROM people GROUP BY Sex ORDER BY AVG(Weight) DESC
### Instruction: CREATE TABLE fires ( fire_year number, discovery_date number, discovery_doy number, discovery_time text, stat_cause_code number, stat_cause_descr text, cont_date text, cont_doy text, cont_time text, fire_size number, fire_size_class text, latitude number,...
SELECT SUM(fire_size) FROM fires
### Instruction: CREATE TABLE table_22678 ( "Name" text, "Career" text, "Matches" real, "Overs" text, "Maidens" real, "Runs" real, "Wickets" real, "Average" text, "Best" text, "5w" real, "10w" real ) -- Using valid SQLite, answer the following questions for the tables provi...
SELECT "Best" FROM table_22678 WHERE "Maidens" = '547' AND "Overs" = '2755.1'
### Instruction: CREATE TABLE table_60322 ( "Position" real, "Club" text, "Played" real, "Points" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real ) -- Using valid SQLite, answer the following questions for the table...
SELECT "Goal Difference" FROM table_60322 WHERE "Draws" > '6' AND "Position" > '12' AND "Wins" < '9'
### Instruction: CREATE TABLE table_36249 ( "Rank by average" real, "Place" real, "Couple" text, "Total" real, "Number of dances" real, "Average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Couple has a Rank by average larger than 3, an...
SELECT "Couple" FROM table_36249 WHERE "Rank by average" > '3' AND "Average" > '16.5' AND "Total" < '195' AND "Number of dances" > '3'
### Instruction: CREATE TABLE table_1802 ( "Year" text, "Governor" text, "Lieutenant Governor" text, "Secretary of State" text, "Attorney General" text, "Treasurer" text, "State Senate" text, "State Assembly" text, "U.S. Senator (Class I)" text, "U.S. Senator (Class III)" text, ...
SELECT "Treasurer" FROM table_1802 WHERE "Year" = '2008'
### Instruction: CREATE TABLE musical ( Musical_ID int, Name text, Year int, Award text, Category text, Nominee text, Result text ) CREATE TABLE actor ( Actor_ID int, Name text, Musical_ID int, Character text, Duration text, age int ) -- Using valid SQLite, answer ...
SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID ORDER BY COUNT(*)
### Instruction: CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), AllergyType VARCHAR(20) ) CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, ...
SELECT Allergy, COUNT(*) FROM Has_Allergy GROUP BY Allergy
### Instruction: CREATE TABLE table_dev_50 ( "id" int, "gender" string, "hemoglobin_a1c_hba1c" float, "diabetic" string, "estimated_glomerular_filtration_rate_egfr" int, "hba1c" float, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables pro...
SELECT * FROM table_dev_50 WHERE (age >= 18 AND age <= 80) AND diabetic = 'ii'
### Instruction: CREATE TABLE table_204_173 ( id number, "rank" number, "group" text, "name" text, "nationality" text, "2.05" text, "2.15" text, "2.19" text, "2.23" text, "2.26" text, "result" text, "notes" text ) -- Using valid SQLite, answer the following questions fo...
SELECT "name" FROM table_204_173 WHERE id = (SELECT id FROM table_204_173 WHERE "name" = 'niki palli') + 1
### 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 Price, Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter
### Instruction: CREATE TABLE table_21020 ( "Model number" text, "sSpec number" text, "Frequency" text, "GPU frequency" text, "L2 cache" text, "I/O bus" text, "Memory" text, "Voltage" text, "TDP" text, "Socket" text, "Release date" text, "Part number(s)" text, "Releas...
SELECT "Memory" FROM table_21020 WHERE "Model number" = 'Atom E640T'
### Instruction: CREATE TABLE wedding ( Church_ID int, Male_ID int, Female_ID int, Year int ) 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, ...
SELECT Open_Date, COUNT(Open_Date) FROM church ORDER BY COUNT(Open_Date) DESC
### Instruction: CREATE TABLE table_68649 ( "Club" text, "City or town" text, "Position in 2012\u201313 season" text, "First season in top division" text, "Number of seasons in top division" real, "First season of current spell in top division" text, "Top division titles" text, "Last top...
SELECT "City or town" FROM table_68649 WHERE "Number of seasons in top division" < '40' AND "Club" = 'gaziantepspor'
### Instruction: CREATE TABLE table_38601 ( "Language" text, "Totora Municipality" real, "Pojo Municipality" real, "Pocona Municipality" real, "Chimor\u00e9 Municipality" real, "Puerto Villarroel Municipality" real, "Entre R\u00edos Municipality" real ) -- Using valid SQLite, answer the fo...
SELECT COUNT("Pocona Municipality") FROM table_38601 WHERE "Totora Municipality" = '72' AND "Pojo Municipality" > '74'
### Instruction: CREATE TABLE table_3646 ( "Country or territory with flag" text, "Area (km\u00b2) (per sqmi)" text, "Population (July 2009 est.)" real, "Population density per km\u00b2" text, "Capital" text ) -- Using valid SQLite, answer the following questions for the tables provided above. --...
SELECT "Area (km\u00b2) (per sqmi)" FROM table_3646 WHERE "Population density per km\u00b2" = '8.4/km² (/sqmi)'
### 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 T1.Price, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Name
### Instruction: CREATE TABLE table_train_238 ( "id" int, "hemoglobin_a1c_hba1c" float, "fasting_c_peptide" float, "hba1c" float, "allergy_to_mammalian_derived_drug_preparations" bool, "body_mass_index_bmi" float, "renal_transplantation" bool, "NOUSE" float ) -- Using valid SQLite, ans...
SELECT * FROM table_train_238 WHERE allergy_to_mammalian_derived_drug_preparations = 1
### 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 mID, AVG(stars) FROM Rating WHERE NOT mID IN (SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = "Brittany Harris") GROUP BY mID
### Instruction: CREATE TABLE table_67539 ( "Week" real, "Set 1" text, "Set 2" text, "Set 3" text, "Set 4" text, "Set 5" text, "Volume Lbs." real, "Peak Intensity(Last Set)" text, "% of 1 Rep Max(Last Set)" text ) -- Using valid SQLite, answer the following questions for the tables...
SELECT "% of 1 Rep Max(Last Set)" FROM table_67539 WHERE "Set 4" = '145lb x 5reps'
### Instruction: CREATE TABLE table_75834 ( "Episode #" real, "Title" text, "Air Date" text, "Rating" real, "Share" real, "18\u201349" real, "Viewers" real, "Rank" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Viewers...
SELECT MIN("Viewers") FROM table_75834 WHERE "Episode #" > '58' AND "Title" = 'curveball' AND "Rating" < '4.1'
### 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 T1.Code, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Name
### Instruction: CREATE TABLE table_10001 ( "Line name" text, "Opened" real, "Last extension" real, "Stations served" real, "Length" text, "Average Interstation" text, "Journeys made (per annum)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -...
SELECT AVG("Opened") FROM table_10001 WHERE "Stations served" = '59' AND "Journeys made (per annum)" > '145,000,000'
### Instruction: CREATE TABLE table_203_794 ( id number, "year" number, "location" text, "attendance" number, "theme phrase" text, "top messages" text, "host" text, "opening general session guest(s)" text, "closing general session guest(s)" text, "sunday night reception" text, ...
SELECT SUM("attendance") FROM table_203_794 WHERE "year" = 2000
### Instruction: CREATE TABLE table_38876 ( "Year" text, "1801" text, "1811" text, "1821" text, "1841" text, "1851" text, "1861" text, "1871" text, "1881" text, "1891" text, "1901" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT "1821" FROM table_38876 WHERE "1861" = '3733'
### Instruction: CREATE TABLE customer ( cust_id text, cust_name text, acc_type text, acc_bal number, no_of_loans number, credit_score number, branch_id number, state text ) CREATE TABLE bank ( branch_id number, bname text, no_of_customers number, city text, state te...
SELECT cust_name FROM customer ORDER BY acc_bal
### Instruction: CREATE TABLE table_42551 ( "Time" text, "06:00 PM" text, "07:00 PM" text, "08:00 PM" text, "09:00 PM" text, "10:00 PM" text, "10:30 PM" text, "11:00 PM" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 08:00 PM...
SELECT "08:00 PM" FROM table_42551 WHERE "07:00 PM" = 'i am siam (rerun)'
### Instruction: CREATE TABLE management ( department_ID int, head_ID int, temporary_acting text ) CREATE TABLE head ( head_ID int, name text, born_state text, age real ) CREATE TABLE department ( Department_ID int, Name text, Creation text, Ranking int, Budget_in_Billi...
SELECT Creation, AVG(Budget_in_Billions) FROM department GROUP BY Creation ORDER BY Creation
### Instruction: CREATE TABLE table_73332 ( "Administrative division" text, "Area (km\u00b2) 2005" text, "Population 2010 Census" real, "Population 2011 SIAK Database" text, "Population density (/km\u00b2 2010)" real ) -- Using valid SQLite, answer the following questions for the tables provided a...
SELECT "Administrative division" FROM table_73332 WHERE "Population 2011 SIAK Database" = '3,672,994'
### Instruction: CREATE TABLE furniture ( Furniture_ID int, Name text, Num_of_Component int, Market_Rate real ) CREATE TABLE manufacturer ( Manufacturer_ID int, Open_Year real, Name text, Num_of_Factories int, Num_of_Shops int ) CREATE TABLE furniture_manufacte ( Manufacturer_I...
SELECT Name, Num_of_Component FROM furniture WHERE Num_of_Component > 10
### 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 product, chromosome, porphyria FROM enzyme WHERE location = 'Cytosol'
### Instruction: CREATE TABLE table_203_166 ( id number, "pos" text, "no" number, "rider" text, "manufacturer" text, "laps" number, "time" text, "grid" number, "points" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many positi...
SELECT (SELECT "pos" FROM table_203_166 WHERE "rider" = 'john hopkins') - (SELECT "pos" FROM table_203_166 WHERE "rider" = 'valentino rossi')
### Instruction: CREATE TABLE table_34643 ( "Year" real, "US Cham. Rank" real, "US Cham. Spending" text, "Next Highest Spender" text, "Next Highest Amount" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Year is the highest one that has a Next ...
SELECT MAX("Year") FROM table_34643 WHERE "Next Highest Spender" = 'aarp' AND "US Cham. Spending" = '$39,805,000' AND "US Cham. Rank" > '1'
### Instruction: CREATE TABLE table_53870 ( "Ship" text, "Built" real, "Entered service" real, "Route" text, "Gross tonnage" text, "Length" text, "Width" text, "Passengers" real, "Vessels" real, "Knots" real ) -- Using valid SQLite, answer the following questions for the tables...
SELECT MAX("Built") FROM table_53870 WHERE "Entered service" > '2003' AND "Knots" < '27'
### Instruction: CREATE TABLE table_62107 ( "Mission" text, "Resident Country" text, "Local Location" text, "Local Mission" text, "Non-Resident Head of Mission" text, "Local Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Local ...
SELECT "Local Location" FROM table_62107 WHERE "Local Position" = 'ambassador' AND "Non-Resident Head of Mission" = 'marina isabel cáceres de estévez' AND "Mission" = 'finland'
### Instruction: CREATE TABLE table_79544 ( "Mountain" text, "Height (m)" real, "Prominence (m)" real, "Range" text, "Country" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Country has a Prominence (m) smaller than 1540, and a Height (m) smal...
SELECT "Country" FROM table_79544 WHERE "Prominence (m)" < '1540' AND "Height (m)" < '3530' AND "Range" = 'virunga mountains' AND "Mountain" = 'nyiragongo'
### Instruction: CREATE TABLE table_name_27 ( minimum_tax_incl_sales_taxes__cad INTEGER, min_tax__cad¢_us_gal_ VARCHAR, federal_excise_tax___cad¢___l__ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the least minimum sales tax when the min tax is...
SELECT MIN(minimum_tax_incl_sales_taxes__cad) AS ¢_l_ FROM table_name_27 WHERE min_tax__cad¢_us_gal_ = 105.7 AND federal_excise_tax___cad¢___l__ > 10
### Instruction: CREATE TABLE member ( Member_ID int, Name text, Country text, College_ID int ) CREATE TABLE round ( Round_ID int, Member_ID int, Decoration_Theme text, Rank_in_Round int ) CREATE TABLE college ( College_ID int, Name text, Leader_Name text, College_Locat...
SELECT College_Location, COUNT(College_Location) FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID GROUP BY College_Location ORDER BY T2.Name
### Instruction: CREATE TABLE college ( cname text, state text, enr number ) CREATE TABLE tryout ( pid number, cname text, ppos text, decision text ) CREATE TABLE player ( pid number, pname text, ycard text, hs number ) -- Using valid SQLite, answer the following question...
SELECT cname FROM college WHERE enr < 13000 AND state = "AZ" UNION SELECT cname FROM college WHERE enr > 15000 AND state = "LA"
### Instruction: CREATE TABLE table_20621 ( "Missouri vs." text, "Overall Record" text, "at Columbia" text, "at Opponents Venue" text, "at Neutral Site" text, "Last 5 Meetings" text, "Last 10 Meetings" text, "Current Streak" text, "Since Joining SEC" text ) -- Using valid SQLite, a...
SELECT "Overall Record" FROM table_20621 WHERE "at Opponents Venue" = 'UF, 1-0'
### Instruction: CREATE TABLE table_204_858 ( id number, "date" text, "time" text, "opponent#" text, "rank#" text, "site" text, "tv" text, "result" text, "attendance" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the diffe...
SELECT ABS((SELECT "attendance" FROM table_204_858 WHERE "date" = 'august 30') - (SELECT "attendance" FROM table_204_858 WHERE "date" = 'november 1'))
### Instruction: CREATE TABLE College ( cName varchar(20), state varchar(2), enr numeric(5,0) ) CREATE TABLE Tryout ( pID numeric(5,0), cName varchar(20), pPos varchar(8), decision varchar(3) ) CREATE TABLE Player ( pID numeric(5,0), pName varchar(20), yCard varchar(3), HS ...
SELECT state, MIN(enr) FROM College GROUP BY state ORDER BY state DESC
### Instruction: CREATE TABLE table_42069 ( "Region" text, "Province" text, "Capital" text, "No. of Communes" real, "Area" real, "2002 Population" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What region has a 2002 population greater than 132,...
SELECT "Region" FROM table_42069 WHERE "2002 Population" > '132,798' AND "Area" > '5,528.3' AND "Province" = 'cachapoal'
### Instruction: CREATE TABLE table_72969 ( "English ( BCP )" text, "Writing system 1 (English-based)" text, "Writing system 2 (German-based)" text, "Modern German (close translation)" text, "Modern German (standard wording)" text ) -- Using valid SQLite, answer the following questions for the tab...
SELECT "Modern German (standard wording)" FROM table_72969 WHERE "Writing system 2 (German-based)" = 'wie mir die vergewwe wu uns schuldich sinn.'
### Instruction: CREATE TABLE bank ( branch_id number, bname text, no_of_customers number, city text, state text ) CREATE TABLE customer ( cust_id text, cust_name text, acc_type text, acc_bal number, no_of_loans number, credit_score number, branch_id number, state te...
SELECT AVG(no_of_customers) FROM bank
### Instruction: CREATE TABLE table_73306 ( "Region" text, "Population" text, "Country" text, "Language" text, "N" real, "Total%" text, "R1b1c (R-V88)" text, "R1b1a2 (R-M269)" text, "R1b1c* (R-V88*)" text, "R1b1c4 (R-V69)" text ) -- Using valid SQLite, answer the following ques...
SELECT COUNT("N") FROM table_73306 WHERE "Population" = 'Berbers from Siwa'
### Instruction: CREATE TABLE table_53600 ( "Tournament" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "Career Win\u2013Loss" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2009 value wit...
SELECT "2009" FROM table_53600 WHERE "2010" = '1r' AND "2011" = 'a'
### Instruction: CREATE TABLE table_17789 ( "Day (see Irregularities )" text, "Sunday Day One" text, "Monday Day Two" text, "Tuesday Day Three" text, "Wednesday Day Four" text, "Thursday Day Five" text, "Friday Day Six" text, "Saturday Day Seven" text ) -- Using valid SQLite, answer th...
SELECT "Thursday Day Five" FROM table_17789 WHERE "Friday Day Six" = 'პარასკევი p''arask''evi'
### Instruction: CREATE TABLE table_30829 ( "DrumSet Name" text, "Product Line" text, "Years Available" text, "Drum Module" text, "KickDrum Pad" text, "Snare Pad" text, "Tom-Tom Pads" text, "Hi-HatPad/ Controller" text, "CrashandRide CymbalPads" text, "DrumStand (oftenoptional)" ...
SELECT "Tom-Tom Pads" FROM table_30829 WHERE "Drum Module" = 'TD-5'
### Instruction: CREATE TABLE table_64655 ( "English" text, "German" text, "Dutch" text, "Latin" text, "Romanian" text, "Portuguese" text, "Spanish" text, "Italian" text, "French" text, "Greek (Modern)" text, "Bulgarian" text, "Macedonian" text, "Polish (extinct)" tex...
SELECT "English" FROM table_64655 WHERE "Bulgarian" = 'бяха чули'
### Instruction: CREATE TABLE table_204_666 ( id number, "ime exchange (including spot, credit and forward transactions)" text, "2007/08" number, "2008/09" number, "2009/10" number, "2010/11" number, "2011/12" number ) -- Using valid SQLite, answer the following questions for the tables pr...
SELECT "2008/09" FROM table_204_666 WHERE "ime exchange (including spot, credit and forward transactions)" = 'agricultural - value (billion rials)'
### Instruction: CREATE TABLE table_203_459 ( id number, "township" text, "fips" number, "population\ncenter" text, "population" number, "population\ndensity\n/km2 (/sq mi)" text, "land area\nkm2 (sq mi)" text, "water area\nkm2 (sq mi)" text, "water %" text, "geographic coordinat...
SELECT "township" FROM table_203_459 ORDER BY "population\ndensity\n/km2 (/sq mi)" LIMIT 1
### Instruction: CREATE TABLE table_204_442 ( id number, "institution" text, "location" text, "enrollment" number, "nickname" text, "varsity\nsports" number, "rugby\nsince" text, "head coach" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -...
SELECT ABS((SELECT "rugby\nsince" FROM table_204_442 WHERE "nickname" = 'wolfpack') - (SELECT "rugby\nsince" FROM table_204_442 WHERE "nickname" = 'tar heels'))
### Instruction: CREATE TABLE table_52294 ( "Country" text, "2005 Capacity" text, "2006 Capacity" text, "2007 Capacity" text, "2008 Capacity" text, "2009 Capacity" text, "2010 Capacity" text, "2011 Capacity" text, "2012 Capacity" text ) -- Using valid SQLite, answer the following q...
SELECT "Country" FROM table_52294 WHERE "2009 Capacity" = '1228 mw'
### Instruction: CREATE TABLE table_68926 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many points does an entrant of Martini Racing, the engine of an Alfa Romeo flat-12 a ...
SELECT COUNT("Points") FROM table_68926 WHERE "Entrant" = 'martini racing' AND "Engine" = 'alfa romeo flat-12' AND "Chassis" = 'brabham bt45' AND "Year" = '1976'
### Instruction: CREATE TABLE table_2593 ( "Year" text, "Day" 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 questi...
SELECT "Report" FROM table_2593 WHERE "Day" = 'Sunday' AND "Average Speed (mph)" = '128.27'
### Instruction: CREATE TABLE table_train_73 ( "id" int, "gender" string, "pregnancy_or_lactation" bool, "severe_sepsis" bool, "in_another_study" bool, "systolic_blood_pressure_sbp" int, "skin_mottling_score" int, "glasgow_come_score_gcs" int, "mr_scanning" bool, "age" float, ...
SELECT * FROM table_train_73 WHERE in_another_study = 1
### Instruction: CREATE TABLE table_4301 ( "Year" real, "GDP at constant prices (THB trillions)" text, "GDP at constant prices growth rate (percent change)" text, "GDP at current prices (USD billions)" text, "Export volume of goods and services (percent change)" text, "Current account balance (p...
SELECT COUNT("Export volume of goods and services (percent change)") FROM table_4301 WHERE "GDP at current prices (USD billions)" = '161.340'
### Instruction: CREATE TABLE table_23840623_4 ( dirty_electric_grid_rocky_mountains__denver_ VARCHAR, clean_electric_grid_california__san_francisco_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the dirty electric grid rocky mountains (denver) for ...
SELECT dirty_electric_grid_rocky_mountains__denver_ FROM table_23840623_4 WHERE clean_electric_grid_california__san_francisco_ = "160 g/mi (99 g/km)"
### Instruction: CREATE TABLE Tryout ( pID numeric(5,0), cName varchar(20), pPos varchar(8), decision varchar(3) ) CREATE TABLE College ( cName varchar(20), state varchar(2), enr numeric(5,0) ) CREATE TABLE Player ( pID numeric(5,0), pName varchar(20), yCard varchar(3), HS ...
SELECT cName, COUNT(*) FROM Tryout GROUP BY cName ORDER BY COUNT(*) DESC
### Instruction: CREATE TABLE phone_market ( Market_ID int, Phone_ID text, Num_of_stock int ) CREATE TABLE phone ( Name text, Phone_ID int, Memory_in_G int, Carrier text, Price real ) CREATE TABLE market ( Market_ID int, District text, Num_of_employees int, Num_of_shops...
SELECT Carrier, COUNT(*) FROM phone GROUP BY Carrier ORDER BY Carrier
### Instruction: CREATE TABLE table_train_224 ( "id" int, "leukopenia" int, "urinary_albumin_excretion_rate" int, "cd4_count" int, "body_weight" float, "lymphopenia" int, "hba1c" float, "insulin_requirement" float, "proteinuria" int, "body_mass_index_bmi" float, "NOUSE" float...
SELECT * FROM table_train_224 WHERE insulin_requirement > 55
### 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, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.Artist_ID = T2.Artist_ID GROUP BY T1.Artist_ID
### Instruction: CREATE TABLE table_43399 ( "Season" text, "Games" real, "Lost" real, "Points" real, "Pct %" real, "Goals for" real, "Goals against" real, "Playoffs" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Lost...
SELECT AVG("Lost") FROM table_43399 WHERE "Games" < '82' AND "Points" < '95' AND "Pct %" < '0.506'
### Instruction: CREATE TABLE table_204_568 ( id number, "pennant" text, "name" text, "hull builder" text, "ordered" text, "laid down" text, "launched" text, "accepted into service" text, "commissioned" text, "est. building cost" text, "fate" text ) -- Using valid SQLite, a...
SELECT "pennant" FROM table_204_568 WHERE id = (SELECT id FROM table_204_568 WHERE "pennant" = 'f172') + 1
### Instruction: CREATE TABLE reservations ( code number, room text, checkin text, checkout text, rate number, lastname text, firstname text, adults number, kids number ) CREATE TABLE rooms ( roomid text, roomname text, beds number, bedtype text, maxoccupancy num...
SELECT T2.roomname, COUNT(*), T1.room FROM reservations AS T1 JOIN rooms AS T2 ON T1.room = T2.roomid GROUP BY T1.room
### Instruction: CREATE TABLE table_71279 ( "Rank" real, "Team" text, "Country" text, "Value ($M)" real, "Debt as %of value" real, "% change on year" text, "Revenue ($M)" real, "Operating income($m)" real ) -- Using valid SQLite, answer the following questions for the tables provided a...
SELECT SUM("Revenue ($M)") FROM table_71279 WHERE "Debt as %of value" > '27' AND "Operating income($m)" = '77'