instruction
stringlengths
212
6.3k
output
stringlengths
6
2.03k
### Instruction: CREATE TABLE head ( head_id number, name text, born_state text, age number ) CREATE TABLE management ( department_id number, head_id number, temporary_acting text ) CREATE TABLE department ( department_id number, name text, creation text, ranking number, ...
SELECT COUNT(DISTINCT temporary_acting) FROM management
### 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 Manufacturers GROUP BY Founder
### Instruction: CREATE TABLE table_25927 ( "SF Round" real, "Country" text, "Location" text, "Date" text, "Driver" text, "Race 1(pts)" real, "Race 2(pts)" real, "Race 3" text, "Race Total(pts)" real ) -- Using valid SQLite, answer the following questions for the tables provided ab...
SELECT MAX("SF Round") FROM table_25927 WHERE "Driver" = 'Duncan Tappy'
### Instruction: CREATE TABLE table_45772 ( "Rank" text, "Figures" text, "Player" text, "Opponent" text, "Venue" text, "Season" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Season, when Opponent is source: . last updated: 28 june 2007....
SELECT "Season" FROM table_45772 WHERE "Opponent" = 'source: . last updated: 28 june 2007.'
### Instruction: CREATE TABLE table_56686 ( "Route Name" text, "Direction" text, "Termini" text, "Junctions" text, "Length" text, "Population Area" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the termini of the route with junctions of ...
SELECT "Termini" FROM table_56686 WHERE "Junctions" = 'i-35 fm 3338 sh 255'
### Instruction: CREATE TABLE table_63162 ( "Source" text, "Date" text, "Jody Wagner" text, "Pat Edmonson" text, "Michael Signer" text, "Rich Savage" text, "Jon Bowerbank" text, "Undecided" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- ...
SELECT "Rich Savage" FROM table_63162 WHERE "Jody Wagner" = '30%'
### Instruction: CREATE TABLE table_16364 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the ...
SELECT "Title" FROM table_16364 WHERE "Directed by" = 'Jean de Segonzac'
### Instruction: CREATE TABLE table_56803 ( "Parties and voter communities" text, "% 2006" real, "Seats 2006" real, "% 2001" real, "Seats 2001" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the %2006 when the %2001 was more than 62.5? ###...
SELECT AVG("% 2006") FROM table_56803 WHERE "% 2001" > '62.5'
### Instruction: CREATE TABLE table_20415 ( "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. -- Name th...
SELECT COUNT("Who knows the most about the guest host? panelists") FROM table_20415 WHERE "Air Date" = '20 January 2006'
### Instruction: CREATE TABLE table_14116 ( "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 was the match played agains...
SELECT "Opponents in the final" FROM table_14116 WHERE "Date" = 'march 14, 2008'
### Instruction: CREATE TABLE table_57947 ( "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 name of the away t...
SELECT "Away team" FROM table_57947 WHERE "Away team score" = '17.15 (117)'
### Instruction: CREATE TABLE table_20062 ( "Class" text, "Wheels" real, "Date" text, "Builder" text, "No. built" real, "1919 nos." text, "LMS Class" text, "LMS nos." text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the LMS number ...
SELECT "LMS nos." FROM table_20062 WHERE "Builder" = 'G&SWR Kilmarnock'
### Instruction: CREATE TABLE Payments ( booking_id VARCHAR ) CREATE TABLE Bookings ( booking_id VARCHAR, amount_of_refund VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the id and the amount of refund of the booking that incurred the most time...
SELECT T1.booking_id, T1.amount_of_refund FROM Bookings AS T1 JOIN Payments AS T2 ON T1.booking_id = T2.booking_id GROUP BY T1.booking_id ORDER BY COUNT(*) DESC LIMIT 1
### Instruction: CREATE TABLE table_51647 ( "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the average silver for total more than 1 with bronze of 2 for france and gold more t...
SELECT AVG("Silver") FROM table_51647 WHERE "Total" > '1' AND "Bronze" = '2' AND "Nation" = 'france' AND "Gold" > '0'
### Instruction: CREATE TABLE table_21647 ( "Team" text, "Head coach" text, "Team captain" text, "Venue" text, "Capacity" real, "Kitmaker" text, "Shirt sponsor" text, "Club Chairman" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is ...
SELECT "Club Chairman" FROM table_21647 WHERE "Team captain" = 'Murat Erdoğan'
### Instruction: CREATE TABLE roller_coaster ( roller_coaster_id number, name text, park text, country_id number, length number, height number, speed text, opened text, status text ) CREATE TABLE country ( country_id number, name text, population number, area number,...
SELECT status, COUNT(*) FROM roller_coaster GROUP BY status
### Instruction: CREATE TABLE table_204_384 ( id number, "#" number, "air date" text, "timeslot (est)" text, "season" text, "rating" number, "share" number, "18-49 (rating/share)" text, "viewers (m)" number, "weekly rank (#)" number ) -- Using valid SQLite, answer the following...
SELECT "#" FROM table_204_384 ORDER BY "rating" DESC LIMIT 1
### Instruction: CREATE TABLE table_29126 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Incoming manager" text, "Date of appointment" text, "Position in table" text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT "Manner of departure" FROM table_29126 WHERE "Team" = 'Notts County' AND "Incoming manager" = 'Martin Allen'
### Instruction: CREATE TABLE table_30523 ( "Letters" text, "Organization" text, "Nickname" text, "Founding Date" text, "Founding University" text, "Type" text, "Canadian Chapters" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When 1 active...
SELECT COUNT("Founding Date") FROM table_30523 WHERE "Canadian Chapters" = '1 Active, 1 Inactive'
### Instruction: CREATE TABLE table_54717 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the home team scored 16.26...
SELECT "Away team score" FROM table_54717 WHERE "Home team score" = '16.26 (122)'
### Instruction: CREATE TABLE table_12584 ( "Standard order" real, "English translation" text, "Transcription (based on Pinyin)" text, "Traditional Chinese" text, "Simplified Chinese" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the simpli...
SELECT "Simplified Chinese" FROM table_12584 WHERE "Standard order" > '4' AND "Transcription (based on Pinyin)" = 'bei hui feng'
### Instruction: CREATE TABLE table_4275 ( "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 for...
SELECT MAX("Poles") FROM table_4275
### Instruction: CREATE TABLE table_1090 ( "Place" real, "Shooter" text, "Total" real, "Round 1" real, "Round 2" real, "Round 3" real, "Round 4" real, "Round 5" real, "Round 6" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who shot ...
SELECT "Shooter" FROM table_1090 WHERE "Round 3" = '80'
### Instruction: CREATE TABLE table_18980 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT COUNT("High rebounds") FROM table_18980 WHERE "Record" = '19-13'
### Instruction: CREATE TABLE table_20349 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written By" text, "Originalairdate" text, "TV Broadcast" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the di...
SELECT "Directed by" FROM table_20349 WHERE "Title" = 'Graduation Day: Class of 2105'
### Instruction: CREATE TABLE table_34433 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Crowd" text, "Date" text, "Time" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above...
SELECT "Time" FROM table_34433 WHERE "Ground" = 'ghantoot racing and polo club'
### Instruction: CREATE TABLE table_57274 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the Away team scored 12.9 ...
SELECT AVG("Crowd") FROM table_57274 WHERE "Away team score" = '12.9 (81)'
### Instruction: CREATE TABLE table_24615 ( "Original number" text, "UIC number" text, "Name" text, "Constructer" text, "constructor number" real, "Year" real, "Withdrawn" text, "Kilometers worked" real ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT "Withdrawn" FROM table_24615 WHERE "Name" = 'Virgen de Gracia'
### Instruction: CREATE TABLE table_204_24 ( id number, "year" number, "league" text, "record" text, "finish" text, "manager" text, "playoffs" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which season had a better winning...
SELECT "year" FROM table_204_24 WHERE "year" IN (1970, 1975) ORDER BY "finish" LIMIT 1
### Instruction: CREATE TABLE table_58902 ( "Glenelg FL" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many wins did Glenelg FL of bahgallah have when there were more th...
SELECT COUNT("Wins") FROM table_58902 WHERE "Glenelg FL" = 'bahgallah' AND "Byes" > '3'
### Instruction: CREATE TABLE table_62856 ( "Nat." text, "Name" text, "Moving from" text, "Type" text, "Transfer window" text, "Ends" real, "Transfer fee" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Transfer fee has Ends larger than...
SELECT "Transfer fee" FROM table_62856 WHERE "Ends" > '2011' AND "Moving from" = 'psv'
### Instruction: CREATE TABLE table_40354 ( "number" real, "symbol" text, "name" text, "empirical \u2020" text, "Calculated" text, "van der Waals" text, "Covalent (single bond)" text, "Covalent (triple bond)" text ) -- Using valid SQLite, answer the following questions for the tables p...
SELECT "name" FROM table_40354 WHERE "Calculated" = '56'
### Instruction: CREATE TABLE table_29717 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Table" text, "Incoming manager" text, "Date of appointment" text ) -- Using valid SQLite, answer the following questions for the tables provided above. --...
SELECT "Outgoing manager" FROM table_29717 WHERE "Date of vacancy" = '10 October 2010'
### Instruction: CREATE TABLE table_44153 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT "Score" FROM table_44153 WHERE "High assists" = 'maurice williams (7)'
### Instruction: CREATE TABLE table_43029 ( "Rank" text, "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 total number of Silver when Bronze was smaller than 1 with a to...
SELECT COUNT("Silver") FROM table_43029 WHERE "Bronze" < '1' AND "Total" < '2' AND "Nation" = 'bulgaria'
### Instruction: CREATE TABLE table_204_634 ( id number, "tour" number, "official title" text, "venue" text, "city" text, "date\nstart" text, "date\nfinish" text, "prize money\nusd" number, "report" text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT COUNT("official title") FROM table_204_634 WHERE "date\nstart" = 1
### Instruction: CREATE TABLE table_37387 ( "Series Ep." text, "Episode" real, "Netflix" text, "Segment A" text, "Segment B" text, "Segment C" text, "Segment D" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the segment c with episode l...
SELECT "Segment C" FROM table_37387 WHERE "Episode" < '179' AND "Segment B" = 's sticker'
### Instruction: CREATE TABLE table_27924 ( "meas. num" real, "passed" text, "YES votes" real, "NO votes" real, "% YES" text, "Const. Amd.?" text, "type" text, "description" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the total n...
SELECT COUNT("Const. Amd.?") FROM table_27924 WHERE "description" = 'Five Cent Gasoline Tax Bill'
### Instruction: CREATE TABLE table_50073 ( "Nat." text, "Name" text, "Moving to" text, "Type" text, "Transfer window" text, "Transfer fee" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the player who is Sco and moving to gr...
SELECT "Name" FROM table_50073 WHERE "Nat." = 'sco' AND "Transfer window" = 'summer' AND "Moving to" = 'greenock morton'
### Instruction: CREATE TABLE table_203_657 ( id number, "call sign" text, "frequency" text, "city of license" text, "licensee" text, "format" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many stations have the same format as the station k...
SELECT COUNT(*) FROM table_203_657 WHERE "call sign" <> 'klfv' AND "format" = (SELECT "format" FROM table_203_657 WHERE "call sign" = 'klfv')
### Instruction: CREATE TABLE table_57893 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Score with a Visitor of bucks, and a Leading scorer wi...
SELECT "Score" FROM table_57893 WHERE "Visitor" = 'bucks' AND "Leading scorer" = 'maurice williams (25)'
### Instruction: CREATE TABLE table_5081 ( "Rank" real, "Player" text, "Country" text, "Earnings ( $ )" real, "Events" real, "Wins" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Events have a Player of tom kite, and Earnings ($) smaller t...
SELECT AVG("Events") FROM table_5081 WHERE "Player" = 'tom kite' AND "Earnings ( $ )" < '760,405'
### Instruction: CREATE TABLE table_3893 ( "Model - Computer name" text, "CPU type" text, "No. of processors" text, "Period of operation" text, "Maximum peak performance ( Teraflops )" text, "Use" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- N...
SELECT "CPU type" FROM table_3893 WHERE "Period of operation" = 'June 2005 - April 2009'
### Instruction: CREATE TABLE table_68647 ( "Team" text, "Car(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 car does Scott Deware own t...
SELECT "Car(s)" FROM table_68647 WHERE "Rounds" < '12' AND "Owner(s)" = 'scott deware'
### Instruction: CREATE TABLE table_70468 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the tournament that resulted in a winning score of 4 (...
SELECT "Tournament" FROM table_70468 WHERE "Winning score" = '–4 (71-72-72-69=284)'
### Instruction: CREATE TABLE table_201_7 ( id number, "year" number, "gross domestic product" number, "us dollar exchange" text, "inflation index\n(2000=100)" number, "per capita income\n(as % of usa)" number ) -- Using valid SQLite, answer the following questions for the tables provided abov...
SELECT COUNT("year") FROM table_201_7 WHERE "inflation index\n(2000=100)" > 90
### Instruction: CREATE TABLE table_1182314_5 ( norwegian_americans__2000_ INTEGER, norwegian_americans__1990_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the maximum norwegian americans (2000) where norwegian americans (1990) is 9170 ### Respon...
SELECT MAX(norwegian_americans__2000_) FROM table_1182314_5 WHERE norwegian_americans__1990_ = 9170
### Instruction: CREATE TABLE table_13698 ( "Season" text, "Teams" real, "Minor Ladder Position" text, "Finals Qualification" text, "Final Ladder Position" text, "ACL Qualification" text, "ACL Placing" text ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT "Finals Qualification" FROM table_13698 WHERE "Season" = '2009-10'
### Instruction: CREATE TABLE table_204_84 ( id number, "no" number, "peak" text, "location" text, "elevation (m)" number, "prominence (m)" number, "col height (m)" number, "col location" text, "parent" text ) -- Using valid SQLite, answer the following questions for the tables pro...
SELECT "peak" FROM table_204_84 WHERE "elevation (m)" < 2500
### Instruction: CREATE TABLE table_name_65 ( goals INTEGER, total_gs VARCHAR, name VARCHAR, competition VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average number of goals of park sung-ho at the k-league competition,...
SELECT AVG(goals) FROM table_name_65 WHERE competition = "k-league" AND team = "pohang steelers" AND name = "park sung-ho" AND total_gs < 46
### Instruction: CREATE TABLE table_73965 ( "No." real, "#" real, "Title" text, "Directed by" text, "Written by" text, "Patient Portrayer" text, "Original air date" text, "Production code" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- W...
SELECT "Production code" FROM table_73965 WHERE "Patient Portrayer" = 'Kathy Lamkin'
### Instruction: CREATE TABLE table_33775 ( "Race Name" text, "Circuit" text, "City/Location" text, "Date" text, "Pole position" text, "Fastest lap" text, "Winning driver" text, "Winning team" text, "Report" text ) -- Using valid SQLite, answer the following questions for the table...
SELECT "Pole position" FROM table_33775 WHERE "Race Name" = 'marlboro challenge'
### Instruction: CREATE TABLE table_73511 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT "High points" FROM table_73511 WHERE "Location Attendance" = 'Pepsi Center 19,155'
### Instruction: CREATE TABLE table_48081 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Time has a Round smaller tha...
SELECT "Time" FROM table_48081 WHERE "Round" < '3' AND "Opponent" = 'bao quach'
### Instruction: CREATE TABLE table_204_172 ( id number, "year" number, "representative" text, "hometown" text, "placement in miss nepal" text, "special awards at miss nepal" text, "placement in miss pokhara" text ) -- Using valid SQLite, answer the following questions for the tables provi...
SELECT "representative" FROM table_204_172 WHERE "placement in miss nepal" = 'winner' ORDER BY "year" LIMIT 1
### Instruction: CREATE TABLE table_203_865 ( id number, "place" number, "athlete" text, "nation" text, "best mark" text, "throw 1" number, "throw 2" number, "throw 3" number, "throw 4" number, "throw 5" number, "throw 6" number ) -- Using valid SQLite, answer the following...
SELECT COUNT("athlete") FROM table_203_865
### Instruction: CREATE TABLE table_35518 ( "Rank" real, "Name" text, "Height ft (m)" text, "Floors (Stories)" real, "Year Completed" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many floors are in the 274 (84) ft (m) building that is ranked n...
SELECT AVG("Floors (Stories)") FROM table_35518 WHERE "Height ft (m)" = '274 (84)' AND "Rank" > '1'
### Instruction: CREATE TABLE Ship ( Ship_ID int, Name text, Type text, Built_Year real, Class text, Flag text ) CREATE TABLE captain ( Captain_ID int, Name text, Ship_ID int, age text, Class text, Rank text ) -- Using valid SQLite, answer the following questions for t...
SELECT Flag, COUNT(*) FROM Ship GROUP BY Flag ORDER BY COUNT(*)
### Instruction: CREATE TABLE table_69165 ( "Name" text, "Years" text, "Gender" text, "Area" text, "Authority" text, "Decile" real, "Roll" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Authority for Avalon School with a roll le...
SELECT "Authority" FROM table_69165 WHERE "Area" = 'avalon' AND "Roll" < '358' AND "Name" = 'avalon school'
### Instruction: CREATE TABLE table_204_847 ( id number, "#" number, "name" text, "position" text, "birthday" text, "size" text, "weight" text, "last team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many players weigh more than m...
SELECT COUNT("name") FROM table_204_847 WHERE "weight" > (SELECT "weight" FROM table_204_847 WHERE "name" = 'michael baumer')
### Instruction: CREATE TABLE table_47915 ( "Game" real, "Date" text, "Opponent" text, "Score/Time" text, "High points" text, "High rebounds" text, "High assists" text, "Arena/Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables pro...
SELECT "Score/Time" FROM table_47915 WHERE "Date" = 'june 10'
### Instruction: CREATE TABLE table_37472 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many positions have figuei...
SELECT COUNT("Position") FROM table_37472 WHERE "Team" = 'figueirense' AND "Played" > '38'
### Instruction: CREATE TABLE table_9639 ( "Morse Taper number" real, "Taper" text, "B (max)" real, "C (max)" real, "D (max)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the total of the Morse Taper number when the D (max) is 20 and the B ...
SELECT SUM("Morse Taper number") FROM table_9639 WHERE "D (max)" = '20' AND "B (max)" > '94'
### Instruction: CREATE TABLE table_19395 ( "#" real, "Episode Title" text, "Situation" text, "Date of Situation" text, "Nature of Situation" text, "Original U.S. Airdate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which situation has an ori...
SELECT "Situation" FROM table_19395 WHERE "Original U.S. Airdate" = 'December 5, 2007'
### Instruction: CREATE TABLE table_31104 ( "Week of" text, "Tournament" text, "Champion" text, "Runner-up" text, "Semifinalists" text, "Quarterfinalists" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who were the semifinalists in the week of 1...
SELECT "Semifinalists" FROM table_31104 WHERE "Week of" = '13 November' AND "Runner-up" = 'Pat Du Pré'
### Instruction: CREATE TABLE table_39743 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the latest week with a date of November 12, 1967 and less than 34,761 in atten...
SELECT MAX("Week") FROM table_39743 WHERE "Date" = 'november 12, 1967' AND "Attendance" < '34,761'
### Instruction: CREATE TABLE table_name_67 ( make_and_model VARCHAR, quantity VARCHAR, bicycle_capacity† VARCHAR, fuel_propulsion VARCHAR, floor_type VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What make and model of the diesel vehicle with a...
SELECT make_and_model FROM table_name_67 WHERE fuel_propulsion = "diesel" AND floor_type = "high" AND bicycle_capacity† < 3 AND quantity = 4
### Instruction: CREATE TABLE table_204_455 ( id number, "rd." number, "grand prix" text, "date" text, "location" text, "pole position" text, "fastest lap" text, "winning driver" text, "constructor" text, "report" text ) -- Using valid SQLite, answer the following questions for...
SELECT "fastest lap" FROM table_204_455 WHERE "grand prix" = 'german grand prix'
### Instruction: CREATE TABLE table_14785 ( "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. -- Which totals tournament has the lowest wins and...
SELECT MIN("Wins") FROM table_14785 WHERE "Tournament" = 'totals' AND "Top-25" < '4'
### Instruction: CREATE TABLE table_204_168 ( 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. -- what is the total...
SELECT "attendance" FROM table_204_168 WHERE "date" = '11/09/2013'
### Instruction: CREATE TABLE table_203_679 ( id number, "part" text, "number" text, "first public release date (first edition)" number, "latest public release date (edition)" number, "latest amendment" text, "title" text, "description" text ) -- Using valid SQLite, answer the followin...
SELECT "number" FROM table_203_679 WHERE "first public release date (first edition)" = 2008
### Instruction: CREATE TABLE table_69415 ( "Format" text, "Filename extension" text, "Image support" text, "Interactivity support" text, "Word wrap support" text, "Open standard" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Filename ext...
SELECT "Filename extension" FROM table_69415 WHERE "Interactivity support" = 'no' AND "Open standard" = 'yes' AND "Image support" = 'no'
### Instruction: CREATE TABLE table_39001 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest round with a pick# of 11, a position of offensive tackle, and overall...
SELECT MAX("Round") FROM table_39001 WHERE "Pick #" = '11' AND "Overall" < '414' AND "Position" = 'offensive tackle'
### Instruction: CREATE TABLE table_8886 ( "Episode" text, "Air Date" text, "Timeslot" text, "Rating" real, "Share" real, "18-49" text, "Viewers" text, "Weekly Rank" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Share...
SELECT MIN("Share") FROM table_8886 WHERE "Episode" = 'farmer picks a wife'
### Instruction: CREATE TABLE table_30997 ( "Episode" real, "Date" text, "Official rating 4+" text, "Share 4+" text, "Official rating 16-39" text, "Share 16-39" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When did the official rating 4+ reach...
SELECT "Date" FROM table_30997 WHERE "Official rating 4+" = '4 633 925'
### Instruction: CREATE TABLE table_31096 ( "Stage" real, "Winner" text, "General Classification" text, "Mountains Classification" text, "Sprint Classification" text, "Young Rider Classification" text, "Team Classification" text, "Aggressive Rider" text ) -- Using valid SQLite, answer ...
SELECT "Team Classification" FROM table_31096 WHERE "Aggressive Rider" = 'Richie Porte'
### Instruction: CREATE TABLE table_204_218 ( id number, "name" text, "faith" text, "type" text, "gov" text, "opened" number, "intake" number, "dcsf number" number, "ofsted number" number, "web" text, "coordinates" text ) -- Using valid SQLite, answer the following question...
SELECT COUNT(*) FROM table_204_218 WHERE "gov" = 'cy'
### Instruction: CREATE TABLE table_7049 ( "English country name" text, "Arabic romanised country name" text, "Arabic country name" text, "English capital name" text, "Arabic romanised capital name" text, "Arabic capital name" text ) -- Using valid SQLite, answer the following questions for th...
SELECT "Arabic capital name" FROM table_7049 WHERE "English capital name" = 'n''djamena'
### Instruction: CREATE TABLE TOURIST_ATTRACTIONS ( Opening_Hours VARCHAR, Tourist_Attraction_ID VARCHAR ) CREATE TABLE MUSEUMS ( Museum_Details VARCHAR, Museum_ID VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the details and opening hours...
SELECT T1.Museum_Details, T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID
### Instruction: CREATE TABLE table_35840 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Silvers that has a Gold smaller than 1, and a Rank of 9, and a Tot...
SELECT SUM("Silver") FROM table_35840 WHERE "Gold" < '1' AND "Rank" = '9' AND "Total" < '1'
### Instruction: CREATE TABLE table_36072 ( "Date" text, "Tournament" text, "Location" text, "Winner" text, "Score" text, "1st prize ( $ )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the location of the tallahassee open, with a Score...
SELECT "Location" FROM table_36072 WHERE "Score" = '269 (–19)' AND "Tournament" = 'tallahassee open'
### Instruction: CREATE TABLE table_1432 ( "Year" text, "Event" text, "Pole position time" text, "107% time" text, "Driver" text, "Team" text, "Time" text, "% of pole" text, "Allowed to race?" text ) -- Using valid SQLite, answer the following questions for the tables provided abov...
SELECT "Event" FROM table_1432 WHERE "Time" = '1:48.322'
### Instruction: CREATE TABLE table_21874 ( "Season" real, "Date" text, "Winning Driver" text, "Car #" real, "Sponsor" text, "Make" text, "Team" text, "Avg Speed" text, "Margin of Victory" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT COUNT("Car #") FROM table_21874 WHERE "Winning Driver" = 'Rusty Wallace'
### Instruction: CREATE TABLE table_802 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided ab...
SELECT COUNT("Record") FROM table_802 WHERE "High assists" = 'Damon Stoudamire (13)'
### Instruction: CREATE TABLE table_34233 ( "Driver" text, "Team" text, "Laps" real, "Time/Retired" text, "Grid" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the grid associated witha Time/Retired of +8.180 secs, and und...
SELECT SUM("Grid") FROM table_34233 WHERE "Time/Retired" = '+8.180 secs' AND "Laps" < '47'
### Instruction: CREATE TABLE table_14605 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the tournament for outcome of winner and clay surface with o...
SELECT "Tournament" FROM table_14605 WHERE "Outcome" = 'winner' AND "Surface" = 'clay' AND "Opponent" = 'aranza salut'
### Instruction: CREATE TABLE table_64600 ( "Name" text, "La Liga" real, "Copa del Rey" real, "UEFA Champions League" real, "FIFA Club World Championship" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which UEFA Champions League h...
SELECT MIN("UEFA Champions League") FROM table_64600 WHERE "La Liga" = '17' AND "Copa del Rey" > '0'
### Instruction: CREATE TABLE table_203_340 ( id number, "rank" number, "airport" text, "passengers handled" number, "% change 2011 / 12" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which airport has no more than 30,000 passengers handled among...
SELECT "airport" FROM table_203_340 WHERE "passengers handled" <= 30000
### Instruction: CREATE TABLE table_13024 ( "Rank" real, "Map Reference Number" real, "Census Statistical Area" text, "2007 Population" real, "Lake(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the map reference number for Lake Superior...
SELECT COUNT("Map Reference Number") FROM table_13024 WHERE "Lake(s)" = 'lake superior' AND "2007 Population" > '65,216'
### Instruction: CREATE TABLE manager_award ( player_id VARCHAR ) CREATE TABLE player ( name_first VARCHAR, name_last VARCHAR, player_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the manager's first name, last name and id who won the m...
SELECT T1.name_first, T1.name_last, T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY COUNT(*) DESC LIMIT 1
### Instruction: CREATE TABLE table_24872 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is t...
SELECT "Title" FROM table_24872 WHERE "Original air date" = 'March 2, 1997'
### Instruction: CREATE TABLE table_16666 ( "Round" real, "Grand Prix" text, "Date" text, "Location" text, "Pole Position" text, "Fastest Lap" text, "Winning Driver" text, "Winning Constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tabl...
SELECT COUNT("Pole Position") FROM table_16666 WHERE "Round" = '15'
### Instruction: CREATE TABLE Organisations ( organisation_id VARCHAR, organisation_details VARCHAR ) CREATE TABLE Grants ( organisation_id VARCHAR, grant_amount INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the organisation ids and details of...
SELECT T2.organisation_id, T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING SUM(T1.grant_amount) > 6000
### Instruction: CREATE TABLE table_44626 ( "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 si the total sample size at rasmussen repo...
SELECT COUNT("Sample Size") FROM table_44626 WHERE "Poll Source" = 'rasmussen reports' AND "Margin of Error" > '4.5'
### Instruction: CREATE TABLE table_48658 ( "Year" real, "Date" text, "Winner" text, "Result" text, "Loser" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the location after 1934 that Philadelphia Eagles lost on October...
SELECT "Location" FROM table_48658 WHERE "Year" > '1934' AND "Loser" = 'philadelphia eagles' AND "Date" = 'october 15'
### Instruction: CREATE TABLE table_11311 ( "Grid" real, "Driver" text, "Constructor" text, "Qual" real, "Rank" real, "Laps" real, "Time/Retired" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the total number of Laps for Qual being ...
SELECT COUNT("Laps") FROM table_11311 WHERE "Qual" > '142.81' AND "Grid" = '12'
### Instruction: CREATE TABLE table_2166 ( "Map number" real, "English name" text, "Finnish name" text, "Swedish name" text, "Residence city" text, "Dates of existence" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many re...
SELECT COUNT("Residence city") FROM table_2166 WHERE "English name" = 'Province of Viborg and Nyslott'
### Instruction: CREATE TABLE table_7530 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What rank has 0 as the bronze, and a total less than 3, with north korea as ...
SELECT "Rank" FROM table_7530 WHERE "Bronze" = '0' AND "Total" < '3' AND "Nation" = 'north korea'
### Instruction: CREATE TABLE table_26595 ( "County" text, "Coakley %" text, "Coakley votes" real, "Brown %" text, "Brown votes" real, "Kennedy %" text, "Kennedy votes" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many votes did kenned...
SELECT MIN("Kennedy votes") FROM table_26595 WHERE "Coakley %" = '66.2%'
### Instruction: CREATE TABLE table_21523 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT "Score" FROM table_21523 WHERE "High points" = 'Andre Miller (17)'