instruction
stringlengths
212
6.3k
output
stringlengths
6
2.03k
### Instruction: CREATE TABLE table_30679 ( "Couple" text, "Style" text, "Music" text, "Trine Dehli Cleve" real, "Tor Fl\u00f8ysvik" real, "Karianne Gulliksen" real, "Christer Tornell" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided ab...
SELECT "Style" FROM table_30679 WHERE "Tor Fl\u00f8ysvik" = '8'
### Instruction: CREATE TABLE table_69678 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On July 26, 1977, what competition played at the venue of Kuala Lumpur, resulted in 4-0?...
SELECT "Competition" FROM table_69678 WHERE "Venue" = 'kuala lumpur' AND "Result" = '4-0' AND "Date" = 'july 26, 1977'
### Instruction: CREATE TABLE table_57913 ( "Race" text, "Circuit" text, "Date" text, "Pole position" text, "Fastest lap" text, "Winning driver" text, "Constructor" text, "Tyre" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided abov...
SELECT "Race" FROM table_57913 WHERE "Pole position" = 'jim clark' AND "Circuit" = 'monaco'
### Instruction: CREATE TABLE table_576 ( "Club" text, "Played" text, "Won" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text ) -- Using valid SQLite, a...
SELECT "Played" FROM table_576 WHERE "Club" = 'Tumble RFC'
### Instruction: CREATE TABLE table_204_661 ( id number, "team" text, "location" text, "home ground" text, "first year in\nqld cup" number, "last year in\nqld cup" number, "qld cup\npremierships" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -...
SELECT "location" FROM table_204_661 WHERE "location" IN ('brisbane', 'townsville') GROUP BY "location" ORDER BY COUNT("team") DESC LIMIT 1
### Instruction: CREATE TABLE table_40194 ( "Club" text, "City" text, "Stadium" text, "2009 season" text, "Group" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Stadium has a City of panama city, and a Group of group a, and a 2009 season of 1s...
SELECT "Stadium" FROM table_40194 WHERE "City" = 'panama city' AND "Group" = 'group a' AND "2009 season" = '1st in lna (champion)'
### Instruction: CREATE TABLE table_6006 ( "Release date" text, "Country" text, "Classifaction" text, "Publisher" text, "Format" text, "Region" text, "Language" text, "Sound" text, "Subtitles" text ) -- Using valid SQLite, answer the following questions for the tables provided abov...
SELECT "Release date" FROM table_6006 WHERE "Subtitles" = 'english' AND "Publisher" = 'magna pacific'
### Instruction: CREATE TABLE table_69428 ( "7:00" text, "7:30" text, "8:00" text, "8:30" text, "9:00" text, "9:30" text, "10:00" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 10:00 feature with 1 vs. 100 at 8:30? ### Response...
SELECT "10:00" FROM table_69428 WHERE "8:30" = '1 vs. 100'
### Instruction: CREATE TABLE table_34633 ( "Spacecraft" text, "Destination" text, "Launched" text, "Closest approach" text, "Time elapsed" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Launched has both a Spacecraft of Ulysses and 491 days (1...
SELECT "Launched" FROM table_34633 WHERE "Spacecraft" = 'ulysses' AND "Time elapsed" = '491 days (1 yr, 4 mo, 3 d)'
### Instruction: CREATE TABLE table_21123 ( "Rank" real, "Company" text, "Country" text, "Industry" text, "Sales (billion $)" text, "Profits (billion $)" text, "Assets (billion $)" text, "Market Value (billion $)" text ) -- Using valid SQLite, answer the following questions for the tab...
SELECT COUNT("Rank") FROM table_21123 WHERE "Profits (billion $)" = '9.52'
### 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 roomname FROM rooms WHERE bedtype = "King" OR bedtype = "Queen"
### Instruction: CREATE TABLE table_204_317 ( id number, "metropolitan area" text, "country" text, "rank" number, "forstall\n2003 est." number, "official population" number, "year" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which popul...
SELECT "official population" FROM table_204_317 WHERE id = (SELECT id FROM table_204_317 WHERE "official population" = 5357422) - 1
### Instruction: CREATE TABLE table_204_575 ( id number, "place" number, "position" text, "number" number, "name" text, "league one" number, "fa cup" number, "league cup" number, "football league trophy" number, "total" number ) -- Using valid SQLite, answer the following quest...
SELECT "name" FROM table_204_575 WHERE id = (SELECT id FROM table_204_575 WHERE "name" = 'jon taylor') - 1
### Instruction: CREATE TABLE table_71349 ( "Rank" real, "Round" text, "Home team" text, "Away team" text, "Result" text, "Location" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many people attended the game when the...
SELECT "Attendance" FROM table_71349 WHERE "Away team" = 'dynamo kyiv' AND "Home team" = 'torpedo zaporizhia'
### 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 Country, COUNT(*) FROM member GROUP BY Country ORDER BY Country
### Instruction: CREATE TABLE table_47251 ( "Barangay" text, "Urban/rural" text, "Geographic character" text, "Population (2007)" real, "Population (2010)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE POPULATION OF 2007 WHEN 2010 POPUL...
SELECT COUNT("Population (2007)") FROM table_47251 WHERE "Population (2010)" < '1282'
### Instruction: CREATE TABLE table_40161 ( "Year" real, "Tournaments played" real, "Cuts made" real, "Wins" real, "Best finish" text, "Earnings ( $ )" text, "Scoring average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total ...
SELECT COUNT("Wins") FROM table_40161 WHERE "Cuts made" = '10' AND "Scoring average" < '74.09'
### 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 title, SUM(stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title ORDER BY SUM(stars)
### Instruction: CREATE TABLE table_58933 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Record" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What week was the game played on November 12, ...
SELECT MIN("Week") FROM table_58933 WHERE "Date" = 'november 12, 1961' AND "Attendance" < '7,859'
### Instruction: CREATE TABLE table_41165 ( "Episode Number" real, "Air Date" text, "Guest Host" text, "Musical Guest (Song performed)" text, "Who knows the most about the guest host? panelists" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was...
SELECT "Guest Host" FROM table_41165 WHERE "Episode Number" < '6' AND "Who knows the most about the guest host? panelists" = 'jade goody and kenzie'
### Instruction: CREATE TABLE table_32930 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When did a crowd larger than 23...
SELECT "Date" FROM table_32930 WHERE "Crowd" > '23,135' AND "Away team score" = '3.8 (26)'
### Instruction: CREATE TABLE table_74618 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the home team for the g...
SELECT "Home team" FROM table_74618 WHERE "Crowd" > '12,000' AND "Away team" = 'north melbourne'
### Instruction: CREATE TABLE table_39770 ( "Time" text, "12:00 PM" text, "01:00 PM" text, "02:00 PM" text, "03:00 PM" text, "04:00 PM" text, "05:00 PM" text, "05:55 PM" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who preforms at 5:55...
SELECT "05:55 PM" FROM table_39770 WHERE "Time" = 'monday'
### Instruction: CREATE TABLE table_6886 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the total number of Top-25 values, for ...
SELECT COUNT("Top-25") FROM table_6886 WHERE "Cuts made" = '62' AND "Wins" < '1'
### Instruction: CREATE TABLE table_72839 ( "Year" real, "Starts" real, "Wins" real, "Top 5" real, "Top 10" real, "Poles" real, "Avg. Start" text, "Avg. Finish" text, "Winnings" text, "Position" text, "Team(s)" text ) -- Using valid SQLite, answer the following questions fo...
SELECT "Starts" FROM table_72839 WHERE "Position" = '16th'
### Instruction: CREATE TABLE table_33350 ( "Translator Call Letters" text, "B Mountain Channel" text, "Laurel Mountain Channel" text, "PSIP" text, "Station Call Letters" text, "Network Affiliation ID" text, "Original Channel" text, "Signal Quality" text ) -- Using valid SQLite, answer...
SELECT "Translator Call Letters" FROM table_33350 WHERE "Station Call Letters" = 'kcop-dt'
### Instruction: CREATE TABLE climber ( Climber_ID int, Name text, Country text, Time text, Points real, Mountain_ID int ) CREATE TABLE mountain ( Mountain_ID int, Name text, Height real, Prominence real, Range text, Country text ) -- Using valid SQLite, answer the fol...
SELECT Country, COUNT(Country) FROM mountain WHERE Height > 5000 GROUP BY Country ORDER BY Country
### Instruction: CREATE TABLE table_74415 ( "Rd." text, "Race" text, "Pole position" text, "Fastest lap" text, "Most laps led" text, "Winning driver" text, "Winning team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What race did josef new...
SELECT "Race" FROM table_74415 WHERE "Fastest lap" = 'Josef Newgarden' AND "Most laps led" = 'Josef Newgarden'
### Instruction: CREATE TABLE table_26202812_7 ( no VARCHAR, score_in_the_final VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which match was the final score 7 6 (7 0) , 6 7 (5 7) , 4 6, 6 2, 6 7 (5 7)? ### Response:
SELECT no FROM table_26202812_7 WHERE score_in_the_final = "7–6 (7–0) , 6–7 (5–7) , 4–6, 6–2, 6–7 (5–7)"
### Instruction: CREATE TABLE table_75339 ( "Station" text, "Services" text, "Local authority" text, "Zone 2007" text, "Zone 2008" text, "Zone 2010" text, "Zone 2013" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Services have a Local...
SELECT "Services" FROM table_75339 WHERE "Local authority" = 'chiltern' AND "Zone 2010" = '9'
### Instruction: CREATE TABLE table_24403 ( "Team name" text, "Races" real, "Won" real, "RR1 Pts." real, "RR2 Pts." real, "RR3 Pts." real, "RR4 Pts." text, "Total Pts." real, "Ranking" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- W...
SELECT "RR4 Pts." FROM table_24403 WHERE "Total Pts." = '70'
### 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 Type, COUNT(Type) FROM ship GROUP BY Nationality, Type ORDER BY COUNT(Type)
### Instruction: CREATE TABLE table_204_191 ( id number, "title" text, "artist" text, "year" text, "location/gps coordinates" text, "material" text, "dimensions" text, "owner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what title was...
SELECT "title" FROM table_204_191 WHERE "title" IN ('george gordon meade memorial', 'american legion freedom bell') ORDER BY "year" LIMIT 1
### Instruction: CREATE TABLE table_44068 ( "Nat." text, "Name" text, "Since" real, "Goals" real, "Ends" text, "Transfer fee" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Name has Ends of 30 june 2010, and a Nation of eng, and Since larg...
SELECT "Name" FROM table_44068 WHERE "Ends" = '30 june 2010' AND "Nat." = 'eng' AND "Since" > '2007'
### Instruction: CREATE TABLE table_6782 ( "Member" text, "Party" text, "Electorate" text, "State" text, "First elected" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which memeber has a first elected of 1972, alp as the party, vic as the state, an...
SELECT "Member" FROM table_6782 WHERE "First elected" = '1972' AND "Party" = 'alp' AND "State" = 'vic' AND "Electorate" = 'gellibrand'
### Instruction: CREATE TABLE table_67434 ( "Season" real, "Year" real, "Wins" real, "Draws" real, "Losses" real, "Regular Season Standing" text, "Final Standing" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many losses occurred with r...
SELECT COUNT("Losses") FROM table_67434 WHERE "Regular Season Standing" = '17th from 20' AND "Year" > '1996'
### Instruction: CREATE TABLE table_30063 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (million)" text ) -- Using valid SQLite, answer the following questions for the t...
SELECT "Written by" FROM table_30063 WHERE "U.S. viewers (million)" = '1.97'
### Instruction: CREATE TABLE table_72331 ( "Club" text, "Played" text, "Won" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text ) -- Using valid SQLite,...
SELECT "Points against" FROM table_72331 WHERE "Points" = '51'
### Instruction: CREATE TABLE table_15199 ( "Tournament" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the 2010 for 2007 of a and 2012 of a ### Response:
SELECT "2010" FROM table_15199 WHERE "2007" = 'a' AND "2012" = 'a'
### Instruction: CREATE TABLE table_42837 ( "Name" text, "Seat" text, "Population (2011)" real, "Area (km 2 )" real, "Density (inhabitants/km 2 )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total area of drakenstein and a population ...
SELECT COUNT("Area (km 2 )") FROM table_42837 WHERE "Name" = 'drakenstein' AND "Population (2011)" < '251,262'
### Instruction: CREATE TABLE table_70629 ( "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 "Tries against" FROM table_70629 WHERE "Points against" = '520'
### Instruction: CREATE TABLE entrepreneur ( entrepreneur_id number, people_id number, company text, money_requested number, investor text ) CREATE TABLE people ( people_id number, name text, height number, weight number, date_of_birth text ) -- Using valid SQLite, answer the ...
SELECT T2.weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id ORDER BY T1.money_requested DESC
### Instruction: CREATE TABLE table_12602 ( "Date" text, "Opponent" text, "Score" text, "Decision" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the record for the game played @ Dallas stars, with an a...
SELECT "Record" FROM table_12602 WHERE "Attendance" > '15,643' AND "Decision" = 'budaj' AND "Opponent" = '@ dallas stars'
### Instruction: CREATE TABLE table_10551 ( "Name" text, "Number" text, "Builder" text, "Date built" text, "Wheel arrangement" text, "Driving wheels" text, "Cylinders" text, "Boiler pressure" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables ...
SELECT "Wheel arrangement" FROM table_10551 WHERE "Cylinders" = '10" x 15'
### Instruction: CREATE TABLE table_17542 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's th...
SELECT MIN("Production code") FROM table_17542 WHERE "Written by" = 'Jay Sommers & Dick Chevillat and Al Schwartz'
### Instruction: CREATE TABLE table_34451 ( "Position" real, "Club (City/Town)" text, "Games Played" real, "W-L-D" text, "Goals For/Against" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the position number of the club wi...
SELECT COUNT("Position") FROM table_34451 WHERE "Points" > '24' AND "W-L-D" = '8-5-3'
### Instruction: CREATE TABLE table_12918 ( "Club" text, "Games" real, "Wins" real, "Losses" real, "Draws" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of Games, when Losses is greater than 6, when Club is 'Club Sportif Sf...
SELECT COUNT("Games") FROM table_12918 WHERE "Losses" > '6' AND "Club" = 'club sportif sfaxien' AND "Wins" < '3'
### Instruction: CREATE TABLE table_58690 ( "Stage" text, "Winner" text, "General classification" text, "Mountains classification" text, "Points classification" text, "Team Classification" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team...
SELECT "Team Classification" FROM table_58690 WHERE "Points classification" = 'alejandro valverde' AND "Winner" = 'alejandro valverde' AND "Stage" = '3'
### Instruction: CREATE TABLE table_14632 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average rank Finland, which has 1 bronze, more than 1 silver, a...
SELECT AVG("Rank") FROM table_14632 WHERE "Bronze" = '1' AND "Silver" > '1' AND "Nation" = 'finland' AND "Gold" < '0'
### Instruction: CREATE TABLE table_68291 ( "Tournament" 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 was the 2013 finish for the tournamen...
SELECT "2013" FROM table_68291 WHERE "2007" = 'a'
### Instruction: CREATE TABLE table_24832 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the tables pro...
SELECT "Directed by" FROM table_24832 WHERE "U.S. viewers (millions)" = '6.62'
### Instruction: CREATE TABLE table_12514 ( "Rank" real, "Name" text, "Team" text, "Goals" real, "Appearances" real, "Minutes played" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total Goals with a Rank smaller than 10, a Name of n...
SELECT SUM("Goals") FROM table_12514 WHERE "Rank" < '10' AND "Name" = 'nicolas anelka' AND "Appearances" > '9'
### Instruction: CREATE TABLE table_57327 ( "Round" real, "Grand Prix" text, "Pole Position" text, "Fastest Lap" text, "Winning Driver" text, "Winning Constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which grand pri...
SELECT "Grand Prix" FROM table_57327 WHERE "Fastest Lap" = 'gerhard berger' AND "Pole Position" = 'jacques villeneuve'
### Instruction: CREATE TABLE table_45853 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" real, "Finish" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Finish, when To Par is less than 14, and when Year(s) Won...
SELECT "Finish" FROM table_45853 WHERE "To par" < '14' AND "Year(s) won" = '1952 , 1963'
### Instruction: CREATE TABLE table_76351 ( "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 "Tries for" FROM table_76351 WHERE "Losing bonus" = 'losing bonus'
### Instruction: CREATE TABLE table_36705 ( "Year" real, "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 Women's doubles when Rain...
SELECT "Women's doubles" FROM table_36705 WHERE "Year" < '2000' AND "Women's singles" = 'raina tzvetkova'
### Instruction: CREATE TABLE table_5484 ( "Rank" real, "Player" text, "Country" text, "Earnings ( $ )" real, "Wins" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest number of wins for tom watson who is ranked larger than number 1 a...
SELECT MIN("Wins") FROM table_5484 WHERE "Rank" > '1' AND "Player" = 'tom watson' AND "Earnings ( $ )" > '6,028,927'
### Instruction: CREATE TABLE table_18836 ( "Club" text, "Played" text, "Won" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text ) -- Using valid SQLite,...
SELECT "Points against" FROM table_18836 WHERE "Points" = 'Points'
### Instruction: CREATE TABLE table_77882 ( "Race" text, "Circuit" text, "Date" text, "Pole position" text, "Fastest lap" text, "Winning driver" text, "Constructor" text, "Tyre" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided abov...
SELECT "Date" FROM table_77882 WHERE "Winning driver" = 'emerson fittipaldi' AND "Race" = 'spanish grand prix'
### Instruction: CREATE TABLE table_88 ( "Religious group" text, "Population % 1961" text, "Population % 1971" text, "Population % 1981" text, "Population % 1991" text, "Population % 2001" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What reli...
SELECT "Religious group" FROM table_88 WHERE "Population % 2001" = '0.72%'
### Instruction: CREATE TABLE reservations ( code number, room text, checkin text, checkout text, rate number, lastname text, firstname text, adults number, kids number ) CREATE TABLE rooms ( roomid text, roomname text, beds number, bedtype text, maxoccupancy num...
SELECT roomname, baseprice FROM rooms ORDER BY baseprice LIMIT 1
### Instruction: CREATE TABLE table_204_671 ( id number, "airing\ndate" text, "english title\n(chinese title)" text, "number of episodes" number, "main cast" text, "theme song (t)\nsub-theme song (st)" text, "genre" text, "notes" text, "official website" text ) -- Using valid SQLit...
SELECT "english title\n(chinese title)" FROM table_204_671 ORDER BY id DESC LIMIT 1
### Instruction: CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following ...
SELECT Name, MAX(Revenue) FROM Manufacturers GROUP BY Headquarter ORDER BY MAX(Revenue) DESC
### Instruction: CREATE TABLE table_20534 ( "#" real, "Air Date" text, "Timeslot" text, "Rating" text, "Share" real, "18-49" text, "Viewers" text, "Weekly Rank" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many episodes have a week...
SELECT COUNT("#") FROM table_20534 WHERE "Weekly Rank" = 'TBA' AND "Timeslot" = '8:00 P.M.'
### Instruction: CREATE TABLE table_42821 ( "Locale" text, "Skip" text, "Ends Won" real, "Ends Lost" real, "Blank Ends" real, "Stolen Ends" real, "Shot Pct." real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of ends lost when...
SELECT COUNT("Ends Lost") FROM table_42821 WHERE "Blank Ends" = '15' AND "Stolen Ends" < '14'
### Instruction: CREATE TABLE Reviewer ( rID int, name text ) CREATE TABLE Movie ( mID int, title text, year int, director text ) CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date ) -- Using valid SQLite, answer the following questions for the tables provided...
SELECT T2.title, AVG(MIN(T1.stars)) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.title
### Instruction: CREATE TABLE table_18797 ( "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" text ) -- Using valid SQLite, answer the following q...
SELECT MIN("180s") FROM table_18797
### Instruction: CREATE TABLE table_49637 ( "Rank" real, "1-year peak" text, "5-year peak" text, "10-year peak" text, "15-year peak" text, "20-year peak" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 1-year peak with anatoly karpov,...
SELECT "1-year peak" FROM table_49637 WHERE "10-year peak" = 'anatoly karpov, 2821'
### Instruction: CREATE TABLE table_204_210 ( id number, "rnd" number, "circuit" text, "lmp1 winning team\nlmp1 winning drivers" text, "lmp2 winning team\nlmp2 winning drivers" text, "gt1 winning team\ngt1 winning drivers" text, "gt2 winning team\ngt2 winning drivers" text, "results" tex...
SELECT COUNT(DISTINCT "circuit") FROM table_204_210
### Instruction: CREATE TABLE table_16808 ( "Week" text, "Date" text, "Opponent" text, "Result" text, "Kickoff [a ]" text, "Game site" text, "TV" text, "Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How ma...
SELECT COUNT("Kickoff [a ]") FROM table_16808 WHERE "Date" = 'September 4, 1988'
### Instruction: CREATE TABLE table_70624 ( "Team" text, "Truck(s)" text, "Driver(s)" text, "Primary Sponsor(s)" text, "Owner(s)" text, "Crew Chief" text, "Rounds" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the truck used by Bret...
SELECT "Truck(s)" FROM table_70624 WHERE "Driver(s)" = 'brett moffitt' AND "Team" = 'hattori racing enterprises'
### Instruction: CREATE TABLE table_4691 ( "Played" real, "Lost" real, "Drawn" real, "Tries" real, "Points" real, "% Won" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the fewest losses for a player lower than 3, with wins fewer than 7...
SELECT MIN("Lost") FROM table_4691 WHERE "Played" > '3' AND "% Won" < '75' AND "Drawn" = '0' AND "Points" = '56'
### Instruction: CREATE TABLE table_203_152 ( id number, "province" text, "capital" text, "area (km2)" number, "population" number, "density" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which province in the dominican republic has the same ...
SELECT "province" FROM table_203_152 WHERE "province" <> 'san juan' AND "density" = (SELECT "density" FROM table_203_152 WHERE "province" = 'san juan')
### Instruction: CREATE TABLE table_65781 ( "Mother Tongue" text, "Population (2006)" real, "Percentage (2006)" text, "Population (2011)" real, "Percentage (2011)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of people in ...
SELECT COUNT("Population (2011)") FROM table_65781 WHERE "Population (2006)" = '120'
### 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 Type, AVG(Tonnage) FROM ship GROUP BY Type ORDER BY Type DESC
### Instruction: CREATE TABLE table_63994 ( "Class" text, "Wheel arrangement" text, "Fleet number(s)" text, "Manufacturer" text, "Serial numbers" text, "Year made" text, "Quantity made" text, "Quantity preserved" text, "Year(s) retired" text ) -- Using valid SQLite, answer the foll...
SELECT "Wheel arrangement" FROM table_63994 WHERE "Year(s) retired" = '1955'
### Instruction: CREATE TABLE table_43847 ( "English" text, "three" text, "four" text, "person" text, "house" text, "coconut" text, "what" text, "fire" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the language, when 'house' is ...
SELECT "English" FROM table_43847 WHERE "house" = 'balay' AND "three" = 'tatlo' AND "four" = 'apat'
### Instruction: CREATE TABLE device ( device_id number, device text, carrier text, package_version text, applications text, software_platform text ) CREATE TABLE stock ( shop_id number, device_id number, quantity number ) CREATE TABLE shop ( shop_id number, shop_name text,...
SELECT open_date, open_year FROM shop WHERE shop_name = "Apple"
### Instruction: CREATE TABLE table_68406 ( "Tournament" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "Win %" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What shows for 2010 when 2011 is 1r at the US Open tournam...
SELECT "2010" FROM table_68406 WHERE "2011" = '1r' AND "Tournament" = 'us open'
### Instruction: CREATE TABLE table_11145 ( "Season" real, "Episodes" real, "Originally aired" text, "Season Premiere" text, "Season Finale" text, "DVD release date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the originally aired da...
SELECT "Originally aired" FROM table_11145 WHERE "Season" < '5' AND "Season Premiere" = 'october 3, 2001'
### Instruction: CREATE TABLE table_name_75 ( net_profit__ INTEGER, earnings_per_share__p_ VARCHAR, profit__loss__before_tax__£m_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total net profit when earnings per share is 27.4, and profit/loss...
SELECT SUM(net_profit__) AS £m_ FROM table_name_75 WHERE earnings_per_share__p_ = 27.4 AND profit__loss__before_tax__£m_ < 194.6
### Instruction: CREATE TABLE table_9479 ( "Poll Source" text, "Sample Size" real, "Margin of Error" real, "Date" text, "Democrat" text, "Republican" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the sample size for the poll from Nov 9...
SELECT MAX("Sample Size") FROM table_9479 WHERE "Date" = 'nov 9-11, 2007' AND "Margin of Error" < '4.3'
### Instruction: CREATE TABLE table_39405 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Pick # is the highest one that has an Overall larger than 21, a...
SELECT MAX("Pick #") FROM table_39405 WHERE "Overall" > '21' AND "College" = 'north carolina' AND "Round" < '3'
### Instruction: CREATE TABLE table_5473 ( "Corps Name" text, "Number of Finals Appearances" real, "Year of First Appearance" real, "Year of Most Recent Appearance" real, "All Years of Finals Appearances" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT COUNT("Year of Most Recent Appearance") FROM table_5473 WHERE "Corps Name" = 'suncoast sound' AND "Number of Finals Appearances" > '7'
### Instruction: CREATE TABLE table_37111 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Played has a Lost larger...
SELECT SUM("Played") FROM table_37111 WHERE "Lost" > '4' AND "Team" = 'américa' AND "Points" < '5'
### Instruction: CREATE TABLE table_29394 ( "Model Number" text, "Frequency" text, "L2 Cache" text, "HT" text, "Mult. 1" text, "Voltage" text, "TDP" text, "Socket" text, "Release date" text, "Order Part Number" text ) -- Using valid SQLite, answer the following questions for th...
SELECT "Order Part Number" FROM table_29394 WHERE "Mult. 1" = '10x'
### Instruction: CREATE TABLE table_19579 ( "Year" real, "Enrollment" real, "Black (%)" text, "White (%)" text, "Hispanic (%)" text, "Asian (%)" text, "Free/reduced lunch (%)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What percentage of...
SELECT "Hispanic (%)" FROM table_19579 WHERE "Free/reduced lunch (%)" = '81.4'
### Instruction: CREATE TABLE table_37570 ( "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. -- How many overall WC ponts (ran...
SELECT "Overall WC points (Rank)" FROM table_37570 WHERE "Rank" < '3' AND "Name" = 'anders jacobsen'
### Instruction: CREATE TABLE table_73687 ( "Season" real, "MLS Regular Season" text, "MLS Cup Playoffs" text, "Lamar Hunt U.S. Open Cup" text, "CONCACAF Champions Cup / CONCACAF Champions League" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How m...
SELECT COUNT("Season") FROM table_73687 WHERE "MLS Regular Season" = '5th, East (10-12-8)'
### Instruction: CREATE TABLE drivers ( driverid VARCHAR, forename VARCHAR ) CREATE TABLE results ( raceid VARCHAR, driverid VARCHAR ) CREATE TABLE races ( name VARCHAR, year VARCHAR, raceid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -...
SELECT T2.name, T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = "Lewis"
### Instruction: CREATE TABLE table_67725 ( "Peak" text, "Elevation (m)" real, "Prominence (m)" real, "Isolation (km)" real, "Municipality" text, "County" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Isolation in the munici...
SELECT AVG("Isolation (km)") FROM table_67725 WHERE "Municipality" = 'sunndal' AND "Elevation (m)" > '1850'
### 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
### Instruction: CREATE TABLE table_33113 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the crowd size of the ...
SELECT SUM("Crowd") FROM table_33113 WHERE "Home team score" = '7.7 (49)' AND "Away team" = 'geelong'
### Instruction: CREATE TABLE table_7442 ( "geohash length" real, "lat bits" real, "lng bits" real, "lat error" text, "lng error" text, "km error" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest geohash length when there is a ...
SELECT MAX("geohash length") FROM table_7442 WHERE "lng error" = '±0.00017' AND "lng bits" < '20'
### Instruction: CREATE TABLE table_3605 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The candidates Charles Fisher (DR) 65.1% W. Jones (F) 34...
SELECT "Incumbent" FROM table_3605 WHERE "Candidates" = 'Charles Fisher (DR) 65.1% W. Jones (F) 34.9%'
### Instruction: CREATE TABLE table_45057 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Opponents in the final" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who were the opponents on a har...
SELECT "Opponents in the final" FROM table_45057 WHERE "Surface" = 'hard' AND "Score" = '6-4, 7-6(2)'
### Instruction: CREATE TABLE table_58316 ( "Date" text, "Pilot" text, "Weapon Systems Officer" text, "Aircraft" text, "Tail Code" text, "Call Sign" text, "Kill" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Call Sign that has a Tail ...
SELECT "Call Sign" FROM table_58316 WHERE "Tail Code" = 'oy' AND "Weapon Systems Officer" = 'capt charles b. debellevue'
### Instruction: CREATE TABLE table_49054 ( "Call sign" text, "Frequency MHz" real, "City of license" text, "ERP W" real, "Class" text, "FCC info" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the ERP W for the station whose call sign i...
SELECT AVG("ERP W") FROM table_49054 WHERE "Call sign" = 'k248bj' AND "Frequency MHz" > '97.5'
### 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 Name, Age FROM driver ORDER BY Name DESC
### Instruction: CREATE TABLE table_16530 ( "Year" real, "Numer of Jamaicans granted British citizenship" real, "Naturalisation by residence" real, "Naturalisation by marriage" real, "Registration of a minor child" real, "Registration by other means" real ) -- Using valid SQLite, answer the fo...
SELECT "Naturalisation by marriage" FROM table_16530 WHERE "Numer of Jamaicans granted British citizenship" = '3165'