instruction
stringlengths
212
6.3k
output
stringlengths
6
2.03k
### Instruction: CREATE TABLE table_36302 ( "Distribution" text, "x86-64" text, "ia64" text, "ppc64" text, "sparc32" text, "hppa" text, "mips" text, "s390" text, "s390x" text, "alpha" text, "m68k" text ) -- Using valid SQLite, answer the following questions for the tables p...
SELECT "hppa" FROM table_36302 WHERE "mips" = 'no' AND "alpha" = 'no' AND "ppc64" = 'yes 3+'
### Instruction: CREATE TABLE appellations ( No INTEGER, Appelation TEXT, County TEXT, State TEXT, Area TEXT, isAVA TEXT ) CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TEXT, Year INTEGER, Price INTEGER, Score INTE...
SELECT Year, AVG(MAX(Price)) FROM wine
### Instruction: CREATE TABLE table_21908 ( "Rank" real, "Family" text, "Abbre\u00adviation" text, "Constellation" text, "Area (sq.deg.)" text, "Area (msr)" text, "Per\u00adcent\u00adage" text, "Right ascension (hm)" text, "Decli\u00adnation (dm)" text, "Quad" text ) -- Using v...
SELECT COUNT("Right ascension (hm)") FROM table_21908 WHERE "Abbre\u00adviation" = 'Oph'
### 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 Founder, SUM(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder
### Instruction: CREATE TABLE table_203_642 ( id number, "name" text, "quadrant" text, "sector" text, "ward" text, "type" text, "2012\npopulation\nrank" number, "population\n(2012)" number, "population\n(2011)" number, "% change" number, "dwellings\n(2012)" number, "area\...
SELECT COUNT(*) FROM table_203_642 WHERE "type" = 'industrial'
### Instruction: CREATE TABLE course ( course_id VARCHAR, title VARCHAR ) CREATE TABLE student ( name VARCHAR, id VARCHAR ) CREATE TABLE takes ( id VARCHAR, course_id VARCHAR ) CREATE TABLE prereq ( prereq_id VARCHAR, course_id VARCHAR ) -- Using valid SQLite, answer the following q...
SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id = T4.course_id WHERE T3.title = 'International Finance')
### Instruction: CREATE TABLE medicine_enzyme_interaction ( enzyme_id int, medicine_id int, interaction_type text ) CREATE TABLE medicine ( id int, name text, Trade_Name text, FDA_approved text ) CREATE TABLE enzyme ( id int, name text, Location text, Product text, Chro...
SELECT Trade_Name, id FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id
### 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 owner_descr FROM fires GROUP BY owner_descr ORDER BY COUNT(*) DESC LIMIT 1
### Instruction: CREATE TABLE member ( member_id number, card_number text, name text, hometown text, level number ) CREATE TABLE membership_register_branch ( member_id number, branch_id text, register_year text ) CREATE TABLE purchase ( member_id number, branch_id text, yea...
SELECT name, city FROM branch WHERE NOT branch_id IN (SELECT branch_id FROM membership_register_branch)
### Instruction: CREATE TABLE purchase ( member_id number, branch_id text, year text, total_pounds number ) CREATE TABLE membership_register_branch ( member_id number, branch_id text, register_year text ) CREATE TABLE branch ( branch_id number, name text, open_year text, ad...
SELECT city, COUNT(*) FROM branch WHERE open_year < 2010 GROUP BY city
### Instruction: CREATE TABLE table_71247 ( "Year" text, "Games Played" real, "Games Started" real, "Attempts" real, "Yards" real, "Touchdowns" real, "Receptions" real, "Rec. Yards" real, "Rec. Touchdowns" real, "Fumbles" real ) -- Using valid SQLite, answer the following quest...
SELECT MAX("Games Played") FROM table_71247 WHERE "Receptions" = '6' AND "Games Started" = '10' AND "Fumbles" < '3'
### Instruction: CREATE TABLE table_46957 ( "Squad No." real, "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 va...
SELECT AVG("League Goals") FROM table_46957 WHERE "League Apps" = '16 (1)' AND "League Cup Goals" < '0'
### Instruction: CREATE TABLE table_12846 ( "Governorate" text, "Cereals" real, "Fruit Trees" real, "Olives" real, "Industrial crops" real, "Vegetables" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of vegetables of the...
SELECT COUNT("Vegetables") FROM table_12846 WHERE "Fruit Trees" > '135,685' AND "Cereals" < '3,140' AND "Olives" < '31,443'
### Instruction: CREATE TABLE country ( name VARCHAR, area VARCHAR, population VARCHAR, Country_ID VARCHAR ) CREATE TABLE roller_coaster ( Country_ID VARCHAR, speed INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the country names, a...
SELECT T1.name, T1.area, T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed > 60 INTERSECT SELECT T1.name, T1.area, T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed < 55
### Instruction: CREATE TABLE faculty ( facid number, lname text, fname text, rank text, sex text, phone number, room text, building text ) CREATE TABLE activity ( actid number, activity_name text ) CREATE TABLE student ( stuid number, lname text, fname text, ag...
SELECT COUNT(*) FROM activity
### Instruction: CREATE TABLE table_50261 ( "Tournament" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ) -- Using valid SQLite, answer the following questions for the t...
SELECT "2005" FROM table_50261 WHERE "2010" = 'grand slam tournaments'
### Instruction: CREATE TABLE Maintenance_Engineers ( first_name VARCHAR, last_name VARCHAR, engineer_id VARCHAR ) CREATE TABLE Staff ( staff_name VARCHAR, staff_id VARCHAR ) CREATE TABLE Engineer_Visits ( contact_staff_id VARCHAR, engineer_id VARCHAR ) -- Using valid SQLite, answer the ...
SELECT T1.staff_name, T3.first_name, T3.last_name FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id JOIN Maintenance_Engineers AS T3 ON T2.engineer_id = T3.engineer_id
### Instruction: CREATE TABLE table_test_15 ( "id" int, "anemia" bool, "cell_therapy" bool, "hiv_infection" bool, "hemoglobin_a1c_hba1c" float, "body_weight" float, "renal_disease" bool, "creatinine_clearance_cl" float, "active_hepatitis" bool, "chronic_inflammatory_disease" bool...
SELECT * FROM table_test_15 WHERE creatinine_clearance_cl < 30
### Instruction: CREATE TABLE table_name_18 ( ansi_code INTEGER, land___sqmi__ VARCHAR, township VARCHAR, longitude VARCHAR, geo_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the smallest ANSI code for adler township when Longitude is...
SELECT MIN(ansi_code) FROM table_name_18 WHERE longitude > -101.333926 AND geo_id < 3806700900 AND township = "adler" AND land___sqmi__ > 35.84
### Instruction: CREATE TABLE table_14907 ( "Year" real, "Crime Index Total" real, "Violent crime" real, "Non-violent Crime" real, "Crime rate Per 1000" real, "Violent crime Rate per 1000" real, "Non-violent crime Rate per 1000" real, "Murder" real, "Rape" real, "Robbery" real, ...
SELECT SUM("Murder") FROM table_14907 WHERE "Year" > '2011'
### 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(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER 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, AVG(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder
### Instruction: CREATE TABLE table_5659 ( "Club" text, "Position in 2012\u201313" text, "First season in top division" text, "Number of seasons in top division" real, "Number of seasons in Prva HNL" real, "First season of current spell in top division" text, "Top division titles" text, ...
SELECT MIN("Number of seasons in top division") FROM table_5659 WHERE "Position in 2012\u201313" = '001 1st'
### Instruction: CREATE TABLE table_63511 ( "Total fat" text, "Saturated fat" text, "Monounsaturated fat" text, "Polyunsaturated fat" text, "Smoke point" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the monounsaturated fat with a smoke poi...
SELECT "Monounsaturated fat" FROM table_63511 WHERE "Smoke point" = '°c ()' AND "Total fat" = '100g' AND "Polyunsaturated fat" = '11g' AND "Saturated fat" = '14g'
### 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 Founder, AVG(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder
### Instruction: CREATE TABLE table_204_206 ( id number, "saros" number, "member" number, "date" text, "time\n(greatest)\nutc" text, "type" text, "location\nlat,long" text, "gamma" number, "mag." number, "width\n(km)" number, "duration\n(min:sec)" text, "ref" number ) -...
SELECT "time\n(greatest)\nutc" FROM table_204_206 WHERE "date" = 'october 3, 2415'
### Instruction: CREATE TABLE manager ( manager_id number, name text, country text, working_year_starts text, age number, level number ) CREATE TABLE railway_manage ( railway_id number, manager_id number, from_year text ) CREATE TABLE railway ( railway_id number, railway te...
SELECT name FROM manager ORDER BY level
### Instruction: CREATE TABLE medicine_enzyme_interaction ( enzyme_id int, medicine_id int, interaction_type text ) CREATE TABLE medicine ( id int, name text, Trade_Name text, FDA_approved text ) CREATE TABLE enzyme ( id int, name text, Location text, Product text, Chro...
SELECT Trade_Name, id FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id
### Instruction: CREATE TABLE table_35072 ( "Player" text, "Played" real, "Sets Won" real, "Sets Lost" real, "Legs Won" real, "Legs Lost" real, "100+" real, "140+" real, "180s" real, "High Checkout" real, "3-dart Average" real ) -- Using valid SQLite, answer the following q...
SELECT SUM("Played") FROM table_35072 WHERE "Sets Won" < '4' AND "3-dart Average" = '53.19'
### Instruction: CREATE TABLE table_50262 ( "Tournament" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ) -- Using valid SQLite, answer the following questions for the t...
SELECT "2003" FROM table_50262 WHERE "2008" = 'grand slam tournaments'
### Instruction: CREATE TABLE table_35637 ( "State" text, "1990\u201395" real, "1996-00" real, "2001\u201305" real, "2006\u201310" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which 1990 95 is the highest one that has a State of karnataka, and a 2...
SELECT MAX("1990\u201395") FROM table_35637 WHERE "State" = 'karnataka' AND "2001\u201305" < '0.2'
### Instruction: CREATE TABLE table_31867 ( "Player" text, "Highest singles ranking" text, "Highest doubles ranking" text, "First year played" real, "Years played" real, "Ties played" real, "Total W\u2013L" text, "Singles W\u2013L" text, "Doubles W\u2013L" text ) -- Using valid SQL...
SELECT "Singles W\u2013L" FROM table_31867 WHERE "Years played" > '1' AND "Highest singles ranking" = '1346'
### Instruction: CREATE TABLE purchase ( member_id number, branch_id text, year text, total_pounds number ) CREATE TABLE membership_register_branch ( member_id number, branch_id text, register_year text ) CREATE TABLE member ( member_id number, card_number text, name text, ...
SELECT DISTINCT city FROM branch WHERE membership_amount >= 100
### Instruction: CREATE TABLE table_5691 ( "Week 6 Oct 5" text, "Week 7 Oct 12" text, "Week 9 Oct 26" text, "Week 10 Nov 2" text, "Week 11 Nov 9" text, "Week 13 Nov 23" text, "Week 14 Nov 30" text, "Week 15 (Final) Dec 7" text ) -- Using valid SQLite, answer the following questions for...
SELECT "Week 7 Oct 12" FROM table_5691 WHERE "Week 11 Nov 9" = 'week 11 nov 9'
### Instruction: CREATE TABLE college ( College_ID int, Name text, Leader_Name text, College_Location text ) CREATE TABLE round ( Round_ID int, Member_ID int, Decoration_Theme text, Rank_in_Round int ) CREATE TABLE member ( Member_ID int, Name text, Country text, Colleg...
SELECT 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 COUNT(College_Location)
### Instruction: CREATE TABLE music_festival ( ID int, Music_Festival text, Date_of_ceremony text, Category text, Volume int, Result text ) CREATE TABLE artist ( Artist_ID int, Artist text, Age int, Famous_Title text, Famous_Release_date text ) CREATE TABLE volume ( Vol...
SELECT Category, COUNT(*) FROM music_festival GROUP BY Category ORDER BY Category DESC
### Instruction: CREATE TABLE table_76269 ( "Governorate" text, "Capital City" text, "Area km\u00b2" real, "Pop (2004)" real, "Map Key" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Map Key has an Area km larger than 14,003 and a Capital C...
SELECT SUM("Map Key") FROM table_76269 WHERE "Area km\u00b2" > '14,003' AND "Capital City" = 'al mukalla' AND "Pop (2004)" > '1,028,556'
### Instruction: CREATE TABLE table_71321 ( "School" text, "Location" text, "Total" real, "Crimean War" real, "Persian War" real, "Indian Mutiny" real, "1860-1878" real, "Zulu War" real, "Second Afghan War" text ) -- Using valid SQLite, answer the following questions for the tables...
SELECT "Crimean War" FROM table_71321 WHERE "1860-1878" = '0' AND "Total" = '1' AND "Indian Mutiny" > '0'
### Instruction: CREATE TABLE table_train_226 ( "id" int, "gender" string, "pregnancy_or_lactation" bool, "active_metabolic" bool, "diabetic" string, "hepatic_disease" bool, "gastrointestinal_disease" bool, "body_mass_index_bmi" float, "age" float, "NOUSE" float ) -- Using vali...
SELECT * FROM table_train_226 WHERE body_mass_index_bmi >= 18.5 AND body_mass_index_bmi < 40
### Instruction: CREATE TABLE match_season ( season number, player text, position text, country number, team number, draft_pick_number number, draft_class text, college text ) CREATE TABLE team ( team_id number, name text ) CREATE TABLE player ( player_id number, player...
SELECT country_name, capital FROM country
### Instruction: CREATE TABLE table_34223 ( "Tournament" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text, "1998" text, "Career SR" text, "Career Win-Loss" text ) -- Using valid SQLite, answer the following que...
SELECT "1993" FROM table_34223 WHERE "1997" = 'grand slams'
### Instruction: CREATE TABLE airport ( id number, city text, country text, iata text, icao text, name text ) CREATE TABLE operate_company ( id number, name text, type text, principal_activities text, incorporated_in text, group_equity_shareholding number ) CREATE TABLE...
SELECT name FROM airport WHERE country <> 'Iceland'
### Instruction: CREATE TABLE table_42009 ( "Member State" text, "Population in millions" real, "Population % of EU" text, "Area km 2" real, "Area % of EU" text, "Pop. density People/km 2" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is t...
SELECT SUM("Pop. density People/km 2") FROM table_42009 WHERE "Population % of EU" = '0.1%' AND "Area % of EU" = '0.1%' AND "Population in millions" > '0.5'
### Instruction: CREATE TABLE company ( Company_ID real, Name text, Headquarters text, Industry text, Sales_in_Billion real, Profits_in_Billion real, Assets_in_Billion real, Market_Value_in_Billion real ) CREATE TABLE employment ( Company_ID int, People_ID int, Year_working ...
SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters ORDER BY Headquarters
### Instruction: CREATE TABLE people ( People_ID int, Name text, Age real, Height real, Hometown text ) CREATE TABLE gymnast ( Gymnast_ID int, Floor_Exercise_Points real, Pommel_Horse_Points real, Rings_Points real, Vault_Points real, Parallel_Bars_Points real, Horizonta...
SELECT Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown
### Instruction: CREATE TABLE video_games ( gameid number, gname text, gtype text ) CREATE TABLE sportsinfo ( stuid number, sportname text, hoursperweek number, gamesplayed number, onscholarship text ) CREATE TABLE student ( stuid number, lname text, fname text, age num...
SELECT gtype, COUNT(*) FROM video_games GROUP BY gtype
### Instruction: CREATE TABLE sportsinfo ( stuid number, sportname text, hoursperweek number, gamesplayed number, onscholarship text ) CREATE TABLE video_games ( gameid number, gname text, gtype text ) CREATE TABLE plays_games ( stuid number, gameid number, hours_played num...
SELECT stuid FROM student EXCEPT SELECT stuid FROM plays_games
### Instruction: CREATE TABLE table_50223 ( "Department" text, "Micro (10ha)" real, "Small (100ha)" real, "Medium (500ha)" real, "Big (>500ha)" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Big (>500ha) has a Micro (10ha) la...
SELECT MAX("Big (>500ha)") FROM table_50223 WHERE "Micro (10ha)" > '940' AND "Department" = 'potosí' AND "Total" < '16,240'
### Instruction: CREATE TABLE table_7295 ( "Place (Posici\u00f3n)" real, "Team (Equipo)" text, "Played (PJ)" real, "Won (PG)" real, "Draw (PE)" real, "Lost (PP)" real, "Goals Scored (GF)" real, "Goals Conceded (GC)" real, "+/- (Dif.)" real, "Points (Pts.)" real ) -- Using valid...
SELECT MAX("Points (Pts.)") FROM table_7295 WHERE "Team (Equipo)" = 'orion' AND "Lost (PP)" > '4'
### Instruction: CREATE TABLE table_79625 ( "Race" text, "Dist (f)" real, "Course" text, "Class" text, "Prize (\u00a3K)" real, "Odds" text, "Runners" real, "Placing" real, "Margin" text, "Time" text, "Jockey" text, "Trainer" text ) -- Using valid SQLite, answer the foll...
SELECT MAX("Dist (f)") FROM table_79625 WHERE "Odds" = '11/4' AND "Placing" > '1'
### 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 DISTINCT president_vote FROM voting_record WHERE registration_date = "08/30/2015"
### Instruction: CREATE TABLE driver ( Driver_ID int, Name text, Party text, Home_city text, Age int ) CREATE TABLE school_bus ( School_ID int, Driver_ID int, Years_Working int, If_full_time bool ) CREATE TABLE school ( School_ID int, Grade text, School text, Locati...
SELECT Type, COUNT(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T2.Type ORDER BY COUNT(*) DESC
### Instruction: CREATE TABLE table_5695 ( "Week 6 Oct 5" text, "Week 7 Oct 12" text, "Week 9 Oct 26" text, "Week 10 Nov 2" text, "Week 11 Nov 9" text, "Week 13 Nov 23" text, "Week 14 Nov 30" text, "Week 15 (Final) Dec 7" text ) -- Using valid SQLite, answer the following questions for...
SELECT "Week 13 Nov 23" FROM table_5695 WHERE "Week 6 Oct 5" = 'oklahoma state (5-0)'
### Instruction: CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following ...
SELECT T2.Name, MAX(T1.Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY MAX(T1.Price) DESC
### Instruction: CREATE TABLE table_21481 ( "Year" real, "West Manila" text, "East Manila" text, "Consumer Price Index (2005=100)" text, "West Manila as a share of 1996 real tariff" text, "East Manila as a share of 1996 real tariff" text ) -- Using valid SQLite, answer the following questions ...
SELECT "East Manila as a share of 1996 real tariff" FROM table_21481 WHERE "Consumer Price Index (2005=100)" = '119.4'
### Instruction: CREATE TABLE storm ( Storm_ID int, Name text, Dates_active text, Max_speed int, Damage_millions_USD real, Number_Deaths int ) CREATE TABLE region ( Region_id int, Region_code text, Region_name text ) CREATE TABLE affected_region ( Region_id int, Storm_ID in...
SELECT Dates_active, Number_Deaths FROM storm WHERE Number_Deaths >= 1 ORDER BY Dates_active DESC
### Instruction: CREATE TABLE channel ( Channel_ID int, Name text, Owner text, Share_in_percent real, Rating_in_percent real ) CREATE TABLE program ( Program_ID int, Name text, Origin text, Launch real, Owner text ) CREATE TABLE broadcast_share ( Channel_ID int, Program...
SELECT Owner, SUM(Rating_in_percent) FROM channel GROUP BY Owner
### Instruction: CREATE TABLE table_36041 ( "m/v ft/s" real, "Shell (lb)" real, "Time to ft (m) at 25\u00b0 (seconds)" text, "Time to ft (m) at 40\u00b0 (seconds)" real, "Time to ft (m) at 55\u00b0 (seconds)" real, "Max. height (ft)" real ) -- Using valid SQLite, answer the following questions...
SELECT "Shell (lb)" FROM table_36041 WHERE "Time to ft (m) at 40\u00b0 (seconds)" = '12.6'
### Instruction: CREATE TABLE table_21019 ( "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_21019 WHERE "Part number(s)" = 'CT80618003201AA'
### Instruction: CREATE TABLE table_32096 ( "2nd component" text, "b.p. 2nd comp. (\u02daC)" real, "3rd component" text, "b.p. 3rd comp. (\u02daC)" text, "b.p. azeo. (\u02daC)" text, "% wt 1st" text, "% wt 2nd" text, "% wt 3rd" text ) -- Using valid SQLite, answer the following questio...
SELECT "3rd component" FROM table_32096 WHERE "b.p. azeo. (\u02daC)" = '62.1'
### Instruction: CREATE TABLE table_43643 ( "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 COUNT("Foreign Total s Ton") FROM table_43643 WHERE "U.S. Rank" = '102' AND "Year" < '2006' AND "Total s Ton" < '2,983,137'
### Instruction: CREATE TABLE team ( team_id number, name text ) CREATE TABLE country ( country_id number, country_name text, capital text, official_native_language text ) CREATE TABLE match_season ( season number, player text, position text, country number, team number, ...
SELECT DISTINCT position FROM match_season
### Instruction: CREATE TABLE table_41412 ( "Club" text, "Position in 2013" text, "First season" real, "First season of current spell" real, "Number of seasons in Superettan" real, "Number of seasons in second tier" real ) -- Using valid SQLite, answer the following questions for the tables pr...
SELECT MIN("First season of current spell") FROM table_41412 WHERE "First season" > '2005' AND "Number of seasons in Superettan" < '8' AND "Club" = 'syrianska fc'
### Instruction: CREATE TABLE browser ( id int, name text, market_share real ) CREATE TABLE accelerator_compatible_browser ( accelerator_id int, browser_id int, compatible_since_year int ) CREATE TABLE Web_client_accelerator ( id int, name text, Operating_system text, Client te...
SELECT name, id FROM Web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id ORDER BY name DESC
### Instruction: CREATE TABLE participants ( participant_id number, participant_type_code text, participant_details text ) CREATE TABLE participants_in_events ( event_id number, participant_id number ) CREATE TABLE events ( event_id number, service_id number, event_details text ) CREA...
SELECT T1.event_id, T1.event_details FROM events AS T1 JOIN participants_in_events AS T2 ON T1.event_id = T2.event_id GROUP BY T1.event_id HAVING COUNT(*) > 1
### 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 Title, COUNT(Title) FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Title
### Instruction: CREATE TABLE table_76407 ( "Particle name" text, "Particle symbol" text, "Antiparticle symbol" text, "Quark content" text, "Rest mass ( MeV / c 2 )" text, "J P C" text, "Mean lifetime ( s )" text, "Commonly decays to (>5% of decays)" text ) -- Using valid SQLite, answe...
SELECT "J P C" FROM table_76407 WHERE "Commonly decays to (>5% of decays)" = 'd 0 + π 0 or d 0 + γ'
### Instruction: CREATE TABLE table_31466 ( "Rank" real, "Rider" text, "Sat 20 Aug" text, "Mon 22 Aug" text, "Tues 23 Aug" text, "Wed 24 Aug" text, "Thurs 25 Aug" text, "Fri 26 Aug" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What sho...
SELECT "Mon 22 Aug" FROM table_31466 WHERE "Wed 24 Aug" = '19'' 56.16 113.553mph'
### Instruction: CREATE TABLE accelerator_compatible_browser ( accelerator_id int, browser_id int, compatible_since_year int ) CREATE TABLE Web_client_accelerator ( id int, name text, Operating_system text, Client text, Connection text ) CREATE TABLE browser ( id int, name text...
SELECT name, id FROM Web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id ORDER BY id DESC
### Instruction: CREATE TABLE table_41989 ( "Round" text, "Race" real, "Circuit" text, "Date" text, "Pole Position" text, "Fastest Lap" text, "Winning driver" text, "Winning team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Fa...
SELECT "Fastest Lap" FROM table_41989 WHERE "Winning team" = 'team brm' AND "Race" = '1' AND "Pole Position" = 'leanne tander' AND "Circuit" = 'phillip island'
### Instruction: CREATE TABLE table_42116 ( "Position" real, "Channel" text, "Launch date" real, "Owner" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "2013 (p)" real ) -- Using valid SQLite, answer the...
SELECT COUNT("Position") FROM table_42116 WHERE "2012" = '0.92'
### 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.Headquarter, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Headquarter
### Instruction: CREATE TABLE table_64578 ( "Township" text, "County" text, "Pop. (2010)" real, "Land ( sqmi )" real, "Water (sqmi)" real, "Latitude" real, "Longitude" real, "GEO ID" real, "ANSI code" real ) -- Using valid SQLite, answer the following questions for the tables provi...
SELECT MIN("Water (sqmi)") FROM table_64578 WHERE "Township" = 'yorktown' AND "GEO ID" < '3802187940'
### Instruction: CREATE TABLE table_54115 ( "Gymnast" text, "Floor Exercise" real, "Pommel Horse" real, "Rings" real, "Vault" real, "Parallel Bars" real, "Horizontal Bar" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what ...
SELECT SUM("Parallel Bars") FROM table_54115 WHERE "Floor Exercise" > '9.137' AND "Horizontal Bar" = '9.225' AND "Vault" > '9.5'
### Instruction: CREATE TABLE table_34431 ( "Tournament" text, "2003" text, "2004" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "2013" text, "Win %" real ) -- Using valid SQLite, answer the following q...
SELECT "2010" FROM table_34431 WHERE "2006" = 'w'
### Instruction: CREATE TABLE exhibition_record ( Exhibition_ID int, Date text, Attendance int ) CREATE TABLE artist ( Artist_ID int, Name text, Country text, Year_Join int, Age int ) CREATE TABLE exhibition ( Exhibition_ID int, Year int, Theme text, Artist_ID int, ...
SELECT Year, COUNT(Year) FROM exhibition WHERE Ticket_Price < 15 GROUP BY Theme ORDER BY COUNT(Year) DESC
### 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, AVG(basePrice) FROM Rooms GROUP BY bedType ORDER BY bedType DESC
### Instruction: CREATE TABLE table_17754 ( "Clinical Status" text, "Compound Name" text, "Trademark" text, "Marine Organism \u03b1" text, "Chemical Class" text, "Molecular Target" text, "Clinical Trials \u03b2" text, "Disease Area" text ) -- Using valid SQLite, answer the following qu...
SELECT COUNT("Compound Name") FROM table_17754 WHERE "Chemical Class" = 'Depsipeptide' AND "Clinical Trials \u03b2" = '1/7'
### Instruction: CREATE TABLE table_48831 ( "Rank" real, "Location" text, "2008" real, "2009" real, "2010" real, "2011" real, "2012" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which 2012 has a 2011 of 17,142,000, and a 2010 smaller than ...
SELECT MIN("2012") FROM table_48831 WHERE "2011" = '17,142,000' AND "2010" < '16,972,000'
### Instruction: CREATE TABLE medicine_enzyme_interaction ( enzyme_id VARCHAR, medicine_id VARCHAR, interaction_type VARCHAR ) CREATE TABLE medicine ( id VARCHAR, name VARCHAR ) CREATE TABLE enzyme ( name VARCHAR, id VARCHAR ) -- Using valid SQLite, answer the following questions for the...
SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id = T3.id WHERE T3.name = 'Amisulpride' AND T2.interaction_type = 'inhibitor'
### Instruction: CREATE TABLE table_16608 ( "Date" text, "Founder" text, "Extroversion Scales" text, "People-task orientation scale" text, "Introverted, Task-Oriented" text, "Extroverted, Task-Oriented" text, "Extroverted, Relationship-Oriented" text, "Introverted, Relationship Oriented"...
SELECT "People-task orientation scale" FROM table_16608 WHERE "Extroverted, Relationship-Oriented" = 'Team Type'
### 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 pName, HS FROM Player WHERE HS < 1500 ORDER BY pName
### Instruction: CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) CREATE TABLE Allergy_Type ( Aller...
SELECT Allergy, COUNT(*) FROM Has_Allergy GROUP BY Allergy ORDER BY COUNT(*)
### Instruction: CREATE TABLE table_204_119 ( id number, "date" text, "time" text, "opponent" text, "site" text, "tv" text, "result" text, "attendance" number, "record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- after the game on...
SELECT "date" FROM table_204_119 WHERE "date" > (SELECT "date" FROM table_204_119 WHERE "date" = '11/09/2012') AND "attendance" > 5500 ORDER BY "date" LIMIT 1
### Instruction: CREATE TABLE table_9825 ( "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 "I/O bus" FROM table_9825 WHERE "Frequency" = '1.67 ghz' AND "sSpec number" = 'slbmg(a0)'
### Instruction: CREATE TABLE table_12432 ( "Position" real, "Club" text, "Games played" real, "Wins" real, "Draws" real, "Loses" real, "Goals scored" real, "Goals conceded" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT COUNT("Games played") FROM table_12432 WHERE "Goals scored" < '40' AND "Loses" = '9' AND "Goals conceded" = '39' AND "Draws" > '2'
### Instruction: CREATE TABLE table_64212 ( "Position" real, "Gymnast" text, "Floor" text, "Pommel Horse" text, "Rings" text, "Vault" text, "Parallel Bars" text, "Horizontal Bar" text, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided abov...
SELECT "Floor" FROM table_64212 WHERE "Position" < '21' AND "Total" < '81.2' AND "Pommel Horse" = '13.925'
### Instruction: CREATE TABLE journalist ( journalist_id number, name text, nationality text, age text, years_working number ) CREATE TABLE event ( event_id number, date text, venue text, name text, event_attendance number ) CREATE TABLE news_report ( journalist_id number, ...
SELECT T3.name, COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.event_id = T2.event_id JOIN journalist AS T3 ON T1.journalist_id = T3.journalist_id GROUP BY T3.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 bedType, AVG(basePrice) FROM Rooms GROUP BY bedType ORDER BY bedType
### Instruction: CREATE TABLE table_203_857 ( id number, "denomination" text, "1870" text, "1880" text, "1890" text, "1900" text, "1910" text, "1920" text, "1930" text, "1941" text, "1949" text, "2001" text, "2011" text ) -- Using valid SQLite, answer the following ...
SELECT "denomination" FROM table_203_857 ORDER BY "1880" DESC LIMIT 1
### Instruction: CREATE TABLE table_train_204 ( "id" int, "systolic_blood_pressure_sbp" int, "plasma_glucose_concentration" int, "fasting_plasma_glucose_fpg" float, "increase_risk_of_intervention" bool, "diastolic_blood_pressure_dbp" int, "life_span" bool, "body_mass_index_bmi" float, ...
SELECT * FROM table_train_204 WHERE fasting_plasma_glucose_fpg > 126
### Instruction: CREATE TABLE table_9609 ( "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 "Last 10 Meetings" FROM table_9609 WHERE "Overall Record" = '*as of march 14, 2013'
### Instruction: CREATE TABLE browser ( id int, name text, market_share real ) CREATE TABLE accelerator_compatible_browser ( accelerator_id int, browser_id int, compatible_since_year int ) CREATE TABLE Web_client_accelerator ( id int, name text, Operating_system text, Client te...
SELECT name, id FROM Web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id ORDER BY id
### Instruction: CREATE TABLE table_28372 ( "Name" text, "GP" real, "Solo" real, "Ast" real, "Total" real, "TFL-Yds" text, "No-Yds" text, "BrUp" real, "No.-Yds" text, "Avg" text, "TD" real, "Long" real, "Rcv-Yds" text, "FF" real, "Blkd Kick" real ) -- Using ...
SELECT "Name" FROM table_28372 WHERE "TFL-Yds" = '2-2'
### Instruction: CREATE TABLE Companies ( id int, name text, Headquarters text, Industry text, Sales_billion real, Profits_billion real, Assets_billion real, Market_Value_billion text ) CREATE TABLE buildings ( id int, name text, City text, Height int, Stories int, ...
SELECT name, Assets_billion FROM Companies ORDER BY name
### Instruction: CREATE TABLE journal_committee ( Editor_ID int, Journal_ID int, Work_Type text ) CREATE TABLE editor ( Editor_ID int, Name text, Age real ) CREATE TABLE journal ( Journal_ID int, Date text, Theme text, Sales int ) -- Using valid SQLite, answer the following q...
SELECT Name, COUNT(Name) FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID WHERE T3.Sales > 3000 GROUP BY Name
### Instruction: CREATE TABLE table_75835 ( "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 Air Date that ...
SELECT "Air Date" FROM table_75835 WHERE "18\u201349" > '1.9' AND "Viewers" < '7.54' AND "Rating" < '4.9'
### Instruction: CREATE TABLE table_204_971 ( id number, "m" number, "date" text, "tournament" text, "round" text, "ground" text, "opponent" text, "score" text, "attendance" number, "dinamo scorers" text, "report" text ) -- Using valid SQLite, answer the following questions...
SELECT COUNT("tournament") FROM table_204_971 WHERE "date" <> '19 aug' AND "attendance" = (SELECT "attendance" FROM table_204_971 WHERE "date" = '19 aug')
### Instruction: CREATE TABLE table_65384 ( "Team" text, "2002 Position" real, "2003 Position" real, "Total Position" real, "Qualification" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Team has a Qualification of entry to the 2004 chinese su...
SELECT "Team" FROM table_65384 WHERE "Qualification" = 'entry to the 2004 chinese super league' AND "2002 Position" < '6' AND "2003 Position" < '9' AND "Total Position" > '3.5'
### Instruction: CREATE TABLE restaurant_type ( restypeid number, restypename text, restypedescription text ) CREATE TABLE type_of_restaurant ( resid number, restypeid number ) CREATE TABLE restaurant ( resid number, resname text, address text, rating number ) CREATE TABLE visits_...
SELECT resname FROM restaurant