instruction
stringlengths
212
6.3k
output
stringlengths
6
2.03k
### 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 T2.Name, COUNT(*) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY COUNT(*)
### 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 T2.Name, COUNT(T2.Name) FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID GROUP BY T2.Name ORDER BY T2.Name
### Instruction: CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adults INTEGER, Kids INTEGER ) CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy I...
SELECT decor, MIN(basePrice) FROM Rooms GROUP BY decor
### Instruction: CREATE TABLE table_44270 ( "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 SUM("Played") FROM table_44270 WHERE "Goals For" > '60' AND "Lost" = '8' AND "Position" < '1'
### 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 Sex, COUNT(Sex) FROM people GROUP BY Sex ORDER BY COUNT(Sex)
### Instruction: CREATE TABLE table_31440 ( "model" text, "Sonnet" text, "Apple" text, "NUpowr 117" text, "NUpowr 167" text, "NUpowr 183" text, "NUpowr G3" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When 0,4, or 8 mb is the nupowr 117 wh...
SELECT "NUpowr 183" FROM table_31440 WHERE "NUpowr 117" = '0,4, or 8 MB'
### Instruction: CREATE TABLE table_55865 ( "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 "Deleted" FROM table_55865 WHERE "Listed" = '09/21/1984' AND "Name" = 'stauffer chemical company (lemoyne plant)'
### 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 Sex, SUM(Weight) FROM people GROUP BY Sex ORDER BY SUM(Weight) DESC
### Instruction: CREATE TABLE table_203_592 ( id number, "institution" text, "location" text, "athletic nickname" text, "undergraduate enrollment" number, "graduate enrollment" number, "total enrollment" number, "2013 endowment\n(and us rank)" text, "academic staff" number, "mott...
SELECT COUNT("institution") FROM table_203_592 WHERE "academic staff" > 1000
### 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 Sex, AVG(Weight) FROM people GROUP BY Sex ORDER BY Sex DESC
### 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 Manufacturer, Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder
### 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, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Name
### Instruction: CREATE TABLE table_16909 ( "Model number" text, "sSpec number" text, "Frequency" text, "L2 cache" text, "FSB" text, "Mult." text, "Voltage" text, "TDP" text, "Socket" text, "Release date" text, "Part number(s)" text, "Release price ( USD )" text ) -- Us...
SELECT "Socket" FROM table_16909 WHERE "Model number" = 'Pentium Dual-Core T2410'
### Instruction: CREATE TABLE table_4300 ( "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_4300 WHERE "GDP at constant prices (THB trillions)" = '3.072'
### Instruction: CREATE TABLE table_9608 ( "Missouri vs." text, "Overall Record" text, "at Columbia" text, "at Opponent's Venue" text, "at Neutral Site" text, "Last 5 Meetings" text, "Last 10 Meetings" text, "Current Streak" text, "During Time in Big 12" text ) -- Using valid SQLit...
SELECT "Current Streak" FROM table_9608 WHERE "Last 10 Meetings" = 'ku, 8-2'
### Instruction: CREATE TABLE table_17118 ( "Year" real, "B\u00f6tzow" text, "Schwante" text, "Vehlefanz" text, "Neu-Vehlefanz" real, "Marwitz" text, "B\u00e4renklau" text, "Eichst\u00e4dt" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- ...
SELECT "Vehlefanz" FROM table_17118 WHERE "B\u00e4renklau" = '1.288'
### Instruction: CREATE TABLE market ( Market_ID int, District text, Num_of_employees int, Num_of_shops real, Ranking int ) CREATE TABLE phone ( Name text, Phone_ID int, Memory_in_G int, Carrier text, Price real ) CREATE TABLE phone_market ( Market_ID int, Phone_ID text...
SELECT Carrier, COUNT(Carrier) FROM phone GROUP BY Carrier ORDER BY COUNT(Carrier) DESC
### Instruction: CREATE TABLE table_55604 ( "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 "Final Placing" FROM table_55604 WHERE "Poles" = '0' AND "Races" > '16' AND "Podiums" = '16'
### Instruction: CREATE TABLE table_203_187 ( id number, "conference" text, "bids" number, "record" text, "win %" number, "quarterfinals" number, "semifinals" number, "final" number, "champions" number ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT "conference" FROM table_203_187 WHERE "conference" <> 'colonial athletic association' AND "bids" = (SELECT "bids" FROM table_203_187 WHERE "conference" = 'colonial athletic association')
### Instruction: CREATE TABLE table_50971 ( "University" text, "Location" text, "Established" real, "Endowment as of 2008" text, "Campus Area (acres)" real, "Kiplinger's Top 100 Values" text, "Enrollment as of 2008" real ) -- Using valid SQLite, answer the following questions for the table...
SELECT "Kiplinger's Top 100 Values" FROM table_50971 WHERE "Established" = '1851'
### Instruction: CREATE TABLE table_20620 ( "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 "Last 5 Meetings" FROM table_20620 WHERE "Overall Record" = 'UM, 2-1'
### Instruction: CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adults INTEGER, Kids INTEGER ) CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy I...
SELECT decor, AVG(basePrice) FROM Rooms GROUP BY decor
### Instruction: CREATE TABLE table_32671 ( "Rank" text, "County" text, "% (1960)" real, "% (2000)" real, "% (2040)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the % (1960) of Troms, which has a % (2040) smaller than 100 and a % (2000) s...
SELECT SUM("% (1960)") FROM table_32671 WHERE "% (2040)" < '100' AND "% (2000)" < '4.7' AND "County" = 'troms'
### Instruction: CREATE TABLE table_56573 ( "Particle" text, "Symbol" text, "Makeup" text, "Rest mass MeV / c 2" text, "Isospin I" text, "Spin ( Parity ) J P" text, "Commonly decays to" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Pa...
SELECT "Particle" FROM table_56573 WHERE "Isospin I" = '1' AND "Commonly decays to" = 'p + + π 0 or n 0 + π +'
### 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 Sex, AVG(Weight) FROM people GROUP BY Sex ORDER BY AVG(Weight) DESC
### Instruction: CREATE TABLE music_festival ( id number, music_festival text, date_of_ceremony text, category text, volume number, result text ) CREATE TABLE volume ( volume_id number, volume_issue text, issue_date text, weeks_on_top number, song text, artist_id number ...
SELECT famous_title FROM artist WHERE artist = "Triumfall"
### Instruction: CREATE TABLE table_26929 ( "Player" text, "Played" real, "Sets Won" real, "Sets Lost" 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, answe...
SELECT COUNT("3-dart Average") FROM table_26929 WHERE "Player" = 'Gary Anderson'
### Instruction: CREATE TABLE table_42457 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Oilers points" real, "Opponents" real, "Oilers first downs" real, "Record" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT MAX("Oilers points") FROM table_42457 WHERE "Opponent" = 'san francisco 49ers' AND "Opponents" > '19'
### Instruction: CREATE TABLE table_625 ( "Tag ID" text, "Application" text, "Torque Rating" real, "1st" text, "2nd" text, "3rd" text, "4th" text, "5th" text, "6th" text, "Rev" text, "Input Splines" real, "Output Splines" real ) -- Using valid SQLite, answer the followi...
SELECT "Rev" FROM table_625 WHERE "Application" = '2003-2004 Mustang Cobra'
### Instruction: CREATE TABLE table_47311 ( "Year" text, "Indians admitted" real, "Pakistanis admitted" real, "Sri Lankans admitted" real, "Bangladeshis admitted" real, "Nepalis admitted" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What were ...
SELECT MIN("Sri Lankans admitted") FROM table_47311 WHERE "Bangladeshis admitted" > '4,270' AND "Pakistanis admitted" > '4,986'
### 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 Price, Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder
### Instruction: CREATE TABLE table_40451 ( "Constituency" text, "Michael D. Higgins" text, "Se\u00e1n Gallagher" text, "Martin McGuinness" text, "Gay Mitchell" text, "David Norris" text, "Dana Rosemary Scallon" text, "Mary Davis" text ) -- Using valid SQLite, answer the following ques...
SELECT "Martin McGuinness" FROM table_40451 WHERE "Se\u00e1n Gallagher" = '29.6%'
### Instruction: CREATE TABLE table_203_688 ( id number, "category" text, "speed\n(km/h)" number, "speed\n(mph)" number, "vehicle" text, "pilot" text, "date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the next fastest after the r...
SELECT "category" FROM table_203_688 WHERE "speed\n(km/h)" < (SELECT "speed\n(km/h)" FROM table_203_688 WHERE "category" = 'rocket-powered aircraft') ORDER BY "speed\n(km/h)" DESC LIMIT 1
### Instruction: CREATE TABLE table_65711 ( "Team" text, "Matches" real, "Wins" real, "Wins %" text, "Draws" real, "Draws %" text, "Loses" real, "Loses %" text, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Draws % h...
SELECT "Draws %" FROM table_65711 WHERE "Wins" > '1' AND "Loses %" = '0%' AND "Team" = 'al-zawraa'
### Instruction: CREATE TABLE table_204_624 ( id number, "school" text, "team name" text, "town" text, "county" text, "enrollment (2010-11 & 2011-12)" number, "primary mshsaa class*" number, "football class" number ) -- Using valid SQLite, answer the following questions for the tables ...
SELECT "school" FROM table_204_624 WHERE "football class" = 3 AND "enrollment (2010-11 & 2011-12)" = 638
### Instruction: CREATE TABLE phone_market ( Market_ID int, Phone_ID text, Num_of_stock int ) CREATE TABLE market ( Market_ID int, District text, Num_of_employees int, Num_of_shops real, Ranking int ) CREATE TABLE phone ( Name text, Phone_ID int, Memory_in_G int, Carrie...
SELECT Carrier, SUM(Memory_in_G) FROM phone GROUP BY Carrier ORDER BY Carrier
### Instruction: CREATE TABLE table_name_14 ( seats_2005 INTEGER, in_de_creased_by VARCHAR, percentage_in_de_crease VARCHAR, governorate VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Seats 2005 has a Percentage in/de-crease of 50.0%, and a ...
SELECT SUM(seats_2005) FROM table_name_14 WHERE percentage_in_de_crease = "50.0%" AND governorate = "dhi qar governorate" AND in_de_creased_by > 6
### Instruction: CREATE TABLE table_27318 ( "Region" text, "Enrolled men" real, "Enrolled women" real, "Enrolled total" real, "Men of voting age" real, "Women of voting age" real, "Voting age population" real, "E/VAP ratio Men" text, "E/VAP ratio Women" text, "E/VAP ratio Total" ...
SELECT "Enrolled women" FROM table_27318 WHERE "E/VAP ratio Women" = '108.6%'
### 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, MIN(enr) FROM College GROUP BY state ORDER BY cName
### Instruction: CREATE TABLE rating ( rid number, mid number, stars number, ratingdate time ) CREATE TABLE movie ( mid number, title text, year number, director text ) CREATE TABLE reviewer ( rid number, name text ) -- Using valid SQLite, answer the following questions for t...
SELECT T1.title, T1.director FROM movie AS T1 JOIN movie AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title ORDER BY T1.director, T1.title
### Instruction: CREATE TABLE table_203_83 ( id number, "ranking" number, "company" text, "industry" text, "revenue (usd billions)" text, "fy" text, "capitalization (usd billions)" text, "employees" number, "listing" text, "headquarters" text, "ceo" text ) -- Using valid SQ...
SELECT COUNT("company") FROM table_203_83 WHERE "industry" = 'oil and gas' AND "ranking" <= 10
### Instruction: CREATE TABLE table_28016 ( "Class" text, "Firebox" text, "Cylinder size" text, "Valves" text, "Valve gear" text, "Number built" text, "Years built" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many engines were built w...
SELECT "Number built" FROM table_28016 WHERE "Cylinder size" = '20 ½” x 26”' AND "Firebox" = 'Belpaire' AND "Valve gear" = 'Stephenson'
### Instruction: 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 real, Ranking int ) CREATE TABLE phone_market ( Market_ID int, Phone_ID text...
SELECT Carrier, AVG(Memory_in_G) FROM phone GROUP BY Carrier ORDER BY Carrier DESC
### Instruction: CREATE TABLE table_21150 ( "Religion" text, "Suriname" text, "Paramaribo" text, "Wanica" text, "Nickerie" text, "Coronie" text, "Saramacca" text, "Commewijne" text, "Marowijne" text, "Para" text, "Brokopondo" text, "Sipaliwini" text ) -- Using valid SQL...
SELECT "Para" FROM table_21150 WHERE "Commewijne" = '1.5%'
### Instruction: CREATE TABLE table_28224 ( "Region" text, "Land area (km 2 )" text, "Rainfall by depth (mm/year)" real, "Rainfall by volume (km 3 /year)" text, "Surface run off (km 3 /year)" text, "Infiltration (km 3 /year)" text, "Evapotranspiration (km 3 /year)" text ) -- Using valid SQ...
SELECT "Infiltration (km 3 /year)" FROM table_28224 WHERE "Region" = 'Central'
### Instruction: CREATE TABLE cinema ( cinema_id number, name text, openning_year number, capacity number, location text ) CREATE TABLE schedule ( cinema_id number, film_id number, date text, show_times_per_day number, price number ) CREATE TABLE film ( film_id number, ...
SELECT COUNT(*) FROM film WHERE title LIKE "%Dummy%"
### 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 "race distance\nlaps" FROM table_204_604 WHERE "date" = 'february 26'
### Instruction: CREATE TABLE table_72126 ( "Nation" text, "Population (thousands)" real, "Internet subscriptions (2000) (thousands of users)" real, "Internet subscriptions (2008) (thousands of users)" real, "% growth (2000\u20132008)" real, "% Internet users" real ) -- Using valid SQLite, ans...
SELECT MAX("% growth (2000\u20132008)") FROM table_72126 WHERE "Nation" = 'Burundi'
### Instruction: CREATE TABLE table_41983 ( "Date" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Set 4" text, "Set 5" text, "Total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total of the 3-0 score with a...
SELECT "Total" FROM table_41983 WHERE "Score" = '3-0' AND "Set 3" = '25-18' AND "Set 2" = '25-12'
### Instruction: CREATE TABLE table_73636 ( "Episode number Production number" text, "Title" text, "Original airdate" text, "Rating/Share in Households" text, "18\u201349 Rating Live+SD / Live+7" text, "Share" text, "Live+SD Total viewers" text, "Live+7 Day DVR Total viewers" text ) --...
SELECT "Original airdate" FROM table_73636 WHERE "Episode number Production number" = '4 1-04'
### 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, COUNT(Sex) FROM people GROUP BY Sex ORDER BY Sex DESC
### Instruction: CREATE TABLE table_30752 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT COUNT("Game") FROM table_30752 WHERE "High assists" = 'Earl Watson (11)' AND "Location Attendance" = 'KeyArena 16,841'
### 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 T2.Name, COUNT(*) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name
### Instruction: CREATE TABLE Acceptance ( Submission_ID int, Workshop_ID int, Result text ) CREATE TABLE submission ( Submission_ID int, Scores real, Author text, College text ) CREATE TABLE workshop ( Workshop_ID int, Date text, Venue text, Name 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
### Instruction: CREATE TABLE table_76195 ( "Team" text, "Sets+" real, "Sets\u2013" real, "Points+" real, "Points\u2013" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Points+ number when the Points- number is larger than 1385, a...
SELECT MAX("Points+") FROM table_76195 WHERE "Points\u2013" > '1385' AND "Sets+" < '37' AND "Sets\u2013" > '41'
### Instruction: CREATE TABLE table_46997 ( "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" FROM table_46997 WHERE "Played" = '20' AND "Club" = 'caldicot rfc'
### Instruction: CREATE TABLE table_42673 ( "Benchmark" text, "Crown height" text, "Pavilion depth" text, "Table diameter" text, "Girdle thickness" text, "Crown angle" text, "Pavilion angle" text, "Brilliance Grade" text ) -- Using valid SQLite, answer the following questions for the t...
SELECT "Pavilion depth" FROM table_42673 WHERE "Brilliance Grade" = '100%' AND "Pavilion angle" = 'n/a'
### Instruction: CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, basePrice INTEGER, decor TEXT ) CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstNa...
SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType
### 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 Home_city, AVG(Age) FROM driver GROUP BY Home_city ORDER BY AVG(Age)
### Instruction: CREATE TABLE exhibition ( theme VARCHAR, exhibition_id VARCHAR ) CREATE TABLE exhibition_record ( exhibition_id VARCHAR, attendance INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show the theme for exhibitions with both records of a...
SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance < 100 INTERSECT SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 500
### Instruction: CREATE TABLE train_station ( Train_ID int, Station_ID int ) 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 trai...
SELECT Location, SUM(Number_of_Platforms) FROM station GROUP BY Location ORDER BY Location DESC
### Instruction: CREATE TABLE table_71449 ( "Tournament" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "2013" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is ...
SELECT "2009" FROM table_71449 WHERE "2011" = 'grand slam tournaments'
### Instruction: CREATE TABLE table_67686 ( "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 "Lost" FROM table_67686 WHERE "Try bonus" = '2' AND "Losing bonus" = '4'
### Instruction: CREATE TABLE table_24748 ( "Country" text, "Area (000s)" text, "1950 (mil)" text, "1970 (mil)" text, "1980 (mil)" text, "1985 (mil)" text, "Annual Growth (1950\u20131985)" text, "Density (1980)" text ) -- Using valid SQLite, answer the following questions for the table...
SELECT COUNT("1980 (mil)") FROM table_24748 WHERE "Country" = 'Soviet Union'
### Instruction: CREATE TABLE Movie ( mID int, title text, year int, director text ) CREATE TABLE Reviewer ( rID int, name text ) CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date ) -- Using valid SQLite, answer the following questions for the tables provided...
SELECT name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name ORDER BY AVG(T1.stars) DESC
### Instruction: CREATE TABLE election ( election_id number, counties_represented text, district number, delegate text, party number, first_elected number, committee text ) CREATE TABLE party ( party_id number, year number, party text, governor text, lieutenant_governor ...
SELECT county_name, population FROM county
### Instruction: CREATE TABLE table_61320 ( "Name" text, "Position" text, "League Apps" text, "League Goals" real, "FA Cup Apps" text, "FA Cup Goals" real, "League Cup Apps" text, "League Cup Goals" real, "Total Apps" text, "Total Goals" real ) -- Using valid SQLite, answer the...
SELECT MIN("Total Goals") FROM table_61320 WHERE "Position" = 'df' AND "FA Cup Goals" < '0'
### Instruction: CREATE TABLE table_269920_17 ( l3_cache__mb_ INTEGER, model VARCHAR, qpi_speed__gt_s_ VARCHAR, speed__ghz_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the maximum L3 cache of the processor whose speed is 2.00 GHZ, has a QP...
SELECT MAX(l3_cache__mb_) FROM table_269920_17 WHERE qpi_speed__gt_s_ = "4.8" AND speed__ghz_ = "2.00" AND model = "E5504"
### Instruction: CREATE TABLE table_10242 ( "Club" text, "City" text, "Stadium" text, "Capacity" real, "2011\u201312 season" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What city has a stadium with a capacity of more than 13,602, and 2011 12 seas...
SELECT "City" FROM table_10242 WHERE "Capacity" > '13,602' AND "2011\u201312 season" = '16th in lega pro prima divisione a'
### Instruction: CREATE TABLE table_24557 ( "Municipality" text, "Type" text, "District" text, "Area (km\u00b2)" text, "Population (2010)" real, "Pop. Density (per km\u00b2)" text, "No. of Barangays" real, "Municipal Mayor" text ) -- Using valid SQLite, answer the following questions f...
SELECT "Pop. Density (per km\u00b2)" FROM table_24557 WHERE "Municipal Mayor" = 'Boy Quiat'
### Instruction: CREATE TABLE table_23662 ( "Rank" real, "Country/Territory" text, "Mister 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 q...
SELECT COUNT("2nd runner-up") FROM table_23662 WHERE "Rank" = '2'
### 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_203_322 ( id number, "club" text, "played" number, "won" number, "drawn" number, "lost" number, "points for" number, "points against" number, "bonus points" number, "points" number ) -- Using valid SQLite, answer the following questions for t...
SELECT (SELECT "points" FROM table_203_322 WHERE "club" = 'biarritz olympique') - (SELECT "points" FROM table_203_322 WHERE "club" = 'su agen')
### Instruction: CREATE TABLE table_15909409_2 ( total_freshwater_withdrawal__km_3__yr_ VARCHAR, agricultural_use__m_3__p_yr__in__percentage_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many countries had a total freshwater withdrawal (km 3 /yr) where...
SELECT COUNT(total_freshwater_withdrawal__km_3__yr_) FROM table_15909409_2 WHERE agricultural_use__m_3__p_yr__in__percentage_ = "428(62%)"
### Instruction: CREATE TABLE table_10328 ( "Year" text, "Builder and model name" text, "Length (feet)" real, "Width (inches)" real, "Engine" text, "Numbers" text, "Retired" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For a vehicle below ...
SELECT COUNT("Width (inches)") FROM table_10328 WHERE "Engine" = 'navistar t444e' AND "Retired" = '2005' AND "Length (feet)" < '25'
### Instruction: CREATE TABLE table_204_381 ( id number, "sum" number, "mongolian" number, "population\n(2005)" number, "population\n(2008)" number, "population\n(2009)" number, "area\nkm2" number, "density\n/km2" number, "sum centre\npopulation" number ) -- Using valid SQLite, ans...
SELECT "sum" FROM table_204_381 ORDER BY "population\n(2005)" DESC LIMIT 1
### Instruction: CREATE TABLE mountain ( Mountain_ID int, Name text, Height real, Prominence real, Range text, Country text ) CREATE TABLE climber ( Climber_ID int, Name text, Country text, Time text, Points real, Mountain_ID int ) -- Using valid SQLite, answer the fol...
SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Name
### Instruction: CREATE TABLE table_51078 ( "Nat." text, "Name" text, "Since" text, "App(L/C/E)" text, "Goals(L/C/E)" text, "Ends" real, "Transfer fee" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Nationality ...
SELECT "Nat." FROM table_51078 WHERE "App(L/C/E)" = '0 (0/0/0)' AND "Name" = 'yahaya'
### Instruction: CREATE TABLE table_203_226 ( id number, "player" text, "matches" number, "innings" number, "not out" number, "runs" number, "high score" number, "average" number, "strike rate" number, "100s" number, "50s" number ) -- Using valid SQLite, answer the followin...
SELECT SUM("strike rate") FROM table_203_226 WHERE "player" IN ('craig white', 'richard pyrah', 'adam lyth')
### Instruction: CREATE TABLE table_2886 ( "Rank" real, "Rider" text, "Mon 24 Aug" text, "Tues 25 Aug" text, "Wed 26 Aug" text, "Thurs 27 Aug" text, "Fri 28 Aug" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is every rider on Tuesday A...
SELECT "Rider" FROM table_2886 WHERE "Tues 25 Aug" = '20'' 32.11 110.241mph'
### Instruction: CREATE TABLE Reviewer ( rID int, name text ) CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date ) CREATE TABLE Movie ( mID int, title text, year int, director text ) -- Using valid SQLite, answer the following questions for the tables provided...
SELECT T2.title, AVG(MIN(T1.stars)) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.title ORDER BY AVG(MIN(T1.stars)) DESC
### Instruction: CREATE TABLE driver ( driver_id number, name text, party text, home_city text, age number ) CREATE TABLE school ( school_id number, grade text, school text, location text, type text ) CREATE TABLE school_bus ( school_id number, driver_id number, yea...
SELECT T2.type, COUNT(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T2.type
### Instruction: CREATE TABLE table_203_182 ( id number, "no. in\nseries" number, "no. in\nseason" number, "title" text, "directed by" text, "written by" text, "original air date" text, "production\ncode" number ) -- Using valid SQLite, answer the following questions for the tables pro...
SELECT (SELECT COUNT("title") FROM table_203_182 WHERE "directed by" = 'shelley jensen') - (SELECT COUNT("title") FROM table_203_182 WHERE "directed by" = 'madeline cripe')
### Instruction: CREATE TABLE host ( Host_ID int, Name text, Nationality text, Age text ) CREATE TABLE party ( Party_ID int, Party_Theme text, Location text, First_year text, Last_year text, Number_of_hosts int ) CREATE TABLE party_host ( Party_ID int, Host_ID int, ...
SELECT Nationality, COUNT(*) FROM host GROUP BY Nationality ORDER BY Nationality DESC
### Instruction: CREATE TABLE table_train_38 ( "id" int, "left_ventricular_ejection_fraction_lvef" int, "child_pugh_class" string, "systolic_blood_pressure_sbp" int, "heart_disease" bool, "acute_hepatitis" bool, "liver_disease" bool, "heart_rate" int, "NOUSE" float ) -- Using valid...
SELECT * FROM table_train_38 WHERE left_ventricular_ejection_fraction_lvef < 30
### Instruction: CREATE TABLE table_9611 ( "Missouri vs." text, "Overall Record" text, "at Columbia" text, "at Opponent's Venue" text, "at Neutral Site" text, "Last 5 Meetings" text, "Last 10 Meetings" text, "Current Streak" text, "During Time in Big 12" text ) -- Using valid SQLit...
SELECT "at Opponent's Venue" FROM table_9611 WHERE "Current Streak" = 'w 4'
### Instruction: CREATE TABLE table_204_225 ( id number, "rank" number, "country/territory" text, "miss supranational" number, "1st runner-up" number, "2nd runner-up" number, "3rd runner-up" number, "4th runner-up" number, "semifinalists" number, "total" number ) -- Using valid...
SELECT "country/territory" FROM table_204_225 WHERE id = (SELECT id FROM table_204_225 WHERE "rank" = 20) - 1
### Instruction: CREATE TABLE table_37720 ( "Rank" real, "Name" text, "Nationality" text, "1st (m)" real, "2nd (m)" real, "Points" real, "Overall WC points (Rank)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which 2nd (m) has an Overall W...
SELECT SUM("2nd (m)") FROM table_37720 WHERE "Overall WC points (Rank)" = '1632 (1)' AND "Points" > '273.5'
### Instruction: CREATE TABLE table_train_235 ( "id" int, "urinary_protein" float, "nephrotic_range_proteinuria" bool, "hepatic_disease" bool, "estimated_glomerular_filtration_rate_egfr" int, "kidney_disease" bool, "renal_transplantation" bool, "NOUSE" float ) -- Using valid SQLite, an...
SELECT * FROM table_train_235 WHERE estimated_glomerular_filtration_rate_egfr > 30
### Instruction: CREATE TABLE table_67125 ( "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 MIN("Round 1") FROM table_67125 WHERE "Place" = 't15' AND "Year" < '1998'
### Instruction: CREATE TABLE table_48169 ( "Rank" text, "Administrative Division" text, "Area (km\u00b2)" real, "Area (sq mi)" real, "National Share (%)" real, "Comparable Country" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the aver...
SELECT AVG("Area (km\u00b2)") FROM table_48169 WHERE "Area (sq mi)" = '2,448' AND "National Share (%)" > '0.065'
### Instruction: CREATE TABLE table_22375 ( "Mexico" text, "Ma\u00f1ana es para siempre" text, "El Canal de las Estrellas" text, "October 20, 2008" text, "June 14, 2009" text, "Monday to Friday" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- sta...
SELECT "El Canal de las Estrellas" FROM table_22375 WHERE "Ma\u00f1ana es para siempre" = 'Impreuna pentru totdeauna'
### Instruction: CREATE TABLE table_22255 ( "Canton" text, "Years of Kindergarten" real, "Years of Kindergarten provided" text, "Years of Kindergarten legally required" text, "Length of Primary School" real, "Length of mandatory Secondary School" real, "Separate Secondary Schools?" text, ...
SELECT "Integrated Secondary Schools?" FROM table_22255 WHERE "Canton" = 'Basel-Stadt'
### Instruction: CREATE TABLE table_76929 ( "Taper" text, "Large end" real, "Small end" real, "Length" real, "Taper/ ft" real, "Taper/ in" real, "Angle from center/\u00b0" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Angle from cente...
SELECT COUNT("Angle from center/\u00b0") FROM table_76929 WHERE "Taper/ ft" < '0.6000000000000001'
### Instruction: CREATE TABLE table_43640 ( "Year" real, "U.S. Rank" real, "Total s Ton" real, "Domestic s Ton" real, "Foreign Total s Ton" real, "Foreign Imports s Ton" real, "Foreign Exports s Ton" real ) -- Using valid SQLite, answer the following questions for the tables provided above...
SELECT AVG("Domestic s Ton") FROM table_43640 WHERE "Foreign Imports s Ton" < '225,281' AND "Year" > '2003'
### Instruction: CREATE TABLE table_50597 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent in the final" text, "Score in the final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Opponent In The Final, when Out...
SELECT "Opponent in the final" FROM table_50597 WHERE "Outcome" = 'winner' AND "Surface" = 'carpet (i)' AND "Tournament" = 'lyon, france'
### Instruction: CREATE TABLE table_40350 ( "From" real, "Goal" real, "Round 1" text, "Round 2" text, "Round 3" text, "Round 4" text, "Round 5" text, "Round 6+" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the round 6+ that has...
SELECT "Round 6+" FROM table_40350 WHERE "Round 2" = 'single' AND "Round 4" = 'double' AND "From" = '1982'
### Instruction: CREATE TABLE table_7737 ( "Tournament" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "2013" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the tournament wit...
SELECT "Tournament" FROM table_7737 WHERE "2006" = 'a' AND "2011" = '1r'
### Instruction: CREATE TABLE table_73599 ( "Name" text, "Location" text, "Act. Units" real, "Stacks" text, "In Service Dates" text, "Unit Capacity (2009)" text, "Nameplate Capacity (2009 MW )" text, "Owner Type" text, "Owner(s) (2009)" text ) -- Using valid SQLite, answer the foll...
SELECT "Stacks" FROM table_73599 WHERE "In Service Dates" = '1 1969 2 1995'
### Instruction: CREATE TABLE table_24301 ( "Census division" text, "Area (km\u00b2)" text, "Pop. (2011)" real, "Pop. (2006)" real, "Pop. (2001)" real, "Pop. (1996)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many different results of th...
SELECT COUNT("Pop. (2001)") FROM table_24301 WHERE "Pop. (1996)" = '880859'