instruction
stringlengths
212
6.3k
output
stringlengths
6
2.03k
### Instruction: CREATE TABLE table_train_264 ( "id" int, "stroke" bool, "hematocrit_hct" float, "serum_psa" float, "coronary_artery_disease_cad" bool, "international_prostate_symptom_score_ipss" int, "hypertension" bool, "NOUSE" float ) -- Using valid SQLite, answer the following ques...
SELECT * FROM table_train_264 WHERE international_prostate_symptom_score_ipss > 19
### Instruction: CREATE TABLE table_21288 ( "June 10-11" text, "March 27-29" text, "January 15-16" text, "November 3" text, "August 21-22" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the january 15-16 where march 27-29 where march 29, 2006 ...
SELECT "January 15-16" FROM table_21288 WHERE "March 27-29" = 'March 29, 2006'
### Instruction: CREATE TABLE table_13829 ( "Date" real, "Ships sunk (Pola)" text, "Tonnage" text, "U-boats destroyed (KuK)" text, "U-boats destroyed (Pola)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the listed Tonnage that has U-boats ...
SELECT "Tonnage" FROM table_13829 WHERE "U-boats destroyed (KuK)" = '2' AND "Ships sunk (Pola)" = '(not recorded)'
### Instruction: CREATE TABLE table_1598533_8 ( public_debt__percentage_of_gdp__2013_q1_ VARCHAR, gdp__percentage_of_eu__2012_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the public debt % of GDP in 2013 Q1 with a 4.7% GDP of EU in 2012? ### Res...
SELECT public_debt__percentage_of_gdp__2013_q1_ FROM table_1598533_8 WHERE gdp__percentage_of_eu__2012_ = "4.7%"
### Instruction: CREATE TABLE train_station ( Train_ID int, Station_ID int ) CREATE TABLE station ( Station_ID int, Name text, Annual_entry_exit real, Annual_interchanges real, Total_Passengers real, Location text, Main_Services text, Number_of_Platforms int ) CREATE TABLE trai...
SELECT Location, SUM(Number_of_Platforms) FROM station GROUP BY Location
### Instruction: CREATE TABLE table_25083 ( "Year" real, "Network" text, "Race caller" text, "s Host" text, "s Analyst" text, "Reporters" text, "Trophy presentation" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the race caller for jim...
SELECT "Race caller" FROM table_25083 WHERE "Trophy presentation" = 'Jim McKay and Howard Cosell' AND "Reporters" = 'Howard Cosell' AND "s Analyst" = 'Eddie Arcaro'
### 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 Headquarter, MAX(Revenue) FROM Manufacturers GROUP BY Headquarter ORDER BY MAX(Revenue) DESC
### Instruction: CREATE TABLE table_22472 ( "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 MAX("Pop. (2010)") FROM table_22472 WHERE "Latitude" = '48.676125'
### Instruction: CREATE TABLE table_22316 ( "No." real, "#" real, "Title" text, "Directed by" text, "Written by" text, "Canadian air date" text, "U.S. air date" text, "Production code" real, "Canadian viewers (million)" text ) -- Using valid SQLite, answer the following questions f...
SELECT "Directed by" FROM table_22316 WHERE "U.S. air date" = 'February 27, 2009'
### Instruction: CREATE TABLE table_28295 ( "Browser" text, "Operating system" text, "Latest stable release" text, "Theora" text, "H.264" text, "VP8 ( WebM )" text, "VP9 ( WebM )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the la...
SELECT "Latest stable release" FROM table_28295 WHERE "VP9 ( WebM )" = 'No' AND "H.264" = '3.0'
### Instruction: CREATE TABLE journal_committee ( Editor_ID VARCHAR, Journal_ID VARCHAR ) CREATE TABLE editor ( Name VARCHAR, Editor_ID VARCHAR ) CREATE TABLE journal ( Journal_ID VARCHAR, Sales INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -...
SELECT T2.Name FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID WHERE T3.Sales > 3000
### Instruction: CREATE TABLE table_51885 ( "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 SUM("Played") FROM table_51885 WHERE "Points" > '71' AND "Losses" < '8'
### Instruction: CREATE TABLE table_22810 ( "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_22810 WHERE "Wins" = '2'
### Instruction: CREATE TABLE table_54787 ( "Type" text, "Sign" real, "Exponent" real, "Significand" real, "Total bits" real, "Exponent bias" real, "Bits precision" real, "Number of decimal digits" text ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT SUM("Significand") FROM table_54787 WHERE "Number of decimal digits" = '~34.0' AND "Exponent bias" > '16383'
### Instruction: CREATE TABLE table_70275 ( "Episode #" real, "Title" text, "Airdate" text, "Viewers (millions)" real, "Channel 4 weekly rank a" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of viewers in millions for the episode...
SELECT COUNT("Viewers (millions)") FROM table_70275 WHERE "Airdate" = 'october 10, 2008' AND "Channel 4 weekly rank a" < '30'
### Instruction: CREATE TABLE table_31215 ( "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. -- How many tim...
SELECT COUNT("Stolen Ends") FROM table_31215 WHERE "Skip (Club)" = 'Debbie Folk (Nutana)'
### Instruction: CREATE TABLE table_37983 ( "Week" real, "Date" text, "Time" text, "Opponent" text, "Result" text, "Game site" text, "NFL Recap" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Result of the gam...
SELECT "Result" FROM table_37983 WHERE "Week" > '4' AND "Time" = '5:15 p.m.' AND "Record" = '4–7'
### Instruction: CREATE TABLE rating ( rid number, mid number, stars number, ratingdate time ) CREATE TABLE movie ( mid number, title text, year number, director text ) CREATE TABLE reviewer ( rid number, name text ) -- Using valid SQLite, answer the following questions for t...
SELECT DISTINCT T2.director FROM rating AS T1 JOIN movie AS T2 ON T1.mid = T2.mid JOIN reviewer AS T3 ON T1.rid = T3.rid WHERE T3.name = 'Sarah Martinez'
### Instruction: CREATE TABLE table_71084 ( "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 seats 2006 total with %2001 of 39 and seats 20...
SELECT MAX("Seats 2006") FROM table_71084 WHERE "% 2001" = '39' AND "Seats 2001" < '12'
### Instruction: CREATE TABLE table_5224 ( "Team" text, "Copa Libertadores 1992" text, "Supercopa Sudamericana 1992" text, "Copa CONMEBOL 1992" text, "Recopa Sudamericana 1992" text, "Intercontinental Cup 1992" text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT "Team" FROM table_5224 WHERE "Recopa Sudamericana 1992" = 'runner-up'
### Instruction: CREATE TABLE table_4372 ( "Character" text, "1954 Broadway" text, "1955 broadcast" text, "1960 broadcast" text, "1979 Broadway" text, "1990 Broadway" text, "1991 Broadway" text, "1998 Broadway" text, "1999 Broadway" text ) -- Using valid SQLite, answer the followin...
SELECT "1998 Broadway" FROM table_4372 WHERE "1999 Broadway" = 'barry cavanagh'
### 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 COUNT("athlete") FROM table_204_731 WHERE "total" > 5000
### Instruction: CREATE TABLE table_993 ( "Name" text, "Population (2002 census)" real, "Population (2007 estimation)" real, "Population (2011 census)" real, "Area (km\u00b2)" text, "Density (pop/km\u00b2)" text ) -- Using valid SQLite, answer the following questions for the tables provided ab...
SELECT COUNT("Area (km\u00b2)") FROM table_993 WHERE "Population (2007 estimation)" = '7996'
### Instruction: CREATE TABLE table_204_975 ( id number, "year" number, "competition" text, "location" text, "event" text, "final-rank" text, "final-score" number, "qualifying rank" number, "qualifying score" number ) -- Using valid SQLite, answer the following questions for the ta...
SELECT "competition" FROM table_204_975 WHERE "competition" IN ('olympic trials', 'american cup') GROUP BY "competition" ORDER BY COUNT("event") DESC LIMIT 1
### Instruction: CREATE TABLE table_203_713 ( id number, "s.no." number, "name of kingdom" text, "name of king" text, "no. of villages" number, "capital" text, "names of districts" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which kingdom...
SELECT "name of kingdom" FROM table_203_713 WHERE "no. of villages" < (SELECT "no. of villages" FROM table_203_713 WHERE "name of kingdom" = 'godara') ORDER BY "no. of villages" DESC LIMIT 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(Flag) FROM Ship WHERE NOT Ship_ID IN (SELECT Ship_ID FROM captain WHERE Rank = 'Midshipman') GROUP BY Flag
### Instruction: CREATE TABLE table_204_381 ( id number, "sum" number, "mongolian" number, "population\n(2005)" number, "population\n(2008)" number, "population\n(2009)" number, "area\nkm2" number, "density\n/km2" number, "sum centre\npopulation" number ) -- Using valid SQLite, ans...
SELECT MAX("population\n(2005)") FROM table_204_381
### Instruction: CREATE TABLE table_31217 ( "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 COUNT("Ends Won") FROM table_31217 WHERE "Skip (Club)" = 'Chantelle Eberle (Tartan)'
### Instruction: CREATE TABLE table_76267 ( "Governorate" text, "Capital City" text, "Area km\u00b2" real, "Pop (2004)" real, "Map Key" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Count the sum of Pop (2004) which has a Governorate of al mahrah w...
SELECT SUM("Pop (2004)") FROM table_76267 WHERE "Governorate" = 'al mahrah' AND "Area km\u00b2" < '78,073'
### Instruction: CREATE TABLE people ( People_ID int, Name text, Country text, Is_Male text, Age int ) CREATE TABLE wedding ( Church_ID int, Male_ID int, Female_ID int, Year int ) CREATE TABLE church ( Church_ID int, Name text, Organized_by text, Open_Date int, ...
SELECT Open_Date, COUNT(Open_Date) FROM church
### Instruction: CREATE TABLE table_78219 ( "Stellar mass ( M\u2609 )" real, "Planetary mass ( M\u2295 )" real, "Lum. (L 0 )" text, "Type" text, "RHAB ( AU )" real, "RV (cm/s)" real, "Period (days)" real ) -- Using valid SQLite, answer the following questions for the tables provided above....
SELECT SUM("Stellar mass ( M\u2609 )") FROM table_78219 WHERE "Type" = 'm0'
### Instruction: CREATE TABLE table_1498 ( "Finish" text, "Race" text, "Distance" text, "Jockey" text, "Time" text, "Victory Margin (in lengths)" text, "Runner up" text, "Track" text, "Surface" text, "Date" text ) -- Using valid SQLite, answer the following questions for the ta...
SELECT "Distance" FROM table_1498 WHERE "Jockey" = 'Kent Desormeaux' AND "Date" = '6/7/08'
### Instruction: CREATE TABLE table_4375 ( "Character" text, "1954 Broadway" text, "1955 broadcast" text, "1960 broadcast" text, "1979 Broadway" text, "1990 Broadway" text, "1991 Broadway" text, "1998 Broadway" text, "1999 Broadway" text ) -- Using valid SQLite, answer the followin...
SELECT "1955 broadcast" FROM table_4375 WHERE "1960 broadcast" = 'kent fletcher'
### 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 Manufacturer, Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code
### Instruction: CREATE TABLE table_2276 ( "Constituency" text, "Electorate" real, "s Spoilt vote" real, "Total poll (%)" text, "For (%)" text, "Against (%)" text, "\u00b1 Yes side 2008 (%)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Whe...
SELECT COUNT("Electorate") FROM table_2276 WHERE "For (%)" = '27,822 (72.3)'
### Instruction: CREATE TABLE table_38190 ( "Name" text, "Size" text, "Price" text, "Quantity" real, "Released" text, "Nicotine" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For Raison Blue with a nicotine larger than 0.30000000000000004, what...
SELECT MIN("Quantity") FROM table_38190 WHERE "Name" = 'raison blue' AND "Nicotine" > '0.30000000000000004'
### Instruction: CREATE TABLE table_36314 ( "Athlete" text, "Country" text, "Run 1" real, "Run 2" real, "Run 3" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had a Run 1 smaller than 51.96, a Run 2 larger than 51.13, and a Run 3 of 52.53? ###...
SELECT "Athlete" FROM table_36314 WHERE "Run 1" < '51.96' AND "Run 2" > '51.13' AND "Run 3" = '52.53'
### Instruction: CREATE TABLE table_44082 ( "School" text, "Conference" text, "Games" real, "Wins" real, "Losses" real, "Winning Pct." real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of losses of the team with games less ...
SELECT COUNT("Losses") FROM table_44082 WHERE "Games" < '14' AND "Wins" < '3' AND "Conference" = 'maac' AND "School" = 'fairfield'
### Instruction: CREATE TABLE people ( People_ID int, Name text, Country text, Is_Male text, Age int ) CREATE TABLE wedding ( Church_ID int, Male_ID int, Female_ID int, Year int ) CREATE TABLE church ( Church_ID int, Name text, Organized_by text, Open_Date int, ...
SELECT Country, COUNT(*) FROM people GROUP BY Country ORDER BY Country DESC
### Instruction: CREATE TABLE AssignedTo ( Scientist int, Project char(4) ) CREATE TABLE Scientists ( SSN int, Name Char(30) ) CREATE TABLE Projects ( Code Char(4), Name Char(50), Hours int ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Visuali...
SELECT Name, COUNT(*) FROM Projects AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project GROUP BY T1.Name ORDER BY COUNT(*) DESC
### 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 T2.title, SUM(MIN(T1.stars)) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.title ORDER BY T2.title
### Instruction: CREATE TABLE table_1923 ( "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 provid...
SELECT MIN("GEO ID") FROM table_1923 WHERE "Longitude" = '-97.473110'
### Instruction: CREATE TABLE Maintenance_Engineers ( engineer_id VARCHAR, first_name VARCHAR, last_name VARCHAR ) CREATE TABLE Engineer_Visits ( engineer_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Among those engineers who have visited, whic...
SELECT T1.engineer_id, T1.first_name, T1.last_name FROM Maintenance_Engineers AS T1 JOIN Engineer_Visits AS T2 ON T1.engineer_id = T2.engineer_id GROUP BY T1.engineer_id ORDER BY COUNT(*) LIMIT 1
### Instruction: CREATE TABLE table_31462 ( "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("Game") FROM table_31462 WHERE "Location Attendance" = 'Phog Allen Fieldhouse , Lawrence, KS (16,300)'
### Instruction: CREATE TABLE table_78017 ( "Rank" real, "Player" text, "Club" text, "Country" text, "Titles" real, "Seasons" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What player is ranked 2 and played in the seasons of 1982 83, 1983 84, 1...
SELECT "Player" FROM table_78017 WHERE "Rank" = '2' AND "Seasons" = '1982–83, 1983–84, 1984–85'
### Instruction: CREATE TABLE table_18896 ( "Title and Source" text, "Developer(s)/Publisher(s)" text, "JP -210-" text, "NA -350-" text, "PAL -295-" text, "Wii Points" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many title and source with...
SELECT COUNT("Title and Source") FROM table_18896 WHERE "PAL -295-" = 'Yes' AND "JP -210-" = 'Yes'
### Instruction: CREATE TABLE table_20639 ( "Danish name" text, "English name" text, "Seat of administration" text, "Largest city" text, "Population (January 1, 2008)" real, "Area (km\u00b2)" real, "Pop. density (per km\u00b2)" text ) -- Using valid SQLite, answer the following questions f...
SELECT "Pop. density (per km\u00b2)" FROM table_20639 WHERE "English name" = 'Capital Region of Denmark'
### Instruction: CREATE TABLE table_33788 ( "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 home team that sco...
SELECT "Home team" FROM table_33788 WHERE "Crowd" > '18,000' AND "Home team score" = '24.14 (158)'
### Instruction: CREATE TABLE table_53321 ( "Village (German)" text, "Village (Slovenian)" text, "Number of people 1991" real, "Percent of Slovenes 1991" text, "Percent of Slovenes 1951" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the pe...
SELECT "Percent of Slovenes 1951" FROM table_53321 WHERE "Percent of Slovenes 1991" = '10.1%'
### Instruction: CREATE TABLE table_204_909 ( id number, "pollutant" text, "units" text, "emission standard" number, "coal-fired" text, "petroleum coke-fired" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which pollutant had the same emission s...
SELECT "pollutant" FROM table_204_909 WHERE "pollutant" <> 'pm10' AND "emission standard" = (SELECT "emission standard" FROM table_204_909 WHERE "pollutant" = 'pm10')
### Instruction: CREATE TABLE table_28690 ( "Role" text, "Original Broadway Cast" text, "2005 film" text, "2008 Final Performance Film" text, "Hollywood Bowl Cast" text, "2011 Off-Broadway Revival" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- ...
SELECT "2008 Final Performance Film" FROM table_28690 WHERE "2011 Off-Broadway Revival" = 'Annaleigh Ashford'
### Instruction: CREATE TABLE table_6182 ( "Rank" real, "Name" text, "Headquarters" text, "Primary industry" text, "Market value ( USD million)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where is the company headquarted that has a Market value ...
SELECT "Headquarters" FROM table_6182 WHERE "Market value ( USD million)" > '146,139' AND "Rank" < '3' AND "Primary industry" = 'oil and gas'
### Instruction: CREATE TABLE table_71086 ( "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 total number of seats 2001 with seats 2006 mor...
SELECT SUM("Seats 2001") FROM table_71086 WHERE "Parties and voter communities" = 'cdu' AND "Seats 2006" > '10'
### Instruction: CREATE TABLE table_train_202 ( "id" int, "systolic_blood_pressure_sbp" int, "body_weight" float, "diabetic" string, "qtc" int, "diastolic_blood_pressure_dbp" int, "body_mass_index_bmi" float, "clinical_diagnosis" bool, "NOUSE" float ) -- Using valid SQLite, answer ...
SELECT * FROM table_train_202 WHERE body_weight > 50
### Instruction: CREATE TABLE table_30528 ( "Rnd" real, "Date" text, "Circuit" text, "Supporting" text, "Distance" text, "GT Winning Car" text, "TC Winning Car" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the distance in the roun...
SELECT "Distance" FROM table_30528 WHERE "Supporting" = 'Champ Car World Series ( Grand Prix of Cleveland )' AND "TC Winning Car" = 'Pierre Kleinubing'
### Instruction: CREATE TABLE table_25735 ( "Rank" real, "Team" text, "Total Points" real, "2008-09 Points" real, "2007-08 Points" real, "2006-07 Points" real, "2005-06 Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2006-...
SELECT COUNT("2006-07 Points") FROM table_25735 WHERE "Team" = 'Saracens'
### 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, Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code
### Instruction: CREATE TABLE table_72212 ( "Taxonomy" text, "Species in the world" real, "Species in Peru" real, "Species in the Peruvian Amazon" real, "Peru Vs. world (Percent)" real, "Peruvian Amazon Vs. Peru (Percent)" real ) -- Using valid SQLite, answer the following questions for the ta...
SELECT MIN("Species in the Peruvian Amazon") FROM table_72212 WHERE "Taxonomy" = 's Fern ( Pteridophyta )'
### Instruction: CREATE TABLE table_14061 ( "Position" real, "Team" text, "Played" real, "Wins" real, "Draws" real, "Losses" real, "Scored" real, "Conceded" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the mo...
SELECT MAX("Losses") FROM table_14061 WHERE "Wins" < '2' AND "Position" < '11' AND "Points" > '6'
### Instruction: CREATE TABLE table_48299 ( "Outcome" text, "Date" text, "Location" text, "Surface" text, "Opponent in final" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Opponent In Final, when Surface is Hard, when Loca...
SELECT "Opponent in final" FROM table_48299 WHERE "Surface" = 'hard' AND "Location" = 'wellington, new zealand' AND "Date" = '6 february 2000'
### Instruction: CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT ) CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has fr...
SELECT friend, age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM Person) ORDER BY friend DESC
### Instruction: CREATE TABLE table_62059 ( "Outcome" text, "Date" real, "Championship" text, "Surface" text, "Opponent in the final" text, "Score in the final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Score in The Final, when Oppo...
SELECT "Score in the final" FROM table_62059 WHERE "Opponent in the final" = 'john mcenroe' AND "Championship" = 'los angeles , u.s.'
### Instruction: CREATE TABLE table_41096 ( "Ship" text, "13.5-inch/1400lb" real, "13.5-inch/1250lb" real, "12-inch" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Total when the ship was l tzow, with a 13.5-inch/14...
SELECT AVG("Total") FROM table_41096 WHERE "Ship" = 'lützow' AND "13.5-inch/1400lb" < '0'
### Instruction: CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, "Home Town" text ) CREATE TABLE perpetrator ( Perpetrator_ID int, People_ID int, Date text, Year real, Location text, Country text, Killed int, Injured int ) -- Using valid S...
SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country ORDER BY COUNT(*)
### Instruction: CREATE TABLE table_61783 ( "Rider" text, "Bike" text, "Laps" real, "Time" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the rider riding the Kawasaki ZX-6r, that rode less than 22 laps, and the grid was greater...
SELECT "Rider" FROM table_61783 WHERE "Laps" < '22' AND "Grid" > '19' AND "Time" = 'retirement' AND "Bike" = 'kawasaki zx-6r'
### Instruction: CREATE TABLE table_58639 ( "2 twee" text, "3 dree" text, "4 vea" text, "5 fiew" text, "6 sas" text, "7 s\u00e4wen" text, "8 acht" text, "9 n\u00e4ajen" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is 5 fiew when 7...
SELECT "5 fiew" FROM table_58639 WHERE "7 s\u00e4wen" = '17 säwentieen'
### Instruction: CREATE TABLE table_26476 ( "World record" text, "Jarmila Kratochv\u00edlov\u00e1 ( TCH )" text, "1:53.28" text, "Munich , West Germany" text, "26 July 1983" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 26 July 1983 tot...
SELECT COUNT("26 July 1983") FROM table_26476 WHERE "Munich , West Germany" = 'Beijing, China'
### Instruction: CREATE TABLE table_896 ( "Model Number" text, "Stepping" text, "Frequency" text, "L2 Cache" text, "HT" text, "Multi 1" text, "V Core" text, "TDP" text, "Socket" text, "Release Date" text, "Part Number(s)" text ) -- Using valid SQLite, answer the following q...
SELECT "Release Date" FROM table_896 WHERE "Part Number(s)" = 'ADH485BIAA5DO'
### Instruction: CREATE TABLE table_1665 ( "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 a...
SELECT MAX("Game") FROM table_1665 WHERE "High assists" = 'LeBron James (7)' AND "High points" = 'LeBron James (21)'
### Instruction: CREATE TABLE table_33019 ( "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 is the Venue when the Crow...
SELECT "Venue" FROM table_33019 WHERE "Crowd" > '11,000' AND "Away team score" = '7.9 (51)'
### Instruction: CREATE TABLE table_28129 ( "Result" text, "Date" text, "Race" text, "Venue" text, "Group" text, "Distance" text, "Weight (kg)" text, "Jockey" text, "Winner/2nd" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was...
SELECT "Distance" FROM table_28129 WHERE "Weight (kg)" = '56' AND "Winner/2nd" = '2nd - Fritz'
### Instruction: CREATE TABLE table_53856 ( "Rank" real, "Club 1" text, "Seasons" real, "Spells" real, "Played 2" real, "Drawn" real, "Lost" real, "Goals" text, "Points 3" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many seaso...
SELECT COUNT("Seasons") FROM table_53856 WHERE "Goals" = '261-338' AND "Lost" > '111'
### Instruction: CREATE TABLE table_1821 ( "Club" text, "First season in top division" text, "Number of seasons in top division" real, "First season of current spell in top division" text, "Number of seasons in Liga MX" real, "Top division titles" real ) -- Using valid SQLite, answer the follo...
SELECT "Number of seasons in Liga MX" FROM table_1821 WHERE "First season of current spell in top division" = '1962-63'
### Instruction: CREATE TABLE journalist ( journalist_ID int, Name text, Nationality text, Age text, Years_working int ) CREATE TABLE event ( Event_ID int, Date text, Venue text, Name text, Event_Attendance int ) CREATE TABLE news_report ( journalist_ID int, Event_ID in...
SELECT Nationality, SUM(Age) FROM journalist GROUP BY Nationality ORDER BY Nationality
### Instruction: CREATE TABLE table_67718 ( "Place" real, "Team" text, "Played" real, "Draw" real, "Lost" real, "Goals Scored" real, "Goals Conceded" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the goals scored ...
SELECT SUM("Goals Scored") FROM table_67718 WHERE "Draw" < '8' AND "Points" = '19' AND "Goals Conceded" > '26'
### Instruction: CREATE TABLE table_204_869 ( id number, "species" text, "country of origin" text, "total released" number, "first release" text, "last release" text, "areas of release" text, "areas established" text, "pasture type" text ) -- Using valid SQLite, answer the followin...
SELECT "country of origin" FROM table_204_869 WHERE "country of origin" IN ('spain', 'south africa') GROUP BY "country of origin" ORDER BY COUNT(*) DESC LIMIT 1
### Instruction: CREATE TABLE table_21745 ( "No. in series" text, "No. in season" text, "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 "U.S. viewers (millions)" FROM table_21745 WHERE "Written by" = 'Warren Lieberstein & Halsted Sullivan'
### Instruction: CREATE TABLE table_4373 ( "Character" text, "1954 Broadway" text, "1955 broadcast" text, "1960 broadcast" text, "1979 Broadway" text, "1990 Broadway" text, "1991 Broadway" text, "1998 Broadway" text, "1999 Broadway" text ) -- Using valid SQLite, answer the followin...
SELECT "1979 Broadway" FROM table_4373 WHERE "1999 Broadway" = 'dana solimando'
### Instruction: CREATE TABLE table_170 ( "#" real, "Episode" text, "Air Date" text, "Timeslot (EST)" text, "Rating" text, "Share" text, "18\u201349 Rating" text, "Viewers (millions)" text, "Rank" text ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT "Rating" FROM table_170 WHERE "18\u201349 Rating" = '0.4'
### Instruction: CREATE TABLE table_21957 ( "Name" text, "Map colour" text, "First operated" real, "Type" text, "Length" text, "No. Sta" real, "Current Stock" text, "Future Stock" text, "Trips per annum (\u00d71000)" real, "Avg. trips per mile (\u00d71000)" real ) -- Using vali...
SELECT "Future Stock" FROM table_21957 WHERE "Map colour" = 'Green'
### Instruction: CREATE TABLE table_203_241 ( id number, "name" text, "founded" number, "defunct" number, "country" text, "publisher" text, "topics" text, "external link" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- were more magazines...
SELECT (SELECT COUNT(*) FROM table_203_241 WHERE "founded" < 2000) > (SELECT COUNT(*) FROM table_203_241 AS table_203_241 WHERE "founded" > 2000)
### 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 "tournament" FROM table_203_444 WHERE id = (SELECT id FROM table_203_444 WHERE "tournament" = 'bnp paribas open') - 1
### Instruction: CREATE TABLE table_55350 ( "Candidate" text, "Money Raised, 2Q" text, "Loans Received, 2Q" text, "Money Spent, 2Q" text, "Total Receipts" text, "Cash On Hand" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much cash was on h...
SELECT "Cash On Hand" FROM table_55350 WHERE "Money Spent, 2Q" = '$16,042,388'
### Instruction: CREATE TABLE table_5552 ( "Affiliation" text, "Life peers" text, "Hereditary peers" text, "Lords spiritual" text, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Total has a Hereditary peer of , and a Lords spiritual of...
SELECT COUNT("Total") FROM table_5552 WHERE "Hereditary peers" = '–' AND "Lords spiritual" = '–' AND "Life peers" = '2' AND "Affiliation" = 'plaid cymru'
### Instruction: CREATE TABLE table_56596 ( "Season" real, "Driver" text, "Co-Driver" text, "Team" text, "Tuner" text, "Governing Body" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the tuner after season 2004 with Gaurav Gill as the dri...
SELECT "Tuner" FROM table_56596 WHERE "Season" > '2004' AND "Driver" = 'gaurav gill' AND "Team" = 'team mrf' AND "Governing Body" = 'mai'
### Instruction: CREATE TABLE table_train_19 ( "id" int, "white_blood_cell_count_wbc" int, "active_infection" bool, "heart_disease" bool, "temperature" float, "skin_lesion" bool, "heart_rate" int, "paco2" float, "immature_form" int, "respiratory_rate" int, "age" float, "N...
SELECT * FROM table_train_19 WHERE skin_lesion = 0
### Instruction: CREATE TABLE table_22966 ( "Year" real, "Division" real, "League" text, "Regular Season" text, "Playoffs" text, "U.S. Open Cup" text, "Avg. Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year at the US Open ...
SELECT "Year" FROM table_22966 WHERE "League" = 'USL Second Division' AND "Playoffs" = 'Semifinals' AND "U.S. Open Cup" = 'Quarterfinals'
### Instruction: CREATE TABLE shop ( Shop_ID int, Shop_Name text, Location text, Open_Date text, Open_Year int ) CREATE TABLE device ( Device_ID int, Device text, Carrier text, Package_Version text, Applications text, Software_Platform text ) CREATE TABLE stock ( Shop_I...
SELECT Location, COUNT(Location) FROM shop GROUP BY Location ORDER BY COUNT(Location) DESC
### Instruction: CREATE TABLE table_1539 ( "Place" real, "Weightlifter" text, "Body weight" text, "one hand snatch" text, "one hand clean & jerk" text, "Press" text, "Snatch" text, "1." text, "2." text, "3." text, "Total" text ) -- Using valid SQLite, answer the following q...
SELECT "3." FROM table_1539 WHERE "Weightlifter" = 'M. Van der Goten ( BEL )'
### Instruction: CREATE TABLE table_16114 ( "Season" text, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "F/Laps" real, "Podiums" real, "Points" real, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT COUNT("Podiums") FROM table_16114 WHERE "Season" = '2010' AND "Series" = 'Campionato Italiano Superstars'
### Instruction: CREATE TABLE table_34444 ( "Model" text, "Release Date" real, "Price" text, "MIDI Inputs/Outputs" text, "Sampling Rate" text, "Sampling Memory/Upgrade-able" text, "Sampling Time" text, "Storage Method" text, "Pad Banks" real ) -- Using valid SQLite, answer the foll...
SELECT "Price" FROM table_34444 WHERE "Sampling Rate" = '12-bit 40khz'
### Instruction: CREATE TABLE table_204_504 ( id number, "year" number, "award" text, "category" text, "work" text, "result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- did she win as an outstanding actress in a daytime drama series more than...
SELECT (SELECT COUNT(*) FROM table_204_504 WHERE "result" = 'won' AND "category" = 'outstanding actress in a daytime drama series') > (SELECT COUNT(*) FROM table_204_504 WHERE "result" <> 'won' AND "category" = 'outstanding actress in a daytime drama series')
### Instruction: CREATE TABLE table_1170 ( "Nationality" text, "Player" text, "Year" real, "Wins" real, "Masters" text, "U.S. Open" text, "Open Ch." text, "PGA Ch." text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which player's results we...
SELECT "Player" FROM table_1170 WHERE "PGA Ch." = 'T6' AND "Masters" = 'T4' AND "U.S. Open" = 'T8'
### Instruction: CREATE TABLE table_35133 ( "Goal" real, "Date" text, "Score" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Result has a Goal larger than 6, and a Score of 1 0, and a Competition of friendly,...
SELECT "Result" FROM table_35133 WHERE "Goal" > '6' AND "Score" = '1–0' AND "Competition" = 'friendly' AND "Date" = 'may 31, 1998'
### Instruction: CREATE TABLE race ( Race_ID int, Name text, Class text, Date text, Track_ID text ) CREATE TABLE track ( Track_ID int, Name text, Location text, Seating real, Year_Opened real ) -- Using valid SQLite, answer the following questions for the tables provided above...
SELECT T2.Name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.Track_ID = T2.Track_ID GROUP BY T1.Track_ID ORDER BY COUNT(*) DESC
### Instruction: CREATE TABLE table_2064 ( "Role" text, "Original Broadway Cast" text, "Current Broadway Cast" text, "Original Toronto Cast" text, "First National Tour Cast" text, "Original Australian Cast" text, "Original West End Cast" text, "Current West End Cast" text, "Second Na...
SELECT "Original Toronto Cast" FROM table_2064 WHERE "Current Broadway Cast" = 'Kate Rockwell'
### Instruction: CREATE TABLE table_61180 ( "Nat." text, "Name" text, "Moving from" text, "Type" text, "Transfer window" text, "Ends" real, "Transfer fee" text, "Source" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the type of ...
SELECT "Type" FROM table_61180 WHERE "Ends" = '2013' AND "Transfer window" = 'summer' AND "Moving from" = 'kalmar ff'
### Instruction: CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following ...
SELECT Name, COUNT(Name) FROM Products WHERE Price <= 200 GROUP BY Name ORDER BY COUNT(Name) DESC
### Instruction: CREATE TABLE table_69758 ( "Team" text, "Season" real, "Played" real, "Lost" real, "1 st" text, "2 nd" text, "3 rd" text, "4 th" text, "Debut" text, "Since/Last App" text, "Best" real ) -- Using valid SQLite, answer the following questions for the tables pr...
SELECT "3 rd" FROM table_69758 WHERE "Season" < '4' AND "Lost" = '61'
### Instruction: CREATE TABLE table_20988 ( "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("Top 10") FROM table_20988 WHERE "Position" = '51st'