instruction
stringlengths
212
6.3k
output
stringlengths
6
2.03k
### Instruction: CREATE TABLE camera_lens ( id int, brand text, name text, focal_length_mm real, max_aperture real ) CREATE TABLE photos ( id int, camera_lens_id int, mountain_id int, color text, name text ) CREATE TABLE mountain ( id int, name text, Height real, ...
SELECT color, COUNT(color) FROM photos GROUP BY color ORDER BY COUNT(color)
### Instruction: CREATE TABLE artist ( name VARCHAR, artist_id VARCHAR ) CREATE TABLE exhibition ( exhibition_id VARCHAR, artist_id VARCHAR ) CREATE TABLE exhibition_record ( exhibition_id VARCHAR, attendance INTEGER ) -- Using valid SQLite, answer the following questions for the tables prov...
SELECT T3.name FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id JOIN artist AS T3 ON T3.artist_id = T2.artist_id GROUP BY T3.artist_id HAVING AVG(T1.attendance) > 200
### Instruction: CREATE TABLE table_65967 ( "School" text, "Location" text, "Mascot" text, "Size" real, "IHSAA Class" text, "County" text, "Year Joined" real, "Previous Conference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Yea...
SELECT AVG("Year Joined") FROM table_65967 WHERE "Size" > '93' AND "Previous Conference" = 'none (new school)' AND "Mascot" = 'rebels'
### Instruction: CREATE TABLE table_204_135 ( id number, "position" number, "club" text, "played" number, "points" number, "wins" number, "draws" number, "losses" number, "goals for" number, "goals against" number, "goal difference" number ) -- Using valid SQLite, answer th...
SELECT (SELECT "points" FROM table_204_135 ORDER BY "position" LIMIT 1) - (SELECT "points" FROM table_204_135 ORDER BY "position" DESC LIMIT 1)
### Instruction: CREATE TABLE region ( Region_id int, Region_code text, Region_name text ) CREATE TABLE storm ( Storm_ID int, Name text, Dates_active text, Max_speed int, Damage_millions_USD real, Number_Deaths int ) CREATE TABLE affected_region ( Region_id int, Storm_ID in...
SELECT Name, Damage_millions_USD FROM storm ORDER BY Max_speed DESC
### Instruction: CREATE TABLE table_8546 ( "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 follo...
SELECT "Points for" FROM table_8546 WHERE "Losing bonus" = '2' AND "Club" = 'bridgend sports rfc'
### Instruction: CREATE TABLE table_37791 ( "County" text, "Irish name" text, "County town" text, "Most populous city/town" text, "Province" text, "Region" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Most populous city/town of clonmel, and a ...
SELECT "Region" FROM table_37791 WHERE "Most populous city/town" = 'clonmel' AND "Irish name" = 'tiobraid árann (contae thiobraid árann)'
### Instruction: CREATE TABLE table_204_812 ( id number, "#" number, "prime minister" text, "date of birth" text, "start date\nof (first) term" text, "age at beginning\nof (first) term" text, "end date\nof (final) term" text, "total time in\noffice" text, "date of death" text, "l...
SELECT "total time in\noffice" FROM table_204_812 WHERE "prime minister" = 'chris watson'
### Instruction: CREATE TABLE table_1278 ( "Mission name" text, "Lunar lander" text, "Lunar landing date" text, "Lunar blastoff date" text, "Lunar landing site" text, "Duration on lunar surface" text, "Crew" text, "Number of s EVA" real, "Total EVA Time (HH:MM)" text ) -- Using val...
SELECT COUNT("Lunar blastoff date") FROM table_1278 WHERE "Mission name" = 'Apollo 11'
### Instruction: CREATE TABLE table_20641 ( "Danish name" text, "English name" text, "Seat of administration" text, "Largest city" text, "Population (January 1, 2008)" real, "Area (km\u00b2)" real, "Pop. density (per km\u00b2)" text ) -- Using valid SQLite, answer the following questions f...
SELECT MIN("Population (January 1, 2008)") FROM table_20641 WHERE "Largest city" = 'Roskilde'
### Instruction: CREATE TABLE table_train_261 ( "id" int, "allergy_to_biological_products" bool, "renal_disease" bool, "bursing_mothers" bool, "metabolic_bone_disease" bool, "liver_disease" bool, "allergy_to_drug" bool, "alcohol_abuse" bool, "drug_abuse" bool, "NOUSE" float ) -...
SELECT * FROM table_train_261 WHERE metabolic_bone_disease = 1
### Instruction: 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, born_state text, age real ) CREATE TABLE management ( department_ID int, head_I...
SELECT born_state, AVG(age) FROM head GROUP BY born_state ORDER BY born_state DESC
### Instruction: CREATE TABLE table_20377 ( "N\u00b0" real, "Television service" text, "Country" text, "Language" text, "Content" text, "DAR" text, "HDTV" text, "PPV" text, "Package/Option" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT "HDTV" FROM table_20377 WHERE "Package/Option" = 'Sky Famiglia' AND "DAR" = '16:9' AND "Television service" = 'myDeejay'
### Instruction: CREATE TABLE table_70625 ( "Position" text, "Name" text, "Height" text, "Weight (lbs.)" real, "Hometown" text, "Draft Year" real, "Pick" text, "All-Stars" text, "NBA Championships" text, "NBA Team" text ) -- Using valid SQLite, answer the following questions fo...
SELECT "Pick" FROM table_70625 WHERE "Height" = '6''9' AND "Weight (lbs.)" = '215'
### Instruction: CREATE TABLE mission ( Mission_ID int, Ship_ID int, Code text, Launched_Year int, Location text, Speed_knots int, Fate text ) CREATE TABLE ship ( Ship_ID int, Name text, Type text, Nationality text, Tonnage int ) -- Using valid SQLite, answer the follo...
SELECT Nationality, COUNT(Nationality) FROM ship GROUP BY Type, Nationality ORDER BY Nationality
### Instruction: CREATE TABLE table_203_7 ( id number, "pos." number, "artist" text, "single" text, "year" number, "sales" number, "peak" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- elton john released the candle in the wind , the # 2 h...
SELECT "single" FROM table_203_7 WHERE "artist" = 'elton john' AND "single" <> '"candle in the wind"'
### Instruction: CREATE TABLE table_35525 ( "Position" real, "Team" text, "Played" real, "Wins" real, "Draws" real, "Losses" real, "Scored" real, "Conceded" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lo...
SELECT MIN("Conceded") FROM table_35525 WHERE "Wins" < '8' AND "Scored" = '21' AND "Points" < '23'
### Instruction: CREATE TABLE table_16179 ( "Institution" text, "Location" text, "Men\u2019s Nickname" text, "Women\u2019s Nickname" text, "Founded" real, "Type" text, "Enrollment" real, "Joined" text, "Left" text, "Current Conference" text, "Classification" text ) -- Using...
SELECT "Joined" FROM table_16179 WHERE "Women\u2019s Nickname" = 'Wolfpack'
### Instruction: CREATE TABLE broadcast ( channel_id number, program_id number, time_of_day text ) CREATE TABLE channel ( channel_id number, name text, owner text, share_in_percent number, rating_in_percent number ) CREATE TABLE broadcast_share ( channel_id number, program_id n...
SELECT name FROM program ORDER BY launch
### 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 name, openning_year, capacity FROM cinema
### Instruction: CREATE TABLE head ( head_ID int, name text, born_state text, age real ) 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_Billi...
SELECT Creation, COUNT(Creation) FROM department ORDER BY Creation
### Instruction: CREATE TABLE table_42947 ( "Federal State" text, "Number of Members" real, "% Of total Members" text, "Population (on the census also called Censo 2010)" text, "% Of the population (Censo 2010)" text, "Representativeness (Inhabitants / Mr)" text, "Representatives of national...
SELECT "Federal State" FROM table_42947 WHERE "Representatives of national average" = '6'
### Instruction: CREATE TABLE table_80040 ( "Episode" text, "First aired" text, "Entrepreneur(s)" text, "Company or product name" text, "Money requested (\u00a3)" real, "Investing Dragon(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is...
SELECT AVG("Money requested (\u00a3)") FROM table_80040 WHERE "First aired" = '18 january 2005' AND "Company or product name" = 'iv cam'
### Instruction: CREATE TABLE table_26563 ( "DVD Name" text, "Ep #" text, "Region 1 (US)" text, "Region 1 (CAN)" text, "Region 2 (UK)" text, "Region 2 (Germany)" text, "Region 4 (Australia)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Wha...
SELECT "Region 4 (Australia)" FROM table_26563 WHERE "Region 1 (US)" = 'January 16, 2007'
### Instruction: CREATE TABLE table_31003 ( "Movies" text, "December 25" text, "December 26" text, "December 27" text, "December 28" text, "December 25-28 total" text, "Total 2-week Gross" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What ...
SELECT "December 25" FROM table_31003 WHERE "December 25-28 total" = 'P15.3 million'
### Instruction: CREATE TABLE table_44684 ( "Rank" real, "Mine" text, "County and State" text, "Operator" text, "Source of copper" text, "Capacity (thousands of metric tons)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In Pinal County, Arizon...
SELECT "Mine" FROM table_44684 WHERE "Rank" < '14' AND "Capacity (thousands of metric tons)" > '5' AND "County and State" = 'pinal county, arizona'
### Instruction: CREATE TABLE film ( Film_ID int, Title text, Studio text, Director text, Gross_in_dollar 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...
SELECT Studio, COUNT(*) FROM film GROUP BY Studio ORDER BY Studio
### Instruction: CREATE TABLE table_72258 ( "Year" real, "Premier One" text, "Premier Two" text, "Bristol & Somerset" text, "Glos & Wilts" text, "Bristol & N. Som" text, "Somerset" text, "Gloucestershire" text, "Wiltshire" text ) -- Using valid SQLite, answer the following question...
SELECT "Bristol & N. Som" FROM table_72258 WHERE "Somerset" = 'Ashcott and Shapwick'
### Instruction: CREATE TABLE table_name_8 ( killeen_rate INTEGER, crime VARCHAR, texas_rate VARCHAR, reported_offenses VARCHAR, us_rate VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Reported Offenses larger than 216, and a U.S. Rate smaller tha...
SELECT SUM(killeen_rate) FROM table_name_8 WHERE reported_offenses > 216 AND us_rate < 3274 AND texas_rate < 2688.9 AND crime = "violent crime"
### 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 T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Name DESC
### Instruction: CREATE TABLE table_53201 ( "MLB season" text, "Reds season" real, "League" text, "Division" text, "Finish" text, "Wins" real, "Losses" real, "Win%" real, "GB [c ]" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How m...
SELECT AVG("Wins") FROM table_53201 WHERE "Division" = 'central' AND "Reds season" < '2000' AND "Losses" < '81'
### Instruction: CREATE TABLE table_train_160 ( "id" int, "alt" float, "systolic_blood_pressure_sbp" int, "ast" float, "platelet_count" float, "diastolic_blood_pressure_dbp" int, "serum_creatinine" float, "triglyceride_tg" float, "hypertension" bool, "NOUSE" float ) -- Using va...
SELECT * FROM table_train_160 WHERE alt > 3 OR ast > 3
### Instruction: CREATE TABLE table_72826 ( "Rank" real, "Company" text, "Headquarters" text, "Industry" text, "Sales (billion $)" text, "Profits (billion $)" text, "Assets (billion $)" text, "Market Value (billion $)" text ) -- Using valid SQLite, answer the following questions for th...
SELECT "Profits (billion $)" FROM table_72826 WHERE "Market Value (billion $)" = '204.9'
### Instruction: CREATE TABLE table_2430 ( "Period" text, "Births" text, "Deaths" text, "Difference" text, "Crude Birth Rate" real, "Crude Death Rate" real, "Natural Increase" real, "Total Fertility Rate" real, "Infant Mortality Rate" real ) -- Using valid SQLite, answer the follow...
SELECT MIN("Infant Mortality Rate") FROM table_2430 WHERE "Period" = '1985 - 1990'
### 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 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)
### Instruction: CREATE TABLE table_29464 ( "#" real, "Episode" text, "Air Date" text, "Rating" text, "Share" text, "18-49 (Rating/Share)" text, "Viewers (m)" text, "Weekly Rank (#)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- when ai...
SELECT "18-49 (Rating/Share)" FROM table_29464 WHERE "Air Date" = 'October 14, 2010'
### Instruction: CREATE TABLE table_20959 ( "Country" text, "Skip" text, "W" real, "L" real, "PF" real, "PA" real, "Ends Won" real, "Ends Lost" real, "Blank Ends F/A" text, "Stolen Ends For" real, "Stolen Ends Against" real, "Shot %" real ) -- Using valid SQLite, answer...
SELECT "Skip" FROM table_20959 WHERE "Stolen Ends Against" = '13'
### 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(*) DESC
### Instruction: CREATE TABLE table_21119 ( "Rank" real, "Company" text, "Headquarters" text, "Industry" text, "Sales (billion $)" text, "Profits (billion $)" text, "Assets (billion $)" text, "Market Value (billion $)" text ) -- Using valid SQLite, answer the following questions for th...
SELECT "Market Value (billion $)" FROM table_21119 WHERE "Assets (billion $)" = '1,380.88'
### Instruction: CREATE TABLE table_name_71 ( part_number_s_ VARCHAR, sspec_number VARCHAR, l2_cache VARCHAR, release_date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the part number(s) when l2 cache is 512 kb, release date is june 2001 an...
SELECT part_number_s_ FROM table_name_71 WHERE l2_cache = "512 kb" AND release_date = "june 2001" AND sspec_number = "sl5lv, sl5pu, sl6bw, sl6jm"
### Instruction: CREATE TABLE table_27772 ( "City/ municipality" text, "Type" text, "No. of Barangays" real, "Population (2010)" real, "Area (km\u00b2)" text, "Pop. density (per km\u00b2)" real, "Income Class" text, "Zip Code" real ) -- Using valid SQLite, answer the following question...
SELECT "Area (km\u00b2)" FROM table_27772 WHERE "Population (2010)" = '38062'
### Instruction: CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), AllergyType VARCHAR(20) ) 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 (...
SELECT city_code, COUNT(*) FROM Student GROUP BY city_code
### Instruction: CREATE TABLE table_203_387 ( id number, "parish est" number, "church" text, "city" text, "current bldg begun" number, "weekly collections" text, "notes" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how much more are the ...
SELECT (SELECT "weekly collections" FROM table_203_387 WHERE "church" = 'cathedral of christ the king') - (SELECT "weekly collections" FROM table_203_387 WHERE "church" = 'most blessed sacrament catholic church')
### Instruction: CREATE TABLE table_57930 ( "Episode" text, "Air Date" text, "Rating" real, "Share" real, "Rating/Share 18\u201349" text, "Viewers (m)" real, "Timeslot Rank" real, "Night Rank" text, "Overall Rank" real ) -- Using valid SQLite, answer the following questions for the...
SELECT AVG("Overall Rank") FROM table_57930 WHERE "Share" = '6' AND "Timeslot Rank" < '4'
### 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 election_cycle, COUNT(*) FROM voting_record GROUP BY election_cycle
### Instruction: CREATE TABLE table_56766 ( "Grade" text, "Points" real, "Sit-up (reps)" text, "Standing Broad Jump (cm)" text, "Chin-up (reps)" text, "Shuttle Run (sec)" text, "2.4km Run (min:sec)" text ) -- Using valid SQLite, answer the following questions for the tables provided above....
SELECT "Grade" FROM table_56766 WHERE "2.4km Run (min:sec)" = '13:01-13:40'
### Instruction: CREATE TABLE table_36016 ( "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 Rank has an Overall WC p...
SELECT AVG("Rank") FROM table_36016 WHERE "Overall WC points (Rank)" = '1561 (2)' AND "1st (m)" > '217'
### Instruction: CREATE TABLE table_203_613 ( id number, "formula" text, "color" text, "symmetry" text, "space group" text, "no" number, "pearson symbol" text, "a (pm)" number, "b (pm)" number, "c (pm)" number, "z" number, "density, g/cm3" number ) -- Using valid SQLite...
SELECT COUNT("formula") FROM table_203_613 WHERE "symmetry" = 'monoclinic'
### Instruction: CREATE TABLE rooms ( roomid text, roomname text, beds number, bedtype text, maxoccupancy number, baseprice number, decor text ) CREATE TABLE reservations ( code number, room text, checkin text, checkout text, rate number, lastname text, firstname...
SELECT T2.roomname FROM reservations AS T1 JOIN rooms AS T2 ON T1.room = T2.roomid WHERE firstname LIKE '%ROY%'
### 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.Manufacturer, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code
### Instruction: CREATE TABLE table_67688 ( "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 "Club" FROM table_67688 WHERE "Lost" = '9' AND "Tries for" = '55'
### Instruction: CREATE TABLE church ( Church_ID int, Name text, Organized_by text, Open_Date int, Continuation_of text ) 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_...
SELECT Country, COUNT(Country) FROM people WHERE Age < (SELECT AVG(Age) FROM people) GROUP BY Country
### Instruction: CREATE TABLE music_festival ( id number, music_festival text, date_of_ceremony text, category text, volume number, result text ) CREATE TABLE artist ( artist_id number, artist text, age number, famous_title text, famous_release_date text ) CREATE TABLE volu...
SELECT DISTINCT (famous_release_date) FROM artist
### Instruction: CREATE TABLE table_24982 ( "Year" text, "Chairman" text, "Artistic Director" text, "Performance Liaison" text, "Secretary" text, "Business manager" text, "Production Stagemanager" text, "Dramaturge" text, "Public Relations" text, "First/Second Year Rep." text, ...
SELECT COUNT("Production Stagemanager") FROM table_24982 WHERE "Secretary" = 'Rachel Hartmann'
### Instruction: CREATE TABLE table_53121 ( "City district" text, "Area km\u00b2" text, "Population 2007 census(hab)" text, "Housing (2007)" text, "Density (hab/km\u00b2)" text, "Elevation msl" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What...
SELECT "Elevation msl" FROM table_53121 WHERE "Housing (2007)" = '91,385'
### Instruction: CREATE TABLE table_18946 ( "Trim" text, "Engine" text, "Displacement" text, "Power" text, "Torque" text, "Transmission" text, "Fuel Mileage (latest EPA mpg - US )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the tr...
SELECT "Trim" FROM table_18946 WHERE "Fuel Mileage (latest EPA mpg - US )" = '22 city, 30 hwy, 25 comb'
### 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 Name, Code FROM Products WHERE Price BETWEEN 60 AND 120 ORDER BY Name
### 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, SUM(Height) FROM people GROUP BY Sex ORDER BY Sex DESC
### Instruction: CREATE TABLE table_31030 ( "Song 1 title" text, "Artist 1" text, "Song 2 title" text, "Artist 2" text, "Mix artist" text, "Venue" text, "Battle Mix?" text, "Setlist" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is ...
SELECT "Mix artist" FROM table_31030 WHERE "Setlist" = 'Closing Party' AND "Artist 1" = 'Dillinja and Skibadee'
### Instruction: CREATE TABLE table_48329 ( "Model Number" text, "Clock Speed" text, "L2 Cache" text, "FSB Speed" text, "Clock Multiplier" text, "Voltage Range" text, "Socket" text, "Release Date" text ) -- Using valid SQLite, answer the following questions for the tables provided abov...
SELECT "Clock Speed" FROM table_48329 WHERE "FSB Speed" = '400 mhz' AND "Model Number" = 'c7-m 794'
### Instruction: CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Allergy_Type ( Aller...
SELECT Advisor, COUNT(*) FROM Student GROUP BY Advisor
### Instruction: CREATE TABLE table_65955 ( "School" text, "Location" text, "Mascot" text, "Enrollment 08-09" real, "IHSAA Class / Football Class" text, "County" text, "Year Joined" real, "Previous Conference" text, "Year Left" real, "Conference Joined" text ) -- Using valid SQ...
SELECT "Mascot" FROM table_65955 WHERE "IHSAA Class / Football Class" = '2a/2a'
### Instruction: CREATE TABLE table_79621 ( "Player" text, "Played" 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 questions for the tables provided above. --...
SELECT COUNT("3-dart Average") FROM table_79621 WHERE "Legs Lost" > '41' AND "Played" > '7'
### Instruction: CREATE TABLE table_80381 ( "Year" text, "Men's singles" text, "Women's singles" text, "Men's doubles" text, "Women's doubles" text, "Mixed doubles" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who won the Women's singles, in t...
SELECT "Women's singles" FROM table_80381 WHERE "Men's singles" = 'raymond m. white' AND "Men's doubles" = 'w. hamilton ian maconachie'
### Instruction: CREATE TABLE shop ( Shop_ID int, Shop_Name text, Location text, Open_Date text, Open_Year int ) CREATE TABLE device ( Device_ID int, Device text, Carrier text, Package_Version text, Applications text, Software_Platform text ) CREATE TABLE stock ( Shop_I...
SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform ORDER BY Software_Platform
### Instruction: CREATE TABLE table_46800 ( "Year" real, "Starts" real, "Wins" real, "Top 5" real, "Top 10" real, "Poles" real, "Avg. Start" real, "Avg. Finish" real, "Winnings" text, "Position" text, "Team(s)" text ) -- Using valid SQLite, answer the following questions fo...
SELECT AVG("Starts") FROM table_46800 WHERE "Wins" > '0' AND "Position" = '32nd'
### Instruction: CREATE TABLE table_72372 ( "Country" text, "Total Drivers" real, "Champions" text, "Championships" text, "Current September 22, 2013" real, "First driver(s)" text, "Last/Current driver(s) September 22, 2013" text ) -- Using valid SQLite, answer the following questions for ...
SELECT "Champions" FROM table_72372 WHERE "First driver(s)" = 'Hiroki Yoshimoto ( 2005 )'
### Instruction: CREATE TABLE table_71893 ( "Episode" text, "First aired" text, "Entrepreneur(s)" text, "Company or product name" text, "Money requested (\u00a3)" text, "Investing Dragon(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What wa...
SELECT "Company or product name" FROM table_71893 WHERE "Money requested (\u00a3)" = '75,000' AND "Entrepreneur(s)" = 'geoff and colette bell'
### Instruction: CREATE TABLE table_203_112 ( id number, "choke" text, "constriction (inch)" number, "percentage of lead shot in 30-inch circle at 40 yards" text, "identification (notches)" number, "identification (stars)\n(spanish shotguns)" number ) -- Using valid SQLite, answer the followin...
SELECT "choke" FROM table_203_112 WHERE "identification (notches)" = '1' ORDER BY "percentage of lead shot in 30-inch circle at 40 yards" DESC LIMIT 1
### Instruction: CREATE TABLE table_18042 ( "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 "U.S. viewers (millions)" FROM table_18042 WHERE "Original air date" = 'November 13, 2007'
### Instruction: CREATE TABLE table_76802 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Heat points" real, "Opponents" real, "Record" text, "Streak" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Heat P...
SELECT AVG("Heat points") FROM table_76802 WHERE "Result" = 'loss' AND "Game" > '72' AND "Date" = 'april 21'
### Instruction: CREATE TABLE table_203_89 ( id number, "#" number, "name\n(birth-death)" text, "took office" text, "left office" text, "monarch" text, "prime minister" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who took office after the...
SELECT "name\n(birth-death)" FROM table_203_89 WHERE "took office" > (SELECT "took office" FROM table_203_89 WHERE "name\n(birth-death)" = 'the earl of athlone') ORDER BY "took office" LIMIT 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, AVG(Height) FROM people GROUP BY Sex ORDER BY Sex
### Instruction: CREATE TABLE table_9670 ( "Team" text, "Average" real, "Points" real, "Played" real, "1992-93" text, "1993-94" text, "1994-1995" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest 1994-1995, when Points is 145...
SELECT MIN("1994-1995") FROM table_9670 WHERE "Points" = '145' AND "Played" < '114'
### Instruction: CREATE TABLE table_24687 ( "Position" real, "Club" text, "Played" real, "H-Win" real, "H-Draw" real, "A-Win" real, "A-Draw" real, "Lost" real, "Def." real, "Pts For" real, "Pts Agst" real, "Pair" real, "Long" real, "Points" real, "Average" tex...
SELECT MAX("Pts Agst") FROM table_24687
### 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 T2.Height
### Instruction: CREATE TABLE table_40919 ( "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 MAX("Points") FROM table_40919 WHERE "Goals scored" < '25' AND "Draws" = '3' AND "Games played" > '21'
### Instruction: CREATE TABLE actor ( Actor_ID int, Name text, Musical_ID int, Character text, Duration text, age int ) CREATE TABLE musical ( Musical_ID int, Name text, Year int, Award text, Category text, Nominee text, Result text ) -- Using valid SQLite, answer ...
SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID ORDER BY T2.Name
### Instruction: CREATE TABLE table_26450 ( "Name" text, "Nationality" text, "Position" text, "Athletica career" text, "Appearances" real, "Starts" real, "Minutes" real, "Goals" real, "Assists" real ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT "Nationality" FROM table_26450 WHERE "Minutes" = '0' AND "Position" = 'MF' AND "Athletica career" = '2009'
### Instruction: CREATE TABLE Accounts ( account_name VARCHAR, other_account_details VARCHAR, customer_id VARCHAR ) CREATE TABLE Customers ( customer_id VARCHAR, customer_first_name VARCHAR, customer_last_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables prov...
SELECT T1.account_name, T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Meaghan" AND T2.customer_last_name = "Keeling"
### 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, MAX(T1.Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name
### Instruction: CREATE TABLE table_17502 ( ".308 Winchester cartridge type" text, "100 m group (mm)" text, "100 m group ( MOA )" text, "300 m group (mm)" text, "300 m group ( MOA )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are all the 10...
SELECT "100 m group (mm)" FROM table_17502 WHERE ".308 Winchester cartridge type" = '.300 Winchester Magnum cartridge type'
### Instruction: CREATE TABLE party_host ( Party_ID int, Host_ID int, Is_Main_in_Charge bool ) 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, ...
SELECT Nationality, COUNT(*) FROM host GROUP BY Nationality ORDER BY COUNT(*)
### Instruction: CREATE TABLE grapes ( id number, grape text, color text ) CREATE TABLE appellations ( no number, appelation text, county text, state text, area text, isava text ) CREATE TABLE wine ( no number, grape text, winery text, appelation text, state tex...
SELECT winery FROM wine GROUP BY winery HAVING COUNT(*) >= 4
### Instruction: CREATE TABLE table_name_75 ( winning_team VARCHAR, winning_driver VARCHAR, circuit VARCHAR, fastest_lap VARCHAR, pole_position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Winning Team has the Fastest Lap of brendon hartl...
SELECT winning_team FROM table_name_75 WHERE fastest_lap = "brendon hartley" AND pole_position = "oliver turvey" AND circuit = "spa-francorchamps" AND winning_driver = "brendon hartley"
### Instruction: CREATE TABLE table_25110 ( "#" 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 COUNT("Pop./ km\u00b2") FROM table_25110 WHERE "Administrative centre" = 'Egilsstaðir'
### Instruction: CREATE TABLE table_48149 ( "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, "Since Joining SEC" text ) -- Using valid SQLite, ...
SELECT "at Opponent's Venue" FROM table_48149 WHERE "Missouri vs." = 'tennessee'
### Instruction: CREATE TABLE table_53761 ( "Candidate" text, "Money Raised, 3Q" text, "Loans Received, 3Q" text, "Money Spent, 3Q" text, "Total Receipts" text, "Cash On Hand" text, "Total Debt" text, "After Debt" text ) -- Using valid SQLite, answer the following questions for the tab...
SELECT "Total Receipts" FROM table_53761 WHERE "Money Raised, 3Q" = '$925,745'
### Instruction: CREATE TABLE table_train_220 ( "id" int, "hemoglobin_a1c_hba1c" float, "renal_disease" bool, "creatinine_clearance_cl" float, "fasting_plasma_glucose" int, "hba1c" float, "serum_creatinine" float, "body_mass_index_bmi" float, "NOUSE" float ) -- Using valid SQLite, ...
SELECT * FROM table_train_220 WHERE serum_creatinine < 1.8
### Instruction: CREATE TABLE table_65943 ( "Peak" text, "Country" text, "Elevation (m)" real, "Prominence (m)" real, "Col (m)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest elevation in m of moldoveanu peak, which has a prominen...
SELECT MIN("Elevation (m)") FROM table_65943 WHERE "Prominence (m)" < '2,103' AND "Peak" = 'moldoveanu peak' AND "Col (m)" < '498'
### Instruction: CREATE TABLE table_9391 ( "Team" text, "First NHL season" text, "Last NHL season" text, "Seasons completed" real, "Playoff appearances" real, "Series won" real, "Finals appearances" real, "Division titles" real, "Conference titles" real, "Stanley Cup Championship...
SELECT SUM("Division titles") FROM table_9391 WHERE "Playoff appearances" = '23' AND "Conference titles" > '1'
### Instruction: CREATE TABLE shop ( Shop_ID int, Shop_Name text, Location text, Open_Date text, Open_Year int ) CREATE TABLE device ( Device_ID int, Device text, Carrier text, Package_Version text, Applications text, Software_Platform text ) CREATE TABLE stock ( Shop_I...
SELECT Location, COUNT(Location) FROM shop GROUP BY Location ORDER BY COUNT(Location) DESC
### Instruction: CREATE TABLE advisor ( i_id VARCHAR, s_id VARCHAR ) CREATE TABLE student ( id VARCHAR, dept_name VARCHAR, tot_cred VARCHAR ) CREATE TABLE instructor ( name VARCHAR, id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find...
SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math' ORDER BY T3.tot_cred
### 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 Name, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 ORDER BY Manufacturer DESC
### Instruction: CREATE TABLE table_44114 ( "Year" real, "Regional GVA" real, "Agriculture" real, "Industry" real, "Services" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of Agriculture, when Regional GVA is greater than 6,584, whe...
SELECT SUM("Agriculture") FROM table_44114 WHERE "Regional GVA" > '6,584' AND "Services" > '7,502' AND "Industry" > '1,565'
### Instruction: CREATE TABLE table_28087 ( "Episode Number" real, "Episode" text, "Rating" text, "Share" real, "Rating/Share (18-49)" text, "Viewers (millions)" text, "Rank (Timeslot)" real, "Rank (Night)" real ) -- Using valid SQLite, answer the following questions for the tables pro...
SELECT MIN("Episode Number") FROM table_28087 WHERE "Rating/Share (18-49)" = '1.1/3'
### Instruction: CREATE TABLE table_train_154 ( "id" int, "systolic_blood_pressure_sbp" int, "fpg" float, "hemoglobin_a1c_hba1c" float, "creatinine_clearance_cl" float, "diastolic_blood_pressure_dbp" int, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables ...
SELECT * FROM table_train_154 WHERE fpg > 125 OR fpg < 105
### Instruction: CREATE TABLE table_40290 ( "Week of" text, "Tier" text, "Winner" text, "Runner-up" text, "Semi finalists" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Runner-up with the tier was tier ii, and a Winner of gigi fern ndez...
SELECT "Runner-up" FROM table_40290 WHERE "Tier" = 'tier ii' AND "Winner" = 'gigi fernández natalia zvereva 5–7, 6–1, 6–4'
### Instruction: CREATE TABLE table_76680 ( "Episode number" real, "Episode" text, "Rating" real, "Share" real, "Rating/Share (18-49)" text, "Viewers (millions)" real, "Rank (Overall)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS T...
SELECT COUNT("Rating") FROM table_76680 WHERE "Share" < '4' AND "Viewers (millions)" > '2.47'
### Instruction: CREATE TABLE table_train_249 ( "id" int, "gender" string, "allergy_to_dapagliflozin" bool, "body_weight" float, "estimated_glomerular_filtration_rate_egfr" int, "body_mass_index_bmi" float, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questi...
SELECT * FROM table_train_249 WHERE estimated_glomerular_filtration_rate_egfr < 60