instruction
stringlengths
212
6.3k
output
stringlengths
6
2.03k
### Instruction: CREATE TABLE table_24257 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real, "US viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the ta...
SELECT "Production code" FROM table_24257 WHERE "Title" = 'A Wrong Day''s Journey into Right'
### Instruction: CREATE TABLE table_38095 ( "7:00" text, "7:30" text, "8:00" text, "8:30" text, "9:00" text, "9:30" text, "10:00" text, "10:30" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 7:30 feature with an 8:00 feature ...
SELECT "7:30" FROM table_38095 WHERE "8:00" = 'cosby'
### Instruction: CREATE TABLE table_22677 ( "Name" text, "Career" text, "Matches" real, "Overs" text, "Maidens" real, "Runs" real, "Wickets" real, "Average" text, "Best" text, "5w" real, "10w" real ) -- Using valid SQLite, answer the following questions for the tables provi...
SELECT "Career" FROM table_22677 WHERE "Matches" = '60'
### Instruction: CREATE TABLE table_47923 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Replaced by" text, "Date of appointment" text, "Position in table" text ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT "Date of appointment" FROM table_47923 WHERE "Manner of departure" = 'sacked' AND "Outgoing manager" = 'fred rutten'
### Instruction: CREATE TABLE table_20826 ( "Country" text, "Skip" text, "W" real, "L" real, "PF" real, "PA" real, "Ends Won" real, "Ends Lost" real, "Blank Ends" real, "Stolen Ends" real, "Shot %" real ) -- Using valid SQLite, answer the following questions for the tables ...
SELECT "Skip" FROM table_20826 WHERE "PF" = '73'
### Instruction: CREATE TABLE table_2047 ( "Province" text, "Latin Americans 2001" real, "% 2001" text, "Latin Americans 2011" real, "% 2011" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the percentage in 2001 in Manitoba where the percenta...
SELECT "% 2001" FROM table_2047 WHERE "% 2011" = '0.8%' AND "Province" = 'Manitoba'
### Instruction: CREATE TABLE table_69029 ( "Riding" text, "Candidate's Name" text, "Gender" text, "Residence" text, "Occupation" text, "Votes" real, "Rank" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Occupation has a Rank of 5th, a...
SELECT "Occupation" FROM table_69029 WHERE "Rank" = '5th' AND "Gender" = 'm' AND "Residence" = 'orono'
### Instruction: CREATE TABLE table_29896 ( "Season" real, "LMP1 Winning Team" text, "LMP2 Winning Driver" text, "LMPC Winning Team" text, "GT Winning Team" text, "GTC Winning Team" text, "Results" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT "GT Winning Team" FROM table_29896 WHERE "GTC Winning Team" = 'No. 54 Black Swan Racing'
### Instruction: CREATE TABLE table_66796 ( "January" text, "February" text, "March" text, "April" text, "June" text, "July" text, "August" text, "September" text, "October" text, "November" text, "December" text ) -- Using valid SQLite, answer the following questions for t...
SELECT "February" FROM table_66796 WHERE "September" = 'kristine hanson'
### Instruction: CREATE TABLE Ref_Shipping_Agents ( Id VARCHAR ) CREATE TABLE Documents ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which shipping agent shipped the most documents? List the shipping agent name and the number of documents. ### Resp...
SELECT Ref_Shipping_Agents.shipping_agent_name, COUNT(Documents.document_id) FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code GROUP BY Ref_Shipping_Agents.shipping_agent_code ORDER BY COUNT(Documents.document_id) DESC LIMIT 1
### Instruction: CREATE TABLE table_name_63 ( deposits VARCHAR, non_interest_income VARCHAR, no_of_branches_offices VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many deposits had a Non-Interest Income of 0.9500000000000001 and number of branch/offi...
SELECT COUNT(deposits) FROM table_name_63 WHERE non_interest_income = 0.9500000000000001 AND no_of_branches_offices < 17
### Instruction: CREATE TABLE table_40498 ( "Date" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Set 4" text, "Set 5" text, "Total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Score, when Date is Jun 16, and w...
SELECT "Score" FROM table_40498 WHERE "Date" = 'jun 16' AND "Set 4" = '25-20'
### Instruction: CREATE TABLE table_52056 ( "Ethnic group" text, "Christian" text, "Buddhist" text, "Hindu" text, "Jewish" text, "Muslim" text, "Sikh" text, "Other" text, "No religion" text, "Not stated" text ) -- Using valid SQLite, answer the following questions for the table...
SELECT "Ethnic group" FROM table_52056 WHERE "Buddhist" = '0.19%'
### Instruction: CREATE TABLE table_46421 ( "Name" text, "Country" text, "Loan Club" text, "Started" text, "Ended" text, "Start Source" text, "End Source" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the loan started when the cout...
SELECT "Started" FROM table_46421 WHERE "Country" = 'eng' AND "Loan Club" = 'sunderland' AND "End Source" = 'south wales echo'
### Instruction: CREATE TABLE table_58647 ( "Season" real, "Date" text, "Winning Driver" text, "Car #" real, "Sponsor" text, "Make" text, "Distance" text, "Avg Speed" text, "Margin of Victory" text ) -- Using valid SQLite, answer the following questions for the tables provided abov...
SELECT "Sponsor" FROM table_58647 WHERE "Winning Driver" = 'greg biffle' AND "Date" = 'april 14'
### Instruction: CREATE TABLE tweets ( id number, uid number, text text, createdate time ) CREATE TABLE user_profiles ( uid number, name text, email text, partitionid number, followers number ) CREATE TABLE follows ( f1 number, f2 number ) -- Using valid SQLite, answer th...
SELECT T1.name FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING COUNT(*) > 1
### Instruction: CREATE TABLE table_203_193 ( id number, "ship name" text, "in service" number, "project number" text, "type" text, "class" text, "comments" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- the vaygach was commissioned for serv...
SELECT "ship name" FROM table_203_193 WHERE "ship name" <> 'vaygach' AND "in service" = (SELECT "in service" FROM table_203_193 WHERE "ship name" = 'vaygach')
### Instruction: CREATE TABLE table_203_105 ( id number, "name" text, "street address" text, "years as tallest" text, "height\nft (m)" text, "floors" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which building has the same number of floors a...
SELECT "name" FROM table_203_105 WHERE "name" <> 'lumber exchange building' AND "floors" = (SELECT "floors" FROM table_203_105 WHERE "name" = 'lumber exchange building')
### Instruction: CREATE TABLE region ( region_id number, region_code text, region_name text ) CREATE TABLE storm ( storm_id number, name text, dates_active text, max_speed number, damage_millions_usd number, number_deaths number ) CREATE TABLE affected_region ( region_id number...
SELECT COUNT(*) FROM storm WHERE number_deaths > 0
### Instruction: CREATE TABLE table_71104 ( "Date" text, "Time" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Total" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Set 3 has a Time of 10:00, and a Se...
SELECT "Set 3" FROM table_71104 WHERE "Time" = '10:00' AND "Set 2" = '25–19'
### Instruction: CREATE TABLE table_41590 ( "Animal" text, "Cell type" text, "Resting potential (mV)" text, "AP increase (mV)" text, "AP duration (ms)" text, "Conduction speed (m/s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the re...
SELECT "Resting potential (mV)" FROM table_41590 WHERE "AP duration (ms)" = '1.0' AND "Cell type" = 'median giant fiber'
### Instruction: CREATE TABLE table_64542 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Ratings" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum o...
SELECT SUM("No. in series") FROM table_64542 WHERE "Written by" = 'sam meikle' AND "No. in season" = '21'
### Instruction: CREATE TABLE table_39360 ( "Date" text, "Opponents" text, "H / A" text, "Result F \u2013 A" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Attendances have a Result F A of 0 2, and a Date of 31 january 19...
SELECT AVG("Attendance") FROM table_39360 WHERE "Result F \u2013 A" = '0 – 2' AND "Date" = '31 january 1903'
### Instruction: CREATE TABLE table_52396 ( "Rank" real, "Movie" text, "Year" real, "Studio(s)" text, "Opening Week Nett Gross" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest rank of the movie with an opening week net gross less ...
SELECT MAX("Rank") FROM table_52396 WHERE "Year" < '2011' AND "Opening Week Nett Gross" < '80,87,00,000'
### Instruction: CREATE TABLE table_78733 ( "Date" text, "Airline" text, "Aircraft type" text, "Registration" text, "People on board" real, "Fatalities" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of people on board at Iber...
SELECT AVG("People on board") FROM table_78733 WHERE "Airline" = 'iberia' AND "Aircraft type" = 'lockheed l-1049g'
### Instruction: CREATE TABLE table_63668 ( "School" text, "City" text, "Team Name" text, "Enrollment 08-09" real, "IHSAA Class" text, "IHSAA Class Football" text, "County" text, "Year Joined (Or Joining)" real, "Previous Conference" text ) -- Using valid SQLite, answer the followi...
SELECT AVG("Year Joined (Or Joining)") FROM table_63668 WHERE "City" = 'aurora'
### Instruction: CREATE TABLE table_46533 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE PICK FOR JOE DAY, ROUND LARGER THAN 1, AND OVERALL SMALLER ...
SELECT MIN("Pick") FROM table_46533 WHERE "Round" > '1' AND "Name" = 'joe day' AND "Overall" < '150'
### Instruction: CREATE TABLE table_203_633 ( id number, "title" text, "year" number, "platform" text, "developer" text, "publisher" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the difference -lrb- in years -rrb- between the time swat...
SELECT ABS((SELECT "year" FROM table_203_633 WHERE "title" = 'swat 4') - (SELECT "year" FROM table_203_633 WHERE "title" = 'swat force'))
### Instruction: CREATE TABLE table_203_723 ( id number, "year" number, "song" text, "us hot 100" number, "us msr" number, "us a.c." number, "can" number, "uk singles" number, "album" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- wh...
SELECT "song" FROM table_203_723 WHERE "us hot 100" < 10 ORDER BY "year" LIMIT 1
### Instruction: CREATE TABLE table_77363 ( "Province" text, "Membership" real, "Population" real, "% LDS" text, "Branches" real, "Total Congregations" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the sum of the total congregation in th...
SELECT SUM("Total Congregations") FROM table_77363 WHERE "Province" = 'manitoba' AND "Population" < '1,208,268'
### Instruction: CREATE TABLE table_72347 ( "Institution" text, "Team" text, "City" text, "Province" text, "First season" real, "Head coach" text, "Enrollment" real, "Endowment" text, "Football stadium" text, "Capacity" real ) -- Using valid SQLite, answer the following questio...
SELECT "Football stadium" FROM table_72347 WHERE "Enrollment" = '43579'
### Instruction: CREATE TABLE table_74398 ( "Date" text, "Time" text, "ACC Team" text, "Big Ten Team" text, "Location" text, "Television" text, "Attendance" real, "Winner" text, "Challenge Leader" text ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT "Time" FROM table_74398 WHERE "Location" = 'Cassell Coliseum • Blacksburg, VA'
### Instruction: CREATE TABLE table_52751 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which tournament has an Outcome of runner-up, a Surface of hard, ...
SELECT "Tournament" FROM table_52751 WHERE "Outcome" = 'runner-up' AND "Surface" = 'hard' AND "Score" = '6–4, 6–2'
### Instruction: CREATE TABLE table_203_339 ( id number, "year" text, "car" number, "start" number, "qual" number, "rank" number, "finish" number, "laps" number, "led" number, "retired" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT "year" FROM table_203_339 WHERE "year" < 1965 AND "start" = 5
### Instruction: CREATE TABLE table_37837 ( "District" text, "District Headquarters" text, "Area (km 2 .)" real, "Population 1991 Census" real, "Population 2001 Census" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of Population ...
SELECT SUM("Population 2001 Census") FROM table_37837 WHERE "Population 1991 Census" = '476,815'
### Instruction: CREATE TABLE table_13914 ( "Year(s)" text, "Selection show" text, "Venue" text, "National final main host" text, "National final co host" text, "Semi final/heat host" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the na...
SELECT "National final main host" FROM table_13914 WHERE "Semi final/heat host" = 'internal selection' AND "Year(s)" = '2011'
### Instruction: CREATE TABLE table_30652 ( "No." real, "#" real, "Title" text, "Directed by" text, "Written by" text, "U.S. air date" text, "Production code" real, "U.S. viewers (million)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- ...
SELECT "No." FROM table_30652 WHERE "U.S. viewers (million)" = '5.60'
### Instruction: CREATE TABLE table_name_86 ( passenger_load_factor___percentage_ VARCHAR, revenue__€m_ VARCHAR, profit____loss__before_tax__€m_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Passenger Load Factor (%) that has a Revenue ( m) less th...
SELECT passenger_load_factor___percentage_ FROM table_name_86 WHERE revenue__€m_ < 958.6 AND profit____loss__before_tax__€m_ = "1.1"
### Instruction: CREATE TABLE table_40992 ( "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 "Losing Bonus" FROM table_40992 WHERE "Tries For" = '0'
### Instruction: CREATE TABLE table_203_126 ( id number, "date" text, "opponent#" text, "rank#" text, "site" text, "result" text, "attendance" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who did ohio state play before indiana on october...
SELECT "opponent#" FROM table_203_126 WHERE id = (SELECT id FROM table_203_126 WHERE "date" = 'october 23' AND "opponent#" = 'indiana') - 1
### Instruction: CREATE TABLE table_7184 ( "Television service" text, "Country" text, "Language" text, "Content" text, "HDTV" text, "Package/Option" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is HDTV, when Content is Cinema, when Packag...
SELECT "HDTV" FROM table_7184 WHERE "Content" = 'cinema' AND "Package/Option" = 'sky cinema + sky hd' AND "Television service" = 'sky cinema passion hd'
### Instruction: CREATE TABLE table_22463 ( "Township" text, "County" text, "Pop. (2010)" real, "Land ( sqmi )" text, "Water (sqmi)" text, "Latitude" text, "Longitude" text, "GEO ID" real, "ANSI code" real ) -- Using valid SQLite, answer the following questions for the tables provi...
SELECT "Land ( sqmi )" FROM table_22463 WHERE "County" = 'Grand Forks'
### Instruction: CREATE TABLE table_70507 ( "Team" text, "Country" text, "Value ($M)" real, "Debt as %of value" text, "% change on year" text, "Revenue ($M)" real, "Operating income($m)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is...
SELECT MAX("Operating income($m)") FROM table_70507 WHERE "% change on year" = '2' AND "Value ($M)" < '1,036'
### 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 decor, COUNT(*) FROM rooms WHERE baseprice > 120 GROUP BY decor
### Instruction: CREATE TABLE table_17899 ( "Unit" text, "Type" text, "Net power" text, "Total power" text, "Construction start" text, "Construction finish" text, "Commercial operation" text, "Shut down" text ) -- Using valid SQLite, answer the following questions for the tables provid...
SELECT "Construction start" FROM table_17899 WHERE "Net power" = '905 MW' AND "Unit" = 'Chinon B1'
### Instruction: CREATE TABLE table_3915 ( "#" real, "Date" text, "Opponent" text, "Site/Stadium" text, "Score" text, "Win" text, "Loss" text, "Save" text, "Attendance" real, "Overall Record" text, "Pac-10 Record" text ) -- Using valid SQLite, answer the following questions...
SELECT COUNT("#") FROM table_3915 WHERE "Date" = 'April 23'
### Instruction: CREATE TABLE table_19153 ( "Month" text, "Week" real, "Overall" text, "Offensive" text, "Defensive" text, "Transition" text, "Rookie" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who won the rookie award the week the trans...
SELECT "Rookie" FROM table_19153 WHERE "Transition" = 'Brodie Merrill' AND "Offensive" = 'Pat Maddalena'
### Instruction: CREATE TABLE table_203_653 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what countries have the same amount of bronze me...
SELECT COUNT("nation") FROM table_203_653 WHERE "nation" <> 'germany' AND "bronze" = (SELECT "bronze" FROM table_203_653 WHERE "nation" = 'germany')
### Instruction: CREATE TABLE table_38210 ( "Character Name" text, "Voice Actor (Japanese)" text, "Voice Actor (English 1997 / Saban)" text, "Voice Actor (English 1998 / Pioneer)" text, "Voice Actor (English 2006 / FUNimation)" text ) -- Using valid SQLite, answer the following questions for the t...
SELECT "Character Name" FROM table_38210 WHERE "Voice Actor (Japanese)" = 'masaharu satou'
### Instruction: CREATE TABLE department ( dept_name VARCHAR, dept_code VARCHAR ) CREATE TABLE student ( stu_gpa INTEGER, dept_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name and the average gpa of department whose students have...
SELECT T2.dept_name, AVG(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY AVG(T1.stu_gpa) DESC LIMIT 1
### Instruction: CREATE TABLE table_204_108 ( id number, "typ" text, "construction time" text, "cylinders" text, "capacity" text, "power" text, "top speed" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which had the higher top speed , the p...
SELECT "typ" FROM table_204_108 WHERE "typ" IN ('primus 1,5 a', 'trumpf 1,5 av') ORDER BY "top speed" DESC LIMIT 1
### Instruction: CREATE TABLE table_2881 ( "Rank" real, "Rider" text, "Mon 24 Aug" text, "Tues 25 Aug" text, "Wed 26 Aug" text, "Thurs 27 Aug" text, "Fri 28 Aug" text, "Sat 29 Aug" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When 6 is...
SELECT "Tues 25 Aug" FROM table_2881 WHERE "Rank" = '6'
### Instruction: CREATE TABLE customer ( cust_name VARCHAR, cust_id VARCHAR ) CREATE TABLE loan ( cust_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the name of customers who have loans of both Mortgages and Auto. ### Response:
SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Mortgages' INTERSECT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Auto'
### Instruction: CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date ) CREATE TABLE Reviewer ( rID int, name text ) CREATE TABLE Movie ( mID int, title text, year int, director text ) -- Using valid SQLite, answer the following questions for the tables provided...
SELECT director, COUNT(*) FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director ORDER BY COUNT(*)
### Instruction: CREATE TABLE medicine_enzyme_interaction ( enzyme_id number, medicine_id number, interaction_type text ) CREATE TABLE medicine ( id number, name text, trade_name text, fda_approved text ) CREATE TABLE enzyme ( id number, name text, location text, product te...
SELECT name FROM enzyme ORDER BY name DESC
### Instruction: CREATE TABLE table_203_397 ( id number, "series" text, "launch date" text, "finale date" text, "days" number, "housemates" number, "winner" text, "main presenter" text, "grand prize" text, "liveshow\naudience\nmillions" number ) -- Using valid SQLite, answer th...
SELECT "main presenter" FROM table_203_397 GROUP BY "main presenter" ORDER BY COUNT("series") DESC LIMIT 1
### Instruction: CREATE TABLE table_203_444 ( id number, "week" number, "start date" text, "type" text, "tournament" text, "surface" text, "town" text, "country" text, "continent" text, "prize money" text ) -- Using valid SQLite, answer the following questions for the tables pr...
SELECT "continent" FROM table_203_444 WHERE "continent" IN ('europe', 'asia') GROUP BY "continent" ORDER BY COUNT(*) DESC LIMIT 1
### Instruction: CREATE TABLE table_55034 ( "Outcome" text, "Date" text, "Surface" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which date has a Opponent of juan m naco, and a Score of 6 2, 4 6, 7 6 (7 3)? ### Resp...
SELECT "Date" FROM table_55034 WHERE "Opponent" = 'juan mónaco' AND "Score" = '6–2, 4–6, 7–6 (7–3)'
### Instruction: CREATE TABLE table_34185 ( "School" text, "Location" text, "Mascot" text, "Enrollment" real, "IHSAA Class" text, "# / County" text, "Year joined" real, "Previous conference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. --...
SELECT "Previous conference" FROM table_34185 WHERE "Year joined" < '1976' AND "IHSAA Class" = 'a'
### Instruction: CREATE TABLE Movie ( mID int, title text, year int, director text ) CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date ) CREATE TABLE Reviewer ( rID int, name text ) -- Using valid SQLite, answer the following questions for the tables provided...
SELECT title, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title ORDER BY title
### Instruction: CREATE TABLE table_27808 ( "Position" real, "Race number" text, "Sail number" text, "Yacht" text, "State/country" text, "Yacht type" text, "LOA (Metres)" text, "Skipper" text, "Elapsed time d:hh:mm:ss" text ) -- Using valid SQLite, answer the following questions fo...
SELECT "Yacht type" FROM table_27808 WHERE "Skipper" = 'Bob Oatley'
### Instruction: CREATE TABLE table_203_83 ( id number, "ranking" number, "company" text, "industry" text, "revenue (usd billions)" text, "fy" text, "capitalization (usd billions)" text, "employees" number, "listing" text, "headquarters" text, "ceo" text ) -- Using valid SQ...
SELECT "employees" FROM table_203_83 WHERE "company" = 'vitol'
### 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 Headquarter, MAX(Revenue) FROM Manufacturers GROUP BY Headquarter ORDER BY Headquarter
### Instruction: CREATE TABLE table_57741 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On which date w...
SELECT "Date" FROM table_57741 WHERE "High assists" = 'raymond felton (6)' AND "High points" = 'jason richardson (42)'
### Instruction: CREATE TABLE table_204_23 ( id number, "#" number, "wrestlers" text, "reign" number, "date" text, "days held" number, "location" text, "event" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many tim...
SELECT COUNT(*) FROM table_204_23 WHERE "wrestlers" = 'the suicide blondes'
### Instruction: CREATE TABLE table_2927 ( "Year" real, "Population" real, "Serbs" text, "Germans" text, "Romanians" text, "Hungarians" text, "Croats" text, "Roma" text, "Slovaks" text, "Rest" text ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT COUNT("Germans") FROM table_2927 WHERE "Slovaks" = '0.11%'
### Instruction: CREATE TABLE table_204_94 ( id number, "outcome" text, "date" text, "tournament" text, "surface" text, "partnering" text, "opponent in the final" text, "score in the final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- ...
SELECT "partnering" FROM table_204_94 WHERE id = (SELECT id FROM table_204_94 WHERE "partnering" = 'chanelle scheepers') - 1
### Instruction: CREATE TABLE table_27823 ( "Lighthouse" text, "Location" text, "Province/City" text, "Date First Lit" text, "Tower height in ft (m)" text, "Focal plane in ft (m)" text, "Current Status" text, "Current Condition/ Description" text ) -- Using valid SQLite, answer the fol...
SELECT "Focal plane in ft (m)" FROM table_27823 WHERE "Location" = 'Naidi Hills, Basco'
### Instruction: CREATE TABLE table_39741 ( "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 is the total number of Top-5 when the Top-...
SELECT COUNT("Top-5") FROM table_39741 WHERE "Top-25" = '6' AND "Cuts made" < '12'
### Instruction: CREATE TABLE table_33475 ( "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 away team's score ...
SELECT "Away team score" FROM table_33475 WHERE "Home team score" = '15.16 (106)' AND "Home team" = 'carlton'
### Instruction: CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, Date_of_Birth text ) CREATE TABLE entrepreneur ( Entrepreneur_ID int, People_ID int, Company text, Money_Requested real, Investor text ) -- Using valid SQLite, answer the following quest...
SELECT Investor, COUNT(Investor) FROM entrepreneur GROUP BY Investor ORDER BY COUNT(Investor) DESC
### Instruction: CREATE TABLE table_13429 ( "Non-dictatorship" text, "Pareto efficiency" text, "Majority" text, "Monotone" text, "Consistency & Participation" text, "Condorcet" text, "Condorcet loser" text, "Clone independence" text, "Reversal symmetry" text ) -- Using valid SQLite...
SELECT "Majority" FROM table_13429 WHERE "Clone independence" = 'no'
### Instruction: CREATE TABLE table_26758 ( "Player" text, "Group Legs won" real, "Play-Off Legs won" real, "Winners Group Legs won" real, "Winners Play-Off Legs won" real, "Final position money won*" text, "Total money won" text ) -- Using valid SQLite, answer the following questions for ...
SELECT MAX("Winners Group Legs won") FROM table_26758 WHERE "Total money won" = '£21,850'
### Instruction: CREATE TABLE table_203_425 ( id number, "season" number, "driver" text, "equipment" text, "position" number, "points" number, "races" number, "wins" number, "second" number, "third" number ) -- Using valid SQLite, answer the following questions for the tables p...
SELECT "wins" FROM table_203_425 WHERE "season" = 2012 AND "driver" = 'etienne bax'
### Instruction: CREATE TABLE table_name_25 ( br_sr_no VARCHAR, sr_name VARCHAR, to_iow VARCHAR, withdrawn VARCHAR, built VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the BR/SR number of Freshwater which was withdrawn in 1967 and built ...
SELECT br_sr_no FROM table_name_25 WHERE withdrawn = 1967 AND built < 1892 AND to_iow > 1927 AND sr_name = "freshwater"
### Instruction: CREATE TABLE table_41592 ( "Animal" text, "Cell type" text, "Resting potential (mV)" text, "AP increase (mV)" text, "AP duration (ms)" text, "Conduction speed (m/s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which animal ha...
SELECT "Animal" FROM table_41592 WHERE "AP duration (ms)" = '1.0' AND "Conduction speed (m/s)" = '7–30'
### Instruction: CREATE TABLE table_39805 ( "Airline" text, "ICAO" text, "IATA" text, "Callsign" text, "Commenced operations" real, "Fleet size" real, "Headquarters" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the of Fleet size wi...
SELECT SUM("Fleet size") FROM table_39805 WHERE "IATA" = 'pr' AND "Commenced operations" < '1941'
### Instruction: CREATE TABLE table_69604 ( "Polling Firm" text, "Date Published" text, "T. Papadopoulos" text, "D. Christofias" text, "I. Kasoulidis" text, "K. Themistokleous" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the percenta...
SELECT "T. Papadopoulos" FROM table_69604 WHERE "I. Kasoulidis" = '27.1%'
### Instruction: CREATE TABLE table_75059 ( "Team" text, "Week 1" text, "Week 2" text, "Week 3" text, "Week 4" text, "Week 5" text, "Week 6" text, "Week 7" text, "Week 8 Final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the ...
SELECT "Week 3" FROM table_75059 WHERE "Week 6" = '31+40=71'
### Instruction: CREATE TABLE table_7002 ( "Category" text, "Frequency" text, "White" real, "Brown" real, "Black" real, "Amerindian" real, "Yellow" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of Amerindia...
SELECT SUM("Amerindian") FROM table_7002 WHERE "White" = '6,02' AND "Total" > '100,00'
### Instruction: CREATE TABLE table_8651 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Attendance" real, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the Attendance larger...
SELECT "Date" FROM table_8651 WHERE "Attendance" > '19,356' AND "Record" = '31–32–13'
### 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 decor, AVG(baseprice), MIN(baseprice) FROM rooms GROUP BY decor
### Instruction: CREATE TABLE participants ( participant_id number, participant_type_code text, participant_details text ) CREATE TABLE services ( service_id number, service_type_code text ) CREATE TABLE events ( event_id number, service_id number, event_details text ) CREATE TABLE pa...
SELECT participant_id, participant_type_code, participant_details FROM participants
### Instruction: CREATE TABLE table_73782 ( "Song" text, "Singer" text, "Co-Singers" text, "Music Director" text, "Lyricist" text, "Co-Stars" text, "Movie/Album" text, "Year" real, "Additional Info" text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT COUNT("Co-Singers") FROM table_73782 WHERE "Co-Stars" = 'Parveen Babi'
### Instruction: CREATE TABLE table_26968 ( "Expedition" text, "Crew" text, "Launch date" text, "Flight up" text, "Landing date" text, "Flight down" text, "Duration (days)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What station was sent...
SELECT "Flight up" FROM table_26968 WHERE "Launch date" = '23 July 1980 18:33:03'
### Instruction: CREATE TABLE table_name_25 ( margin_of_victory VARCHAR, year VARCHAR, to_par VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Margin of victory has a Year larger than 1994, and a To par of 14, and a Score of 69-67-...
SELECT margin_of_victory FROM table_name_25 WHERE year > 1994 AND to_par = "–14" AND score = 69 - 67 - 69 - 69 = 274
### Instruction: CREATE TABLE table_58346 ( "Lt. Governor" text, "Commission Date" text, "End Date" text, "Governor" text, "Party" text, "Term" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the end date of the term for Governor of richa...
SELECT "End Date" FROM table_58346 WHERE "Governor" = 'richard j. oglesby' AND "Term" = '1885–1889'
### Instruction: CREATE TABLE table_14125 ( "Constituency number" text, "Name" text, "Reserved for ( SC / ST /None)" text, "District" text, "Number of electorates (2009)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Number of electorates (20...
SELECT COUNT("Number of electorates (2009)") FROM table_14125 WHERE "District" = 'sheopur' AND "Constituency number" = '1'
### Instruction: CREATE TABLE table_22841 ( "Rank" real, "Race Number" real, "Name" text, "NOC" text, "- 250m" text, "- 500m" text, "- 750m" text, "- 1,000m" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the -250m is 18.852, what is ...
SELECT "- 750m" FROM table_22841 WHERE "- 250m" = '18.852'
### Instruction: CREATE TABLE table_204_461 ( id number, "res." text, "record" text, "opponent" text, "method" text, "event" text, "date" text, "round" number, "time" text, "location" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables ...
SELECT "opponent" FROM table_204_461 WHERE "res." = 'loss' AND "opponent" <> 'cody goodale'
### Instruction: CREATE TABLE table_37606 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Tournament has an Outcome of winner, and a Surface of clay,...
SELECT "Tournament" FROM table_37606 WHERE "Outcome" = 'winner' AND "Surface" = 'clay' AND "Score" = '6–4, 6–1'
### Instruction: CREATE TABLE phone_market ( Market_ID int, Phone_ID text, Num_of_stock int ) CREATE TABLE phone ( Name text, Phone_ID int, Memory_in_G int, Carrier text, Price real ) CREATE TABLE market ( Market_ID int, District text, Num_of_employees int, Num_of_shops...
SELECT Carrier, COUNT(Carrier) FROM phone GROUP BY Carrier
### Instruction: CREATE TABLE table_27913 ( "Settlement" text, "Cyrillic Name Other Names" text, "Type" text, "Population (2011)" real, "Largest ethnic group (2002)" text, "Dominant religion (2002)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. --...
SELECT "Cyrillic Name Other Names" FROM table_27913 WHERE "Population (2011)" = '2125'
### Instruction: CREATE TABLE table_27322 ( "Region" text, "Prison inmates Men" real, "Prison inmates Women" real, "Prison inmates Total" real, "Incarceration rate Male" real, "Incarceration rate Female" real, "Incarceration rate Total" real, "Country comparison" text ) -- Using valid ...
SELECT MAX("Incarceration rate Male") FROM table_27322 WHERE "Region" = 'Maule'
### Instruction: CREATE TABLE table_train_256 ( "id" int, "mini_mental_state_examination_mmse" int, "language" string, "mild_cognitive_impairment" bool, "moca_score" int, "dementia" bool, "body_mass_index_bmi" float, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the fo...
SELECT * FROM table_train_256 WHERE age >= 2 AND age <= 40
### Instruction: CREATE TABLE table_47888 ( "Name" text, "Height (m)" real, "Height (ft)" real, "Location" text, "Year built" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest height in meters for the building located in mail nder st...
SELECT MIN("Height (m)") FROM table_47888 WHERE "Location" = 'mailänder straße 1, sachsenhausen-süd' AND "Height (ft)" < '328.1'
### Instruction: CREATE TABLE region ( region_id number, region_code text, region_name text ) CREATE TABLE storm ( storm_id number, name text, dates_active text, max_speed number, damage_millions_usd number, number_deaths number ) CREATE TABLE affected_region ( region_id number...
SELECT region_code, region_name FROM region ORDER BY region_code
### Instruction: CREATE TABLE table_37656 ( "Surname" text, "First" text, "D.O.B." text, "Bats" text, "Throws" text, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which DOB has Bats of r, and Throws of r, and a Position of rhp, and a...
SELECT "D.O.B." FROM table_37656 WHERE "Bats" = 'r' AND "Throws" = 'r' AND "Position" = 'rhp' AND "First" = 'john'
### Instruction: CREATE TABLE table_53430 ( "Name" text, "League" real, "FA Cup" real, "League Cup" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest number of goals scored in regular league games by Ehiogu where he sco...
SELECT MIN("League") FROM table_53430 WHERE "FA Cup" = '0' AND "Total" = '1' AND "Name" = 'ehiogu' AND "League Cup" > '0'
### Instruction: CREATE TABLE table_25602 ( "No." real, "Season" real, "Bowler" text, "Batsmen" text, "For" text, "Against" text, "Ground" text, "Scorecard" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many sesason were there when ...
SELECT COUNT("Season") FROM table_25602 WHERE "For" = 'Deccan Chargers' AND "Bowler" = 'Amit Mishra'