instruction
stringlengths
212
6.3k
output
stringlengths
6
2.03k
### Instruction: CREATE TABLE table_16261 ( "Religious group" text, "Population %" text, "Growth (1991\u20132001)" text, "Sex ratio (total)" real, "Literacy (%)" text, "Work participation (%)" text, "Sex ratio (rural)" real, "Sex ratio (urban)" real, "Sex ratio (child)" real ) -- U...
SELECT MIN("Sex ratio (rural)") FROM table_16261
### Instruction: CREATE TABLE table_3648 ( "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 "Capital" FROM table_3648 WHERE "Population density per km\u00b2" = '15.6/km² (/sqmi)'
### Instruction: CREATE TABLE table_72968 ( "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_72968 WHERE "English ( BCP )" = 'For thine is the kingdom, the power'
### Instruction: CREATE TABLE authorship ( authid VARCHAR, paperid VARCHAR ) CREATE TABLE papers ( title VARCHAR, paperid VARCHAR ) CREATE TABLE authors ( authid VARCHAR, fname VARCHAR, lname 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 = "Jeremy" AND t1.lname = "Gibbons"
### Instruction: CREATE TABLE photos ( id int, camera_lens_id int, mountain_id int, color text, name text ) CREATE TABLE camera_lens ( id int, brand text, name text, focal_length_mm real, max_aperture real ) CREATE TABLE mountain ( id int, name text, Height real, ...
SELECT brand, COUNT(brand) FROM camera_lens GROUP BY brand
### Instruction: CREATE TABLE table_name_51 ( semi_final_second_television_commentator VARCHAR, year_s_ VARCHAR, final_television_commentator VARCHAR, spokesperson VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the semi-final second television...
SELECT semi_final_second_television_commentator FROM table_name_51 WHERE final_television_commentator = "graham norton" AND spokesperson = "scott mills" AND year_s_ < 2013
### Instruction: CREATE TABLE table_train_161 ( "id" int, "white_blood_cell_count_wbc" int, "systolic_blood_pressure_sbp" int, "c_peptide_level" float, "diastolic_blood_pressure_dbp" int, "heart_rate" int, "glycosylated_hemoglobin" float, "NOUSE" float ) -- Using valid SQLite, answer t...
SELECT * FROM table_train_161 WHERE heart_rate > 120
### Instruction: CREATE TABLE table_39300 ( "Nationality" text, "Matches" real, "Drawn" real, "Lost" real, "Win %" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Nationality of england, and a Matches smaller than 510, and a Lost of 4, and a Win % sm...
SELECT MIN("Drawn") FROM table_39300 WHERE "Nationality" = 'england' AND "Matches" < '510' AND "Lost" = '4' AND "Win %" < '28.6'
### Instruction: CREATE TABLE table_17790 ( "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 "Tuesday Day Three" FROM table_17790 WHERE "Thursday Day Five" = 'Kamis'
### Instruction: CREATE TABLE table_47740 ( "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 AVG("Position") FROM table_47740 WHERE "Wins" < '14' AND "Draws" < '3'
### Instruction: CREATE TABLE table_76686 ( "Full name" text, "Alias" text, "Age\u00b9" real, "From" text, "Occupation\u00b2" text, "Specialty" text, "Position/ Eliminated" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Occupation , ...
SELECT "Occupation\u00b2" FROM table_76686 WHERE "Age\u00b9" > '24' AND "Alias" = 'black'
### Instruction: CREATE TABLE table_203_56 ( id number, "star" text, "start\nyear" number, "end\nyear" number, "maximum\nyear" number, "maximum\nmagnitude" number, "distance at\nmaximum (ly)" number, "current\ndistance" number, "current\nmagnitude" number ) -- Using valid SQLite, a...
SELECT COUNT("star") FROM table_203_56 WHERE "distance at\nmaximum (ly)" >= 30
### Instruction: CREATE TABLE table_55607 ( "Season" real, "Series" text, "Team Name" text, "Races" real, "Wins" real, "Poles" real, "F/Laps" real, "Podiums" real, "Points" text, "Final Placing" text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT AVG("Wins") FROM table_55607 WHERE "Poles" > '0' AND "Podiums" < '3'
### Instruction: CREATE TABLE table_12581 ( "Version" text, "Fairing" text, "CCBs" real, "SRBs" text, "Upper stage" text, "Payload to LEO" text, "Payload to GTO" text, "Launches to date" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Wha...
SELECT COUNT("Launches to date") FROM table_12581 WHERE "Version" = '541' AND "CCBs" < '1'
### Instruction: CREATE TABLE table_66437 ( "Class" text, "Wheel arrangement" text, "Fleet number(s)" text, "Manufacturer" text, "Serial numbers" text, "Year made" text, "Quantity made" text, "Quantity preserved" text, "Year(s) retired" text ) -- Using valid SQLite, answer the foll...
SELECT "Year(s) retired" FROM table_66437 WHERE "Serial numbers" = '27317–27336'
### Instruction: CREATE TABLE table_24016 ( "Player" text, "Played" real, "Legs Won" real, "Legs Lost" real, "LWAT" real, "100+" real, "140+" real, "180s" real, "High Checkout" real, "3-dart Average" text ) -- Using valid SQLite, answer the following questions for the tables pr...
SELECT "3-dart Average" FROM table_24016 WHERE "High Checkout" = '112'
### Instruction: CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE voting_record ( stuid number, registration_date text, election_cycle text, president_vote number, vice_pres...
SELECT COUNT(*) FROM voting_record
### Instruction: CREATE TABLE table_203_41 ( id number, "name" text, "variant name(s)" text, "source" text, "source coordinates" text, "length" text, "mouth" text, "mouth coordinates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what i...
SELECT (SELECT "length" FROM table_203_41 WHERE "name" = 'english canyon') - (SELECT "length" FROM table_203_41 WHERE "name" = 'munger creek')
### Instruction: CREATE TABLE table_41306 ( "Team" text, "University" text, "Location" text, "Year entered league" real, "2013\u201314 division" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which university was in the Western division in 2013-14, ...
SELECT "University" FROM table_41306 WHERE "2013\u201314 division" = 'western' AND "Location" = 'bath' AND "Team" = 'bath spa bulldogs'
### Instruction: CREATE TABLE table_1806 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Prod. code" text, "Viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the tables prov...
SELECT "Prod. code" FROM table_1806 WHERE "Title" = 'He Ain''t a Hottie, He''s My Brother'
### Instruction: CREATE TABLE table_21221 ( "Province" 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." real ) -- Using valid SQLite, answer the following questions for the tab...
SELECT COUNT("Ends Won") FROM table_21221 WHERE "PA" = '39'
### Instruction: CREATE TABLE table_22970 ( "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 "No. in season" FROM table_22970 WHERE "Original air date" = 'October 14, 2008'
### Instruction: CREATE TABLE table_203_252 ( id number, "draw" number, "country" text, "language" text, "artist" text, "song" text, "english translation" text, "place" number, "points" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -...
SELECT "artist" FROM table_203_252 WHERE "points" < (SELECT "points" FROM table_203_252 WHERE "artist" = 'nunzio gallo') ORDER BY "points" DESC LIMIT 1
### Instruction: CREATE TABLE artist ( artist_id number, artist text, age number, famous_title text, famous_release_date text ) CREATE TABLE volume ( volume_id number, volume_issue text, issue_date text, weeks_on_top number, song text, artist_id number ) CREATE TABLE music_...
SELECT age FROM artist
### Instruction: CREATE TABLE table_20125 ( "Time" text, "12:00 PM" text, "01:00 PM" text, "02:00 PM" text, "03:00 PM" text, "04:00 PM" text, "05:00 PM" text, "05:55 PM" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of ...
SELECT "05:55 PM" FROM table_20125 WHERE "Time" = 'Friday'
### Instruction: CREATE TABLE table_26436 ( "No. by series" real, "No. by season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production number" real, "U.S. viewers (in millions)" text ) -- Using valid SQLite, answer the following questions for...
SELECT "Title" FROM table_26436 WHERE "Directed by" = 'Bryan Spicer' AND "Written by" = 'Terence Paul Winter'
### Instruction: CREATE TABLE table_15948 ( "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 MIN("Starts") FROM table_15948 WHERE "Team(s)" = 'Hendrick Motorsports'
### Instruction: CREATE TABLE table_204_13 ( id number, "finished" text, "post" number, "horse" text, "jockey" text, "trainer" text, "owner" text, "time / behind" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- name a horse that placed af...
SELECT "horse" FROM table_204_13 WHERE "finished" > (SELECT "finished" FROM table_204_13 WHERE "horse" = 'hello') AND "owner" > 1 ORDER BY "finished" LIMIT 1
### Instruction: CREATE TABLE table_54223 ( "Stage" text, "Winner" text, "General classification" text, "Points classification" text, "Trofeo Fast Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which points classification shares a general clas...
SELECT "Points classification" FROM table_54223 WHERE "General classification" = 'bernard hinault' AND "Trofeo Fast Team" = 'bianchi' AND "Winner" = 'urs freuler' AND "Stage" = '4'
### Instruction: CREATE TABLE table_dev_16 ( "id" int, "white_blood_cell_count_wbc" int, "autoimmune_disease" bool, "creatinine_clearance_cl" float, "platelet_count" float, "collagen_vascular_disease" bool, "hypertension" bool, "systemic_corticosteroids" bool, "NOUSE" float ) -- Us...
SELECT * FROM table_dev_16 WHERE white_blood_cell_count_wbc < 3
### Instruction: CREATE TABLE table_43184 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the greatest number of...
SELECT MAX("Points") FROM table_43184 WHERE "Lost" > '5' AND "Difference" = '- 10' AND "Played" > '12'
### Instruction: CREATE TABLE table_17800 ( "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 "Drawn" FROM table_17800 WHERE "Tries against" = '30'
### Instruction: CREATE TABLE table_204_465 ( id number, "#" number, "temple name" text, "hangul" text, "hanja" text, "period of reign" text, "personal name" text, "relationship" text, "note" text ) -- Using valid SQLite, answer the following questions for the tables provided above...
SELECT "temple name" FROM table_204_465 WHERE "temple name" IN ('geunchogo', 'chaekgye') ORDER BY "period of reign" - "period of reign" DESC LIMIT 1
### Instruction: CREATE TABLE table_30228 ( "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 "U.S. viewers (millions)" FROM table_30228 WHERE "Production code" = '6AKY07'
### Instruction: CREATE TABLE table_7934 ( "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 a...
SELECT "Location Attendance" FROM table_7934 WHERE "High assists" = 'raymond felton (5)' AND "Record" = '35–44'
### Instruction: CREATE TABLE table_39438 ( "Rank" real, "Name" text, "Nationality" text, "1st (m)" real, "2nd (m)" real, "Points" real, "Overall NT points" text, "Overall WC points (Rank)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- ...
SELECT "Name" FROM table_39438 WHERE "Points" > '247.1' AND "1st (m)" < '125'
### Instruction: CREATE TABLE table_72847 ( "Poll Year" text, "Winner" text, "Second" text, "Third" text, "Fourth" text, "Fifth" text, "Sixth" text, "Seventh" text, "Eighth" text, "Ninth" text, "Tenth" text ) -- Using valid SQLite, answer the following questions for the tab...
SELECT "Winner" FROM table_72847 WHERE "Fifth" = 'Dizzee Rascal'
### Instruction: CREATE TABLE table_52221 ( "County" text, "1900" real, "1930" real, "1950" real, "2000" real, "2006 est." real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 1930 population when the 2006 est. is less than 44,726 in the c...
SELECT SUM("1930") FROM table_52221 WHERE "2006 est." < '44,726' AND "County" = 'frio'
### Instruction: CREATE TABLE table_train_239 ( "id" int, "basal_c_peptide" float, "body_weight" float, "renal_disease" bool, "creatinine_clearance_cl" float, "serum_creatinine" float, "stimulated" bool, "body_mass_index_bmi" float, "NOUSE" float ) -- Using valid SQLite, answer the...
SELECT * FROM table_train_239 WHERE creatinine_clearance_cl < 40
### Instruction: CREATE TABLE table_20463 ( "Rank by average" real, "Place" text, "Couple" text, "Perfect 40s" real, "Total" real, "Number of dances" real, "Season" real, "Average" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are ...
SELECT "Place" FROM table_20463 WHERE "Perfect 40s" = '0' AND "Average" = '27.25'
### Instruction: CREATE TABLE event ( Event_ID int, Date text, Venue text, Name text, Event_Attendance int ) CREATE TABLE news_report ( journalist_ID int, Event_ID int, Work_Type text ) CREATE TABLE journalist ( journalist_ID int, Name text, Nationality text, Age text, ...
SELECT Nationality, AVG(Age) FROM journalist GROUP BY Nationality ORDER BY AVG(Age)
### Instruction: CREATE TABLE table_28353 ( "\u00d7" text, "Wehdat" text, "Faisaly" text, "Ramtha" text, "Ahli" text, "Hussein" text, "Jazeera" text, "Amman" text, "Qadisiya" text, "Jeel" text, "Baqaa" text ) -- Using valid SQLite, answer the following questions for the tab...
SELECT "Ahli" FROM table_28353 WHERE "Ramtha" = '1-0'
### Instruction: CREATE TABLE people ( People_ID int, Name text, Country text, Is_Male text, Age int ) CREATE TABLE wedding ( Church_ID int, Male_ID int, Female_ID int, Year int ) CREATE TABLE church ( Church_ID int, Name text, Organized_by text, Open_Date int, ...
SELECT Open_Date, COUNT(Open_Date) FROM church
### Instruction: CREATE TABLE table_31399 ( "Rank" real, "Country/Territory" text, "Miss International" real, "1st Runner-up" real, "2nd Runner-up" real, "3rd Runner-up" real, "4th Runner-up" real, "Semifinalists" real, "Total" real ) -- Using valid SQLite, answer the following que...
SELECT MIN("Miss International") FROM table_31399 WHERE "Rank" = '1'
### Instruction: CREATE TABLE table_22021 ( "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 "Played" FROM table_22021 WHERE "Tries for" = '56'
### Instruction: CREATE TABLE torrents ( groupname text, totalsnatched number, artist text, groupyear number, releasetype text, groupid number, id number ) CREATE TABLE tags ( index number, id number, tag text ) -- Using valid SQLite, answer the following questions for the tab...
SELECT T1.tag FROM torrents AS T2 JOIN tags AS T1 ON T1.id = T2.id WHERE T2.groupyear >= 2010 GROUP BY T1.tag ORDER BY T2.totalsnatched DESC LIMIT 10
### Instruction: CREATE TABLE table_37113 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much Lost has a Drawn larg...
SELECT COUNT("Lost") FROM table_37113 WHERE "Drawn" > '1' AND "Points" < '14' AND "Against" > '10'
### Instruction: CREATE TABLE Player ( pID numeric(5,0), pName varchar(20), yCard varchar(3), HS numeric(5,0) ) 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), decisio...
SELECT state, MIN(enr) FROM College GROUP BY state
### 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, enr FROM College ORDER BY enr
### Instruction: CREATE TABLE table_44934 ( "Game" real, "Date" text, "Team" text, "Score" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Score...
SELECT "Score" FROM table_44934 WHERE "Location Attendance" = 'us airways center 18,422' AND "Game" < '22'
### Instruction: CREATE TABLE table_66094 ( "Pinn. Rank" real, "Std. Rank" real, "Name" text, "Pinnacle height ft (m)" text, "Standard height ft (m)" text, "Floors" real, "Year" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much Standar...
SELECT SUM("Std. Rank") FROM table_66094 WHERE "Name" = '311 south wacker drive' AND "Year" > '1990'
### Instruction: CREATE TABLE party ( Party_ID int, Party_Theme text, Location text, First_year text, Last_year text, Number_of_hosts int ) CREATE TABLE host ( Host_ID int, Name text, Nationality text, Age text ) CREATE TABLE party_host ( Party_ID int, Host_ID int, ...
SELECT Nationality, COUNT(*) FROM host GROUP BY Nationality
### Instruction: CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date ) CREATE TABLE Reviewer ( rID int, name text ) CREATE TABLE Movie ( mID int, title text, year int, director text ) -- Using valid SQLite, answer the following questions for the tables provided...
SELECT title, COUNT(title) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5 GROUP BY title
### Instruction: CREATE TABLE table_9538 ( "Tournament" text, "2006" 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. -- What 2001 has a ATP World Tour Masters 1000...
SELECT "2011" FROM table_9538 WHERE "2007" = 'atp world tour masters 1000'
### Instruction: CREATE TABLE table_63614 ( "Rank" real, "Country/Region" text, "Expenditures on R&D (billions of US$ , PPP )" real, "% of GDP PPP" text, "Year" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average expenditures on R&D f...
SELECT AVG("Expenditures on R&D (billions of US$ , PPP )") FROM table_63614 WHERE "Country/Region" = 'croatia' AND "Year" > '2007'
### Instruction: CREATE TABLE table_53931 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest round for Fort Lauderdale, Florid...
SELECT MIN("Round") FROM table_53931 WHERE "Res." = 'win' AND "Location" = 'fort lauderdale, florida, united states' AND "Time" = '3:38'
### Instruction: CREATE TABLE table_38353 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Smaller than 4, and a Silver larger than 0, and a Rank of 3, and a Bronze s...
SELECT SUM("Total") FROM table_38353 WHERE "Gold" < '4' AND "Silver" > '0' AND "Rank" = '3' AND "Bronze" < '6'
### Instruction: CREATE TABLE table_63138 ( "Position" real, "Team" text, "Played" real, "Wins" real, "Draws P.K. Wins / P.K. Losses" text, "Losses" real, "Scored" real, "Conceded" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided a...
SELECT "Team" FROM table_63138 WHERE "Losses" > '5' AND "Position" = '12'
### Instruction: CREATE TABLE table_26209 ( "Outcome" text, "Year" real, "Championship" 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 provided above. -- Which championsh...
SELECT "Championship" FROM table_26209 WHERE "Score in the final" = '6–4, 2–6, 6–4, 7–6(3)'
### Instruction: CREATE TABLE table_79107 ( "Round" text, "Circuit" text, "Date" text, "Winning driver" text, "Winning team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the winning driver of the race on 2 June with a.z.k./roc-comp tition a...
SELECT "Winning driver" FROM table_79107 WHERE "Winning team" = 'a.z.k./roc-compétition a.z.k./roc-compétition' AND "Date" = '2 june'
### Instruction: CREATE TABLE table_50423 ( "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 "Drawn" FROM table_50423 WHERE "Lost" < '12' AND "Goal Difference" = '+20'
### Instruction: CREATE TABLE table_75420 ( "Rank" text, "City" text, "Population" real, "Area (km 2 )" real, "Density (inhabitants/km 2 )" real, "Altitude (mslm)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Altitude (mslm) is the highe...
SELECT MAX("Altitude (mslm)") FROM table_75420 WHERE "City" = 'legnano' AND "Population" > '59492'
### Instruction: CREATE TABLE flight ( flno number, origin text, destination text, distance number, departure_date time, arrival_date time, price number, aid number ) CREATE TABLE aircraft ( aid number, name text, distance number ) CREATE TABLE certificate ( eid number,...
SELECT MIN(distance), AVG(distance), MAX(distance) FROM aircraft
### Instruction: CREATE TABLE table_13443 ( "Debut year" real, "Player" text, "Games" real, "Goals" real, "Years at club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Player has Goals larger than 10, and a Debut year smaller than 1993, and Y...
SELECT "Player" FROM table_13443 WHERE "Goals" > '10' AND "Debut year" < '1993' AND "Years at club" = '1990–1993'
### Instruction: CREATE TABLE track ( Track_ID int, Name text, Location text, Seating real, Year_Opened real ) CREATE TABLE race ( Race_ID int, Name text, Class text, Date text, Track_ID text ) -- Using valid SQLite, answer the following questions for the tables provided above...
SELECT T2.Name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.Track_ID = T2.Track_ID GROUP BY T1.Track_ID ORDER BY T2.Name
### Instruction: CREATE TABLE market ( Market_ID int, Country text, Number_cities int ) CREATE TABLE film_market_estimation ( Estimation_ID int, Low_Estimate real, High_Estimate real, Film_ID int, Type text, Market_ID int, Year int ) CREATE TABLE film ( Film_ID int, Tit...
SELECT Studio, COUNT(*) FROM film GROUP BY Studio
### Instruction: CREATE TABLE table_9826 ( "Model number" text, "sSpec number" text, "Frequency" text, "GPU frequency" text, "L2 cache" text, "I/O bus" text, "Memory" text, "Voltage" text, "Socket" text, "Release date" text, "Part number(s)" text ) -- Using valid SQLite, an...
SELECT "GPU frequency" FROM table_9826 WHERE "Model number" = 'atom n435'
### 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 Party DESC
### Instruction: CREATE TABLE management ( department_ID int, head_ID int, temporary_acting text ) CREATE TABLE department ( Department_ID int, Name text, Creation text, Ranking int, Budget_in_Billions real, Num_Employees real ) CREATE TABLE head ( head_ID int, name text, ...
SELECT Creation, AVG(Budget_in_Billions) FROM department
### Instruction: CREATE TABLE table_25114 ( "#" real, "Name" text, "Name (English)" text, "Population 2008-07-01" real, "Area (km\u00b2)" real, "Pop./ km\u00b2" text, "ISO 3166-2" text, "Administrative centre" text ) -- Using valid SQLite, answer the following questions for the tables ...
SELECT "Pop./ km\u00b2" FROM table_25114 WHERE "#" = '4'
### Instruction: CREATE TABLE table_24630 ( "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 "Year" FROM table_24630 WHERE "Team(s)" = 'Donlavey Racing Bill Davis Racing'
### 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, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120
### Instruction: CREATE TABLE table_18118221_1 ( annual_interchanges__millions__2011_12 VARCHAR, annual_entry_exit__millions__2011_12 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many annual interchanges in the millions occurred in 2011-12 when the num...
SELECT annual_interchanges__millions__2011_12 FROM table_18118221_1 WHERE annual_entry_exit__millions__2011_12 = "36.609"
### Instruction: CREATE TABLE table_75412 ( "Almal\u0131 (Qax)" text, "F\u0131st\u0131ql\u0131" text, "Malax" text, "Qaxmu\u011fal" text, "S\u00fcsk\u0259n" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Qaxmu al village with a Malax vil...
SELECT "Qaxmu\u011fal" FROM table_75412 WHERE "Malax" = 'meşəbaş'
### Instruction: CREATE TABLE table_30899 ( "Episode" real, "First Air Date" text, "Rating (18\u201349)" text, "Share (18\u201349)" real, "Viewers (millions)" text, "Rank (timeslot)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When 13 is the ...
SELECT "Rank (timeslot)" FROM table_30899 WHERE "Share (18\u201349)" = '13'
### Instruction: CREATE TABLE ship ( name VARCHAR, ship_id VARCHAR ) CREATE TABLE captain ( ship_id VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the name of the ships that are steered by both a captain with Midshipman rank and a...
SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Midshipman' INTERSECT SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Lieutenant'
### 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 Name, Weight FROM people ORDER BY Weight
### Instruction: CREATE TABLE table_64680 ( "Outcome" text, "Year" text, "Tournament" text, "Surface" text, "Opponent in the final" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year had a score of 6 7(5), 2 6 and opponent of...
SELECT "Year" FROM table_64680 WHERE "Opponent in the final" = 'brenda schultz-mccarthy' AND "Score" = '6–7(5), 2–6'
### Instruction: CREATE TABLE table_69513 ( "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 "Points for" FROM table_69513 WHERE "Drawn" = '2' AND "Losing bonus" = '5'
### Instruction: CREATE TABLE table_name_16 ( intergiro_classification VARCHAR, mountains_classification VARCHAR, points_classification VARCHAR, trofeo_super_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Intergiro classification whe...
SELECT intergiro_classification FROM table_name_16 WHERE points_classification = "paolo bettini" AND trofeo_super_team = "davitamon-lotto" AND mountains_classification = "josé rujano"
### Instruction: CREATE TABLE table_name_15 ( self_employed VARCHAR, investment_income VARCHAR, other_income_sources VARCHAR, employment___salaries_ VARCHAR, _wages_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Investment income of 2%, and an o...
SELECT self_employed FROM table_name_15 WHERE investment_income = "2%" AND other_income_sources = "3%" AND employment___salaries_ & _wages_ = "71%"
### Instruction: CREATE TABLE table_56400 ( "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. -- When the venue was kardinia par...
SELECT "Away team score" FROM table_56400 WHERE "Crowd" > '16,437' AND "Venue" = 'kardinia park'
### Instruction: CREATE TABLE climber ( Climber_ID int, Name text, Country text, Time text, Points real, Mountain_ID int ) CREATE TABLE mountain ( Mountain_ID int, Name text, Height real, Prominence real, Range text, Country text ) -- Using valid SQLite, answer the fol...
SELECT Country, COUNT(Country) FROM mountain WHERE Height > 5000 GROUP BY Country ORDER BY COUNT(Country)
### Instruction: CREATE TABLE table_203_11 ( id number, "title" text, "year" number, "peak chart positions\nus" number, "peak chart positions\nus r&b" number, "peak chart positions\nus rap" number, "peak chart positions\nuk" number, "certifications" text, "album" text ) -- Using va...
SELECT COUNT("title") FROM table_203_11 WHERE "year" = 1997
### Instruction: CREATE TABLE table_26312 ( "Year" real, "Winner (number of titles)" text, "Runners-up" text, "Top Team in Regular Season (points)" text, "Top Scorer (points)" text, "Winning Coach" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- ...
SELECT "Winner (number of titles)" FROM table_26312 WHERE "Top Team in Regular Season (points)" = 'New York Cosmos (200 points)'
### Instruction: CREATE TABLE table_41489 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of Against whe...
SELECT SUM("Against") FROM table_41489 WHERE "Drawn" < '2' AND "Position" > '8' AND "Lost" > '6'
### Instruction: CREATE TABLE table_43072 ( "Year" real, "Drivers" text, "Races" real, "Wins" real, "Poles" real, "F.L." real, "Points" real, "D.C." text, "T.C." text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Races has a T.C. o...
SELECT MIN("Races") FROM table_43072 WHERE "T.C." = '3rd' AND "D.C." = '7th'
### Instruction: CREATE TABLE table_78832 ( "Country" text, "Career" text, "Victories" real, "Super G" text, "Giant Slalom" text, "Slalom" text, "Combined" text, "Parallel" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Career has a...
SELECT "Career" FROM table_78832 WHERE "Parallel" = '–' AND "Combined" = '–' AND "Giant Slalom" = '5'
### Instruction: CREATE TABLE employee ( eid number, name text, salary number ) CREATE TABLE flight ( flno number, origin text, destination text, distance number, departure_date time, arrival_date time, price number, aid number ) CREATE TABLE aircraft ( aid number, ...
SELECT origin, destination FROM flight WHERE price > 300
### Instruction: CREATE TABLE table_train_264 ( "id" int, "stroke" bool, "hematocrit_hct" float, "serum_psa" float, "coronary_artery_disease_cad" bool, "international_prostate_symptom_score_ipss" int, "hypertension" bool, "NOUSE" float ) -- Using valid SQLite, answer the following ques...
SELECT * FROM table_train_264 WHERE stroke = 1 OR coronary_artery_disease_cad = 1
### Instruction: CREATE TABLE table_49383 ( "County" text, "Total" real, "Gore#" real, "Gore%" text, "Bush#" real, "Bush%" text, "Others#" real, "Others%" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest number of Bush ...
SELECT MAX("Bush#") FROM table_49383 WHERE "Bush%" = '32.40%' AND "Total" < '5,126'
### Instruction: CREATE TABLE table_34795 ( "Date" text, "Result" text, "Score" text, "Brazil scorers" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Brazil scorers have a Result of w, and a Competition of world cup qualify...
SELECT "Brazil scorers" FROM table_34795 WHERE "Result" = 'w' AND "Competition" = 'world cup qualifying' AND "Date" = 'february 28, 1954'
### Instruction: CREATE TABLE table_name_94 ( area_2006_km² INTEGER, area_1996_km² VARCHAR, pop_2006 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which area 2006 km has an area 1996 km of 26.39, and a pop 2006 smaller than 18,610? ### Response:
SELECT MIN(area_2006_km²) FROM table_name_94 WHERE area_1996_km² = 26.39 AND pop_2006 < 18 OFFSET 610
### Instruction: CREATE TABLE table_204_496 ( id number, "pos" number, "no" number, "driver" text, "team" text, "laps" number, "time/retired" text, "grid" number, "points" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- at the 2006 ...
SELECT "driver" FROM table_204_496 WHERE "driver" IN ('oriol servia', 'katherine legge') ORDER BY "laps" DESC LIMIT 1
### Instruction: CREATE TABLE table_204_678 ( id number, "record" text, "athlete" text, "nation" text, "venue" text, "date" text, "#" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the difference between the number of times the rec...
SELECT ABS((SELECT COUNT(*) FROM table_204_678 WHERE "nation" = 'czech republic') - (SELECT COUNT(*) FROM table_204_678 WHERE "nation" = 'china'))
### Instruction: CREATE TABLE table_54786 ( "Type" text, "Sign" real, "Exponent" real, "Significand" real, "Total bits" real, "Exponent bias" real, "Bits precision" real, "Number of decimal digits" text ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT COUNT("Significand") FROM table_54786 WHERE "Number of decimal digits" = '~34.0' AND "Total bits" > '128'
### Instruction: CREATE TABLE table_10809 ( "Outcome" text, "Date" text, "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 provided above. -- Which tournament h...
SELECT "Tournament" FROM table_10809 WHERE "Score in the final" = '6–7, 2–6' AND "Partner" = 'wayne arthurs'
### Instruction: CREATE TABLE Certificate ( eid VARCHAR, aid VARCHAR ) CREATE TABLE Aircraft ( aid VARCHAR, name VARCHAR ) CREATE TABLE Employee ( name VARCHAR, eid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show names for all employees...
SELECT name FROM Employee EXCEPT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = "Boeing 737-800"
### Instruction: CREATE TABLE table_204_314 ( id number, "pos" number, "team" text, "played" number, "won" number, "draw" number, "lost" number, "goals for" number, "goals against" number, "goal difference" number, "points" number, "notes" text ) -- Using valid SQLite, ...
SELECT "team" FROM table_204_314 ORDER BY "won" / "lost" DESC LIMIT 1
### Instruction: CREATE TABLE table_48568 ( "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 to par of the player with more than $4,100 and a score...
SELECT "To par" FROM table_48568 WHERE "Money ( $ )" > '4,100' AND "Score" = '69-67-72-70=278'