instruction
stringlengths
212
6.3k
output
stringlengths
6
2.03k
### 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 name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name ORDER BY name
### Instruction: CREATE TABLE table_204_731 ( id number, "rank" number, "athlete" text, "shooting\nscore (pts)" text, "fencing\nvictories (pts)" text, "swimming\ntime (pts)" text, "riding\npenalties (pts)" text, "running\ntime (pts)" text, "total" number ) -- Using valid SQLite, an...
SELECT "athlete" FROM table_204_731 ORDER BY "riding\npenalties (pts)" DESC LIMIT 1
### Instruction: CREATE TABLE table_43524 ( "School" text, "Bask" real, "Golf" text, "Soccer" text, "Soft" text, "Swimming" text, "Tennis" real, "Indoor track" text, "Outdoor track" text, "Volleyball" text, "Total" real ) -- Using valid SQLite, answer the following question...
SELECT "Swimming" FROM table_43524 WHERE "Total" > '35' AND "Volleyball" = '1'
### 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 Price, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 GROUP BY Name
### Instruction: CREATE TABLE table_42710 ( "Season" text, "League" text, "Games" real, "Lost" real, "Tied" real, "Points" real, "Winning %" real, "Goals for" real, "Goals against" real, "Standing" text ) -- Using valid SQLite, answer the following questions for the tables prov...
SELECT COUNT("Lost") FROM table_42710 WHERE "Tied" < '5' AND "Goals for" > '330'
### Instruction: CREATE TABLE table_2049 ( "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. -- How many Latin Americans were there in 2001 in the province ...
SELECT MAX("Latin Americans 2001") FROM table_2049 WHERE "% 2001" = '0.0%' AND "% 2011" = '0.2%'
### Instruction: CREATE TABLE table_13568 ( "Year" real, "Stage" real, "Start of stage" text, "Distance (km)" text, "Category of climb" text, "Stage winner" text, "Yellow jersey" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who was the Sta...
SELECT "Stage winner" FROM table_13568 WHERE "Stage" < '16' AND "Year" < '1986' AND "Distance (km)" = '19.6'
### Instruction: CREATE TABLE people ( People_ID int, District text, Name text, Party text, Age int ) CREATE TABLE debate ( Debate_ID int, Date text, Venue text, Num_of_Audience int ) CREATE TABLE debate_people ( Debate_ID int, Affirmative int, Negative int, If_Affi...
SELECT Venue, COUNT(Venue) FROM debate GROUP BY Venue ORDER BY Venue
### Instruction: CREATE TABLE table_62972 ( "Rank" real, "Lane" real, "Athlete" text, "Nationality" text, "Time" real, "React" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Rank has a Reaction time larger than 0.20400000000000001, and a T...
SELECT MAX("Rank") FROM table_62972 WHERE "React" > '0.20400000000000001' AND "Time" > '45.56'
### Instruction: CREATE TABLE table_203_142 ( id number, "pos" text, "no" number, "rider" text, "bike" text, "laps" number, "time" text, "grid" number, "points" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- did james toseland scor...
SELECT (SELECT "points" FROM table_203_142 WHERE "rider" = 'james toseland') > (SELECT "points" FROM table_203_142 WHERE "rider" = 'shinichi nakatomi')
### Instruction: CREATE TABLE table_40110 ( "Capacity" text, "Volts" text, "Temp." text, "Energy-to-weight ratio" text, "Power-to-weight ratio" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the capacity with 2.7v volts and a power-to-weight...
SELECT "Capacity" FROM table_40110 WHERE "Volts" = '2.7v' AND "Power-to-weight ratio" = '5.44 w/kg c/1 (1.875a)'
### Instruction: CREATE TABLE table_204_911 ( id number, "album / name" text, "artist(s)" text, "label" text, "role/credit" text, "date" text, "chart#" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which label was he a part of after pony ca...
SELECT "label" FROM table_204_911 WHERE id = (SELECT MAX(id) FROM table_204_911 WHERE "label" = 'pony canyon, japan' AND "date" = 2007) + 1
### Instruction: CREATE TABLE table_62921 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the score when the venue is stade g n ral seyni kountch , niamey, the competitio...
SELECT "Score" FROM table_62921 WHERE "Venue" = 'stade général seyni kountché, niamey' AND "Competition" = 'friendly' AND "Date" = '9 october 2012'
### Instruction: CREATE TABLE table_50093 ( "Country" text, "Unit p koe/$05" text, "2006" real, "2007" real, "2008" real, "2009" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2009 average if 2008 is less than 0,11 and 2007 is less t...
SELECT AVG("2009") FROM table_50093 WHERE "2008" < '0,11' AND "2007" < '0,08'
### Instruction: CREATE TABLE table_63338 ( "Rank" text, "Rider" text, "Horse" text, "Nation" text, "Judge E" text, "Judge C" text, "Judge M" text, "Penalty Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the nation when t...
SELECT "Nation" FROM table_63338 WHERE "Penalty Points" < '40.2' AND "Judge E" = '82.22'
### Instruction: CREATE TABLE debate_people ( Debate_ID int, Affirmative int, Negative int, If_Affirmative_Win bool ) CREATE TABLE debate ( Debate_ID int, Date text, Venue text, Num_of_Audience int ) CREATE TABLE people ( People_ID int, District text, Name text, Party t...
SELECT Party, COUNT(*) FROM people GROUP BY Party ORDER BY COUNT(*)
### 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, MIN(Weight) FROM people GROUP BY Sex ORDER BY Sex
### Instruction: CREATE TABLE table_8737 ( "Outcome" text, "Year" real, "Championship" text, "Surface" text, "Partner" text, "Opponents in final" text, "Score in final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Championship, whe...
SELECT "Championship" FROM table_8737 WHERE "Outcome" = 'runner-up' AND "Opponents in final" = 'gigi fernández natalia zvereva'
### Instruction: CREATE TABLE table_18841 ( "Autonomous Community" text, "Hydroelectric power" real, "Wind power" real, "Solar power" real, "Biomass power" real, "Solid waste power" real, "Total Renewable Generation" real, "Total Electricity Demand" real, "% Renewable of Total Electr...
SELECT COUNT("Autonomous Community") FROM table_18841 WHERE "Total Renewable Generation" = '1375'
### Instruction: CREATE TABLE table_47494 ( "Rank" real, "Club" text, "Points" real, "Played" real, "Victories" real, "Draws" real, "Defeats" real, "Goals for" real, "Goals against" real, "Goal average" real ) -- Using valid SQLite, answer the following questions for the tables...
SELECT MIN("Goals for") FROM table_47494 WHERE "Goals against" = '37' AND "Victories" < '15'
### Instruction: CREATE TABLE table_73591 ( "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 COUNT("Avg. Start") FROM table_73591 WHERE "Avg. Finish" = '11.7'
### Instruction: CREATE TABLE customers ( customer_details VARCHAR, customer_id VARCHAR ) CREATE TABLE policies ( policy_id VARCHAR, customer_id VARCHAR ) CREATE TABLE claim_headers ( amount_piad INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- W...
SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT MIN(amount_piad) FROM claim_headers)
### Instruction: CREATE TABLE table_dev_8 ( "id" int, "systolic_blood_pressure_sbp" int, "heart_disease" bool, "diastolic_blood_pressure_dbp" int, "coronary_artery_disease_cad" bool, "triglyceride_tg" float, "hypertension" bool, "NOUSE" float ) -- Using valid SQLite, answer the followi...
SELECT * FROM table_dev_8 WHERE triglyceride_tg >= 500
### Instruction: CREATE TABLE table_75982 ( "Position" text, "Jersey #" real, "Name" text, "Height (cm)" real, "Weight (kg)" real, "Birthdate" text, "Birthplace" text, "2007\u20132008 Team" text, "NHL rights, if any" text ) -- Using valid SQLite, answer the following questions for ...
SELECT COUNT("Height (cm)") FROM table_75982 WHERE "Birthplace" = 'new canaan, connecticut'
### Instruction: CREATE TABLE table_train_155 ( "id" int, "cholesterol" float, "bleeding" int, "systolic_blood_pressure_sbp" int, "diabetic" string, "hyperlipidemia" bool, "creatinine_clearance_cl" float, "platelet_count" float, "hypertension" bool, "NOUSE" float ) -- Using val...
SELECT * FROM table_train_155 WHERE bleeding = 1 OR platelet_count < 80
### Instruction: CREATE TABLE table_2990 ( "Year" real, "Kentucky Derby" real, "The Preakness Stakes" text, "Kentucky Oaks" text, "Belmont Stakes" text, "Travers Stakes" text, "Breeders Cup Saturday" text, "Breeders Cup Friday" text ) -- Using valid SQLite, answer the following questio...
SELECT "Breeders Cup Friday" FROM table_2990 WHERE "Breeders Cup Saturday" = '52,987'
### Instruction: CREATE TABLE table_24783 ( "Date" text, "Time" text, "Opponent" text, "Rank#" text, "Site" text, "Result" text, "Attendance" text, "Winning Pitcher" text, "Losing Pitcher" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT "Time" FROM table_24783 WHERE "Site" = 'USF Softball Field • Tampa, FL' AND "Result" = 'W4-0'
### Instruction: CREATE TABLE table_49993 ( "Tournament" text, "1980" text, "1981" text, "1982" text, "1983" text, "1984" text, "1985" text, "1986" text, "1987" text, "Career SR" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Wha...
SELECT "Career SR" FROM table_49993 WHERE "1985" = '1r'
### 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, MIN(Weight) FROM people GROUP BY Sex ORDER BY Sex DESC
### Instruction: CREATE TABLE table_48285 ( "Athlete" text, "Event" text, "Swim (1.5km)" text, "Trans 1" text, "Bike (40km)" text, "Trans 2" text, "Run (10km)" text, "Total Time" text, "Rank" real ) -- Using valid SQLite, answer the following questions for the tables provided above...
SELECT "Trans 1" FROM table_48285 WHERE "Total Time" = '2:00:40.20'
### Instruction: CREATE TABLE table_56332 ( "Team" text, "Games Played" real, "Wins" real, "Losses" real, "Ties" real, "Goals For" real, "Goals Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average number of ties when g...
SELECT AVG("Ties") FROM table_56332 WHERE "Goals Against" < '56' AND "Team" = 'ottawa hockey club' AND "Goals For" > '47'
### Instruction: CREATE TABLE table_36635 ( "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_36635 WHERE "Points" = '35' AND "Try bonus" = '1'
### Instruction: CREATE TABLE table_name_41 ( saturday_shani__saturn_ VARCHAR, sunday_surya__the_sun_ VARCHAR, tuesday_mangala__mars_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the result on Saturday when it's raviv r on Sunday and manga av r...
SELECT saturday_shani__saturn_ FROM table_name_41 WHERE sunday_surya__the_sun_ = "रविवार ravivār" AND tuesday_mangala__mars_ = "मंगळवार mangaḷavār"
### Instruction: CREATE TABLE table_17819 ( "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 "Won" FROM table_17819 WHERE "Try bonus" = '11'
### Instruction: CREATE TABLE location ( restaurant_id int, house_number int, street_name varchar, city_name varchar ) CREATE TABLE geographic ( city_name varchar, county varchar, region varchar ) CREATE TABLE restaurant ( id int, name varchar, food_type varchar, city_name ...
SELECT COUNT(*) FROM geographic, restaurant WHERE geographic.county = 'yolo county' AND restaurant.city_name = geographic.city_name AND restaurant.food_type = 'italian'
### Instruction: CREATE TABLE table_59312 ( "Position" real, "Club" text, "Played" real, "Points" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real ) -- Using valid SQLite, answer the following questions for the table...
SELECT MIN("Draws") FROM table_59312 WHERE "Club" = 'levante ud' AND "Goal Difference" < '6'
### Instruction: CREATE TABLE table_12908 ( "Elector" text, "Nationality" text, "Order" text, "Title" text, "Elevated" text, "Elevator" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Elevator has Elevated of april 12, 1281, a Nationality o...
SELECT "Elevator" FROM table_12908 WHERE "Elevated" = 'april 12, 1281' AND "Nationality" = 'french' AND "Elector" = 'jean cholet'
### Instruction: CREATE TABLE table_11334 ( "Municipalities" text, "Extension km\u00b2" text, "Population (hab)" text, "Density (hab/ km\u00b2 )" text, "Altitude m" text, "Distance Medell\u00edn Downtown ( km )" text ) -- Using valid SQLite, answer the following questions for the tables provid...
SELECT "Altitude m" FROM table_11334 WHERE "Distance Medell\u00edn Downtown ( km )" = '42'
### Instruction: CREATE TABLE table_23823 ( "Barangay" text, "District" text, "Population (May 1, 2000)" real, "Population (August 1, 2007)" real, "Population (May 1, 2010)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the population may for ...
SELECT "Population (May 1, 2010)" FROM table_23823 WHERE "District" = 'CadaLuSan' AND "Population (August 1, 2007)" = '1423'
### Instruction: CREATE TABLE table_2803 ( "Season" text, "Mittelfranken Nord" text, "Mittelfranken S\u00fcd" text, "Unterfranken West" text, "Unterfranken Ost" text, "Oberfranken West" text, "Oberfranken Ost" text ) -- Using valid SQLite, answer the following questions for the tables prov...
SELECT "Season" FROM table_2803 WHERE "Mittelfranken S\u00fcd" = 'ASV Nürnberg-Süd'
### Instruction: CREATE TABLE table_46099 ( "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 "Points" FROM table_46099 WHERE "Try bonus" = '5' AND "Club" = 'barry rfc'
### Instruction: CREATE TABLE table_58344 ( "NGC number" real, "Object type" text, "Constellation" text, "Right ascension ( J2000 )" text, "Declination ( J2000 )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which NGC number has an Object type of ...
SELECT MAX("NGC number") FROM table_58344 WHERE "Object type" = 'open cluster' AND "Right ascension ( J2000 )" = '06h01m06s'
### Instruction: CREATE TABLE table_23186 ( "Rank" real, "Mountain Peak" text, "Mountain Range" text, "Elevation" text, "Prominence" text, "Isolation" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the isolation of the mountain peak with ...
SELECT "Isolation" FROM table_23186 WHERE "Prominence" = '1340.549 = 4,397feet 1,340m'
### Instruction: CREATE TABLE table_204_225 ( id number, "rank" number, "country/territory" text, "miss supranational" number, "1st runner-up" number, "2nd runner-up" number, "3rd runner-up" number, "4th runner-up" number, "semifinalists" number, "total" number ) -- Using valid...
SELECT "country/territory" FROM table_204_225 WHERE "1st runner-up" = 2
### Instruction: CREATE TABLE companies ( id number, name text, headquarters text, industry text, sales_billion number, profits_billion number, assets_billion number, market_value_billion text ) CREATE TABLE buildings ( id number, name text, city text, height number, ...
SELECT COUNT(DISTINCT industry) FROM companies
### Instruction: CREATE TABLE table_203_780 ( id number, "rank" number, "diver" text, "preliminary\npoints" number, "preliminary\nrank" number, "final\npoints" number, "final\nrank" number, "final\ntotal" number ) -- Using valid SQLite, answer the following questions for the tables pro...
SELECT "diver" FROM table_203_780 WHERE "final\npoints" > (SELECT "final\npoints" FROM table_203_780 WHERE "diver" = 'ingrid kramer')
### Instruction: CREATE TABLE table_31193 ( "Skip (Club)" text, "W" real, "L" real, "PF" real, "PA" real, "Ends Won" real, "Ends Lost" real, "Blank Ends" real, "Stolen Ends" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the ...
SELECT MIN("Ends Lost") FROM table_31193 WHERE "Stolen Ends" = '6' AND "L" > '5.0'
### Instruction: CREATE TABLE table_75709 ( "Goal" real, "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Score has a Date of october 8, 2005, and a Venue of estadio alfon...
SELECT "Score" FROM table_75709 WHERE "Date" = 'october 8, 2005' AND "Venue" = 'estadio alfonso lastras, san luis potosí, mexico'
### Instruction: CREATE TABLE table_10401 ( "NGC number" real, "Object type" text, "Constellation" text, "Right ascension ( J2000 )" text, "Declination ( J2000 )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of NGC number for...
SELECT COUNT("NGC number") FROM table_10401 WHERE "Constellation" = 'sagittarius' AND "Object type" = 'diffuse nebula' AND "Declination ( J2000 )" = '°02′'
### Instruction: CREATE TABLE school ( School_ID int, Grade text, School text, Location text, Type text ) 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,...
SELECT Party, COUNT(*) FROM driver GROUP BY Party ORDER BY COUNT(*) DESC
### Instruction: CREATE TABLE table_74508 ( "Region" text, "2004" text, "2005" text, "2006" text, "2007" text, "2009" text, "2010" text, "2011" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2005 Lukoil oil prodroduction when...
SELECT "2005" FROM table_74508 WHERE "2007" = '91.100'
### Instruction: CREATE TABLE table_41452 ( "Rank" real, "Location" text, "Total Passengers" real, "Annual change" text, "Capacity" real, "Capacity in use" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest capacity of the airpor...
SELECT MAX("Capacity") FROM table_41452 WHERE "Rank" > '6' AND "Location" = 'rio de janeiro' AND "Total Passengers" > '5,099,643'
### Instruction: CREATE TABLE table_train_1 ( "id" int, "sinusal_rhythm" bool, "severe_sepsis" bool, "hemodynamic_instability" bool, "social_security" bool, "septic_shock" bool, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided a...
SELECT * FROM table_train_1 WHERE age > 18 AND (severe_sepsis = 1 OR septic_shock = 1)
### Instruction: CREATE TABLE browser ( id int, name text, market_share real ) CREATE TABLE Web_client_accelerator ( id int, name text, Operating_system text, Client text, Connection text ) CREATE TABLE accelerator_compatible_browser ( accelerator_id int, browser_id int, co...
SELECT Operating_system, COUNT(*) FROM Web_client_accelerator GROUP BY Operating_system ORDER BY Operating_system
### Instruction: CREATE TABLE table_56167 ( "Rd #" real, "Pick #" real, "Player" text, "Team (League)" text, "Reg GP" real, "Pl GP" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of playoff games played by the Seattle Th...
SELECT COUNT("Pl GP") FROM table_56167 WHERE "Reg GP" < '5' AND "Team (League)" = 'seattle thunderbirds' AND "Pick #" < '131'
### Instruction: CREATE TABLE table_60548 ( "Player" text, "Position" text, "Ekstraklasa" real, "Polish Cup" real, "UEFA Cup" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Polish Cup, when Position is 'Midfielde...
SELECT MIN("Polish Cup") FROM table_60548 WHERE "Position" = 'midfielder' AND "Player" = 'miroslav radović' AND "Ekstraklasa" < '1'
### Instruction: CREATE TABLE table_56637 ( "Elector" text, "Nationality" text, "Faction" text, "Order and Title" text, "Elevated" text, "Elevator" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Elector with a Nationality with roman,...
SELECT "Elector" FROM table_56637 WHERE "Nationality" = 'roman' AND "Elevator" = 'urban iv' AND "Elevated" = '1261, december 17'
### Instruction: CREATE TABLE table_52889 ( "Country" text, "Preliminaries" real, "Interview" real, "Swimsuit" real, "Evening Gown" real, "Average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Pennsylvania's average where the swimsuit ...
SELECT AVG("Average") FROM table_52889 WHERE "Swimsuit" < '9.109' AND "Country" = 'pennsylvania' AND "Evening Gown" < '9.163'
### Instruction: CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following ...
SELECT T1.Code, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code
### Instruction: CREATE TABLE table_30220 ( "Council" text, "TUV" real, "Democratic Unionist" real, "Ulster Unionist" real, "Alliance" real, "SDLP" real, "Sinn F\u00e9in" real, "Green (NI)" real, "Independent" real, "Others" text, "Total" real ) -- Using valid SQLite, answe...
SELECT MIN("Alliance") FROM table_30220 WHERE "Total" = '25'
### 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 Date_of_Birth, Height FROM people ORDER BY Height DESC
### Instruction: CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), AllergyType VARCHAR(20) ) CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, ...
SELECT Age, COUNT(*) FROM Student GROUP BY Age
### Instruction: CREATE TABLE table_22515 ( "Number" real, "Sanskrit" text, "International Alphabet of Sanskrit Transliteration" text, "Sanskrit gloss" text, "Western name" text, "Greek" text, "Gloss" text, "Tattva (Element)" text, "Quality" text, "Ruling Planet" text ) -- Usin...
SELECT COUNT("Quality") FROM table_22515 WHERE "Sanskrit gloss" = 'scorpion'
### Instruction: CREATE TABLE table_69956 ( "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. -- What year did dave f. mctaggart w...
SELECT MAX("Year") FROM table_69956 WHERE "Men's singles" = 'dave f. mctaggart' AND "Mixed doubles" = 'robert b. williams ethel marshall'
### Instruction: CREATE TABLE table_76925 ( "Taper" text, "Large end" real, "Small end" real, "Length" real, "Taper/ ft" real, "Taper/ in" real, "Angle from center/\u00b0" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Large end has a ...
SELECT COUNT("Large end") FROM table_76925 WHERE "Taper/ ft" < '0.6000000000000001'
### 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 Code, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 GROUP BY Name
### Instruction: CREATE TABLE table_80383 ( "Year" text, "Men's singles" text, "Women's singles" text, "Men's doubles" text, "Women's doubles" text, "Mixed doubles" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who won the Women's doubles in th...
SELECT "Women's doubles" FROM table_80383 WHERE "Men's doubles" = 'david eddy eddy sutton' AND "Men's singles" = 'david eddy'
### Instruction: CREATE TABLE table_38272 ( "NTFA Div 2" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Byes have an Against smaller than 1647, and an NTFA Div 2 of fin...
SELECT MAX("Byes") FROM table_38272 WHERE "Against" < '1647' AND "NTFA Div 2" = 'fingal valley' AND "Wins" < '14'
### Instruction: CREATE TABLE table_203_794 ( id number, "year" number, "location" text, "attendance" number, "theme phrase" text, "top messages" text, "host" text, "opening general session guest(s)" text, "closing general session guest(s)" text, "sunday night reception" text, ...
SELECT "theme phrase" FROM table_203_794 ORDER BY id DESC LIMIT 1
### Instruction: CREATE TABLE table_12596 ( "State" text, "Status" text, "Association Agreement" text, "Membership Application" text, "Candidate status" text, "Negotiations start" text, "Screening completed" text, "Acquis Chapters open/closed" text ) -- Using valid SQLite, answer the f...
SELECT "Acquis Chapters open/closed" FROM table_12596 WHERE "Membership Application" = '2009-04-28'
### Instruction: CREATE TABLE table_37958 ( "Date" text, "Time" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Set 3 has a Score of 3 2, and a Set 2 of 25 23, and a ...
SELECT "Set 3" FROM table_37958 WHERE "Score" = '3–2' AND "Set 2" = '25–23' AND "Time" = '19:00'
### Instruction: CREATE TABLE table_79619 ( "Player" text, "Played" real, "Legs Won" real, "Legs Lost" real, "100+" real, "140+" real, "180s" real, "High Checkout" real, "3-dart Average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. --...
SELECT MIN("High Checkout") FROM table_79619 WHERE "140+" = '61' AND "Played" > '6'
### Instruction: CREATE TABLE table_7192 ( "Outcome" text, "Date" real, "Tournament" text, "Surface" text, "Partner" text, "Opponents in the final" text, "Score in the final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Opponents in t...
SELECT "Opponents in the final" FROM table_7192 WHERE "Date" = '1984' AND "Score in the final" = '7–6, 6–1'
### Instruction: CREATE TABLE table_53125 ( "City district" text, "Area km\u00b2" text, "Population 2007 census(hab)" text, "Housing (2007)" text, "Density (hab/km\u00b2)" text, "Elevation msl" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What...
SELECT "Area km\u00b2" FROM table_53125 WHERE "Density (hab/km\u00b2)" = '955.6'
### Instruction: CREATE TABLE table_54965 ( "State" text, "Interview" real, "Swimsuit" real, "Evening gown" real, "Average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of the evening gown scores where the interview score is less t...
SELECT SUM("Evening gown") FROM table_54965 WHERE "Interview" < '8.77' AND "Swimsuit" = '7.8' AND "Average" < '8.2'
### Instruction: CREATE TABLE table_56933 ( "District" real, "Place of Birth" text, "Delegate" text, "Party" text, "Took Office" real, "Committee" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where was the place of birth for the delegate who t...
SELECT "Place of Birth" FROM table_56933 WHERE "Took Office" > '1982' AND "District" < '43' AND "Committee" = 'health and government operations'
### Instruction: CREATE TABLE table_73684 ( "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. -- What ...
SELECT "MLS Cup Playoffs" FROM table_73684 WHERE "CONCACAF Champions Cup / CONCACAF Champions League" = 'Quarter-Finals (09-10)'
### Instruction: CREATE TABLE table_25002 ( "Character" text, "Original Manchester Performer" text, "Original West End Performer" text, "Original Broadway Performer" text, "Original UK Tour Performer" text, "Original Non-Equity US Tour Performer" text, "Original Italian Tour Performer" text,...
SELECT "Original South Korean Performer" FROM table_25002 WHERE "Original Manchester Performer" = 'Adebayo Bolaji'
### Instruction: CREATE TABLE table_57306 ( "Rank" real, "English title" text, "Chinese title" text, "Average" real, "Peak" real, "Premiere" real, "Finale" real, "HK viewers" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the low...
SELECT MIN("Premiere") FROM table_57306 WHERE "Peak" > '35' AND "Rank" = '10' AND "Finale" > '33'
### Instruction: CREATE TABLE film ( film_id number, title text, studio text, director text, gross_in_dollar number ) CREATE TABLE market ( market_id number, country text, number_cities number ) CREATE TABLE film_market_estimation ( estimation_id number, low_estimate number, ...
SELECT MAX(number_cities), MIN(number_cities) FROM market
### Instruction: CREATE TABLE table_203_410 ( id number, "game" number, "date" text, "opponent" text, "location" text, "score" text, "attendance" number, "record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which game date had a highe...
SELECT "date" FROM table_203_410 WHERE "date" IN ('february 8, 2009', 'april 4, 2009') ORDER BY "attendance" DESC LIMIT 1
### Instruction: CREATE TABLE table_24643 ( "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 "Winnings" FROM table_24643 WHERE "Starts" = '15'
### Instruction: CREATE TABLE table_12790 ( "Tournament" text, "2009" text, "2010" text, "2011" text, "2012" text, "Win %" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2009 for 2012 1R in Wimbledon and a 2011 2r? ### Response:
SELECT "2009" FROM table_12790 WHERE "2012" = '1r' AND "Tournament" = 'wimbledon' AND "2011" = '2r'
### Instruction: CREATE TABLE table_38569 ( "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. -- Which Class has a ERP W larger than 205, and a Freq...
SELECT "Class" FROM table_38569 WHERE "ERP W" > '205' AND "Frequency MHz" < '93.9' AND "Call sign" = 'k210cb'
### Instruction: CREATE TABLE table_62439 ( "Tournament" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Tournament, when 2012 is 'A', when 2011 is 'A', and when 2008 is 'A'...
SELECT "Tournament" FROM table_62439 WHERE "2012" = 'a' AND "2011" = 'a' AND "2008" = 'a'
### Instruction: CREATE TABLE table_10332 ( "Outcome" text, "Date" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Partner with the surface of Clay ended up as a runner-up with...
SELECT "Partner" FROM table_10332 WHERE "Surface" = 'clay' AND "Outcome" = 'runner-up' AND "Score" = '1–6, 6–4, [10–12]'
### Instruction: CREATE TABLE table_23111 ( "SP" text, "Number" real, "Horse" text, "Age" real, "Handicap (st-lb)" text, "Jockey" text, "Trainer" text, "Owner" text, "Colours" text, "Finishing position" text ) -- Using valid SQLite, answer the following questions for the tables...
SELECT COUNT("Number") FROM table_23111 WHERE "SP" = '20/1' AND "Finishing position" = 'Fence 19'
### Instruction: CREATE TABLE exhibition_record ( Exhibition_ID int, Date text, Attendance int ) CREATE TABLE exhibition ( Exhibition_ID int, Year int, Theme text, Artist_ID int, Ticket_Price real ) CREATE TABLE artist ( Artist_ID int, Name text, Country text, Year_Join...
SELECT Country, AVG(Age) FROM artist GROUP BY Country ORDER BY Country DESC
### Instruction: CREATE TABLE table_train_53 ( "id" int, "immune_suppression" bool, "need_hemodialysis" bool, "steroid_therapy" bool, "cardiogenic_shock" bool, "hematologic_disease" bool, "coronary_syndrome" bool, "NOUSE" float ) -- Using valid SQLite, answer the following questions fo...
SELECT * FROM table_train_53 WHERE immune_suppression = 1 OR steroid_therapy = 1
### Instruction: CREATE TABLE table_38651 ( "Tournament" text, "2006" 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. -- Which 2009 has a 2006 of A, and a 2011 of ...
SELECT "2009" FROM table_38651 WHERE "2006" = 'a' AND "2011" = 'sf'
### Instruction: CREATE TABLE table_46521 ( "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 Location has a Method of sub...
SELECT "Location" FROM table_46521 WHERE "Method" = 'submission (rear naked choke)' AND "Round" = '1' AND "Event" = 'ufc 127'
### Instruction: CREATE TABLE table_204_649 ( id number, "rank" number, "name" text, "image" number, "height\nft (m)" text, "floors" number, "year" number, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the difference in ...
SELECT ABS((SELECT "height\nft (m)" FROM table_204_649 WHERE "name" = 'key tower') - (SELECT "height\nft (m)" FROM table_204_649 WHERE "name" = '55 public square'))
### Instruction: CREATE TABLE table_204_169 ( id number, "athlete" text, "event" text, "race 1\ntime" text, "race 2\ntime" text, "total\ntime" text, "total\nrank" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who came after borislav dimit...
SELECT "athlete" FROM table_204_169 WHERE id = (SELECT id FROM table_204_169 WHERE "athlete" = 'borislav dimitrachkov' AND "event" = 'slalom') + 1
### Instruction: CREATE TABLE table_36269 ( "Stage" text, "Winner" text, "General classification" text, "Points classification" text, "Mountains classification" text, "Asian rider classification" text, "Team classification" text, "Asian team classification" text ) -- Using valid SQLite...
SELECT "General classification" FROM table_36269 WHERE "Asian rider classification" = 'shinichi fukushima' AND "Winner" = 'jeremy hunt'
### Instruction: CREATE TABLE table_27404 ( "Language" text, "Sorata Municipality" text, "Guanay Municipality" text, "Tacacoma Municipality" text, "Quiabaya Municipality" text, "Combaya Municipality" text, "Tipuani Municipality" text, "Mapiri Municipality" text, "Teoponte Municipalit...
SELECT "Tipuani Municipality" FROM table_27404 WHERE "Tacacoma Municipality" = '6'
### Instruction: CREATE TABLE table_13975 ( "Country" text, "Airport" text, "City" text, "2008" real, "Change (08/07)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Country has a Change (08/07) of unknown, and a 2008 larger than 1,102,497, an...
SELECT "Country" FROM table_13975 WHERE "Change (08/07)" = 'unknown' AND "2008" > '1,102,497' AND "City" = 'luanda'
### Instruction: CREATE TABLE table_24651 ( "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 "Top 5" FROM table_24651 WHERE "Avg. Finish" = '40.3'
### Instruction: CREATE TABLE table_train_68 ( "id" int, "sequential_organ_failure_assessment_sofa" int, "pregnancy_or_lactation" bool, "piro_predispose_infection_response_organ_dysfunction_score" int, "systolic_blood_pressure_sbp" int, "hypotension" bool, "age" float, "lactate" int, ...
SELECT * FROM table_train_68 WHERE age < 18
### Instruction: CREATE TABLE table_19826 ( "North Carolina" text, "273.7%" text, "South Carolina" text, "132.1%" text, "Mississippi" text, "95.8%" text, "Wisconsin" text, "59.4%" text, "Vermont" text, "32.5%" text ) -- Using valid SQLite, answer the following questions for the...
SELECT "132.1%" FROM table_19826 WHERE "North Carolina" = 'Colorado'
### Instruction: CREATE TABLE table_76127 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Week when the result was l 13 10, November 30, 1975, with more than ...
SELECT MIN("Week") FROM table_76127 WHERE "Result" = 'l 13–10' AND "Date" = 'november 30, 1975' AND "Attendance" > '44,982'