instruction stringlengths 212 6.3k | output stringlengths 6 2.03k |
|---|---|
### Instruction:
CREATE TABLE table_57575 (
"Ward" text,
"Bello" text,
"Ben-Tahir" text,
"Doucet" text,
"Furtenbacher" text,
"Gauthier" text,
"Haydon" text,
"Larter" text,
"Lawrance" text,
"Libweshya" text,
"Liscumb" text
)
-- Using valid SQLite, answer the following questi... | SELECT "Ben-Tahir" FROM table_57575 WHERE "Liscumb" = '6' AND "Libweshya" = '3' |
### Instruction:
CREATE TABLE CMI_Cross_References (
cmi_cross_ref_id VARCHAR,
source_system_code VARCHAR
)
CREATE TABLE Council_Tax (
cmi_cross_ref_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the cmi cross reference id that is related to ... | SELECT T1.cmi_cross_ref_id, T1.source_system_code FROM CMI_Cross_References AS T1 JOIN Council_Tax AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T1.cmi_cross_ref_id HAVING COUNT(*) >= 1 |
### Instruction:
CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
AllergyType VARCHAR(20)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Has_Allergy (... | SELECT AllergyType, COUNT(*) FROM Allergy_Type GROUP BY AllergyType |
### Instruction:
CREATE TABLE cinema (
cinema_id number,
name text,
openning_year number,
capacity number,
location text
)
CREATE TABLE schedule (
cinema_id number,
film_id number,
date text,
show_times_per_day number,
price number
)
CREATE TABLE film (
film_id number,
... | SELECT location FROM cinema EXCEPT SELECT location FROM cinema WHERE capacity > 800 |
### Instruction:
CREATE TABLE table_name_62 (
company VARCHAR,
market_value__billion_$_ VARCHAR,
profits__billion_$_ VARCHAR,
sales__billion_$_ VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What company has more than 195.34 billion... | SELECT company FROM table_name_62 WHERE sales__billion_$_ > 195.34 AND rank > 7 AND profits__billion_$_ > 11.29 AND market_value__billion_$_ > 198.14 |
### Instruction:
CREATE TABLE table_10698 (
"Party" text,
"1999 Election" real,
"2003 Election" real,
"2007 Election" real,
"May 2010" real,
"2011 Election" real,
"May 2012" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What average electio... | SELECT AVG("2003 Election") FROM table_10698 WHERE "1999 Election" > '6' AND "2007 Election" < '7' |
### Instruction:
CREATE TABLE table_11630 (
"Tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"Career Win\u2013Loss" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the 2007 result f... | SELECT "2007" FROM table_11630 WHERE "2009" = '2r' AND "2008" = '1r' |
### Instruction:
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
)
CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
)
CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS ... | SELECT cName, MIN(enr) FROM College GROUP BY state ORDER BY cName DESC |
### Instruction:
CREATE TABLE table_203_645 (
id number,
"lower mississippi periods" text,
"lower yazoo phases" text,
"lower yazoo\ndates" text,
"tensas/natchez phases" text,
"cahokia phases" text,
"cahokia dates" text,
"ohio/miss. river\nconfluence phases" text,
"ohio/miss. dates" t... | SELECT "lower yazoo phases" FROM table_203_645 WHERE "lower yazoo phases" IN ('routh', 'lake george') |
### 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 Name, COUNT(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.Artist_ID = T2.Artist_ID GROUP BY T1.Artist_ID ORDER BY COUNT(*) DESC |
### Instruction:
CREATE TABLE table_49016 (
"Model" text,
"Released" real,
"Sensor Size" text,
"Resolution" text,
"Active Pixels" text,
"ISO range" text,
"Dynamic range (f-stops)" real,
"Seconds/Frame" real,
"Lens conversion factor" real,
"Display" text,
"Storage" text
)
--... | SELECT "Display" FROM table_49016 WHERE "ISO range" = '80-800' AND "Seconds/Frame" = '0.8' |
### Instruction:
CREATE TABLE table_38829 (
"States" text,
"Fall 05" real,
"Fall 06" real,
"Fall 07" real,
"Fall 08" real,
"Fall 09" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the largest Fall 08 number when fall 09 is less than 82, f... | SELECT MAX("Fall 08") FROM table_38829 WHERE "Fall 09" < '82' AND "Fall 06" = '5' AND "Fall 05" < '3' |
### 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 T2.Name, AVG(T1.Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name |
### Instruction:
CREATE TABLE restaurant (
id int,
name varchar,
food_type varchar,
city_name varchar,
rating "decimal
)
CREATE TABLE geographic (
city_name varchar,
county varchar,
region varchar
)
CREATE TABLE location (
restaurant_id int,
house_number int,
street_name va... | SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'mountain view' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5 |
### Instruction:
CREATE TABLE table_204_624 (
id number,
"school" text,
"team name" text,
"town" text,
"county" text,
"enrollment (2010-11 & 2011-12)" number,
"primary mshsaa class*" number,
"football class" number
)
-- Using valid SQLite, answer the following questions for the tables ... | SELECT "school" FROM table_204_624 ORDER BY "enrollment (2010-11 & 2011-12)" LIMIT 1 |
### Instruction:
CREATE TABLE table_48007 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | SELECT "Goal Difference" FROM table_48007 WHERE "Goals Against" < '54' AND "Goals For" > '51' AND "Points 1" = '63' |
### Instruction:
CREATE TABLE table_27665 (
"GB" text,
"ISO \u2116" text,
"Province" text,
"Chinese Name" text,
"Capital" text,
"Population\u00b9" real,
"Density\u00b2" text,
"Area\u00b3" real,
"Abbreviation/Symbol" text
)
-- Using valid SQLite, answer the following questions for t... | SELECT MAX("Area\u00b3") FROM table_27665 WHERE "Density\u00b2" = '533.59' |
### Instruction:
CREATE TABLE table_19715 (
"Rank" real,
"Name" text,
"Nationality" text,
"Total points" text,
"Oberstdorf (Rk)" text,
"Ga-Pa (Rk)" text,
"Bhofen#1 (Rk)" text,
"Bhofen#2 (Rk)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-... | SELECT "Bhofen#2 (Rk)" FROM table_19715 WHERE "Ga-Pa (Rk)" = '233.4 (16)' |
### Instruction:
CREATE TABLE table_6998 (
"Member State" text,
"2005" real,
"2006" real,
"2007" real,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2011 value w... | SELECT "2011" FROM table_6998 WHERE "2008" = '0.3' AND "Member State" = 'european union' |
### Instruction:
CREATE TABLE table_73638 (
"Episode number Production number" text,
"Title" text,
"Original airdate" text,
"Rating/Share in Households" text,
"18\u201349 Rating Live+SD / Live+7" text,
"Share" text,
"Live+SD Total viewers" text,
"Live+7 Day DVR Total viewers" text
)
--... | SELECT "Original airdate" FROM table_73638 WHERE "Live+SD Total viewers" = '3.69 million' |
### Instruction:
CREATE TABLE table_27152 (
"Rnd." real,
"Circuit" text,
"LMP1 Winning Team" text,
"LMP2 Winning Team" text,
"FLM Winning Team" text,
"GT1 Winning Team" text,
"GT2 Winning Team" text,
"Results" text
)
-- Using valid SQLite, answer the following questions for the tables ... | SELECT COUNT("LMP1 Winning Team") FROM table_27152 WHERE "Rnd." = '4' AND "LMP2 Winning Team" = 'No. 42 Strakka Racing' |
### Instruction:
CREATE TABLE flight (
flno number,
origin text,
destination text,
distance number,
departure_date time,
arrival_date time,
price number,
aid number
)
CREATE TABLE certificate (
eid number,
aid number
)
CREATE TABLE aircraft (
aid number,
name text,
... | SELECT COUNT(*) FROM employee WHERE salary BETWEEN 100000 AND 200000 |
### Instruction:
CREATE TABLE table_70144 (
"Year" text,
"Starts" real,
"Cuts made" real,
"Wins" real,
"Top 10" real,
"Top 25" real,
"Earnings (\u20ac)" real,
"Money list rank" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the s... | SELECT SUM("Wins") FROM table_70144 WHERE "Earnings (\u20ac)" > '2,864,342' AND "Money list rank" = '3' |
### Instruction:
CREATE TABLE bank (
branch_id number,
bname text,
no_of_customers number,
city text,
state text
)
CREATE TABLE customer (
cust_id text,
cust_name text,
acc_type text,
acc_bal number,
no_of_loans number,
credit_score number,
branch_id number,
state te... | SELECT cust_name FROM customer ORDER BY credit_score LIMIT 1 |
### Instruction:
CREATE TABLE Office_locations (
building_id int,
company_id int,
move_in_year int
)
CREATE TABLE buildings (
id int,
name text,
City text,
Height int,
Stories int,
Status text
)
CREATE TABLE Companies (
id int,
name text,
Headquarters text,
Industry... | SELECT Industry, COUNT(*) FROM Companies GROUP BY Industry ORDER BY COUNT(*) |
### Instruction:
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy I... | SELECT AVG(basePrice), MIN(basePrice) FROM Rooms GROUP BY decor |
### Instruction:
CREATE TABLE table_204_229 (
id number,
"property" text,
"test method" text,
"units" text,
"4275" text,
"4301" text,
"4435" text,
"4630" text,
"4645" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- was the test method... | SELECT (SELECT "test method" FROM table_204_229 WHERE "property" = 'tensile strength') = (SELECT "test method" FROM table_204_229 WHERE "property" = 'tensile elongation') |
### Instruction:
CREATE TABLE table_57244 (
"NGC number" real,
"Object type" text,
"Constellation" text,
"Right ascension ( J2000 )" text,
"Declination ( J2000 )" text,
"Apparent magnitude" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me ... | SELECT "Right ascension ( J2000 )" FROM table_57244 WHERE "Object type" = 'globular cluster' AND "Apparent magnitude" = '8.5' AND "NGC number" = '6273' |
### Instruction:
CREATE TABLE table_54316 (
"PRR Class" text,
"Builder\u2019s Model" text,
"Build date" text,
"Total produced" real,
"Wheel arrangement" text,
"Service" text,
"Power output" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How ... | SELECT SUM("Total produced") FROM table_54316 WHERE "Wheel arrangement" = 'b-b' AND "PRR Class" = 'bs6' AND "Builder\u2019s Model" = 'ds-4-4-660' |
### 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 Founder, COUNT(Founder) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder |
### Instruction:
CREATE TABLE table_train_197 (
"id" int,
"dyscrasia" bool,
"gender" string,
"bleeding" int,
"hemoglobin_a1c_hba1c" float,
"diabetic" string,
"body_mass_index_bmi" float,
"age" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tabl... | SELECT * FROM table_train_197 WHERE (gender = 'male' OR gender = 'female') AND (age >= 12 AND age <= 17) |
### 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, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter |
### Instruction:
CREATE TABLE county (
county_id number,
county_name text,
population number,
zip_code text
)
CREATE TABLE party (
party_id number,
year number,
party text,
governor text,
lieutenant_governor text,
comptroller text,
attorney_general text,
us_senate text
)... | SELECT county_name FROM county ORDER BY county_name DESC |
### Instruction:
CREATE TABLE table_38692 (
"Career Card" text,
"Starting career/salary" text,
"2nd career/salary" text,
"3rd career/salary" text,
"4th career/salary" text,
"5th career/salary" text,
"6th career/salary" text
)
-- Using valid SQLite, answer the following questions for the ta... | SELECT "3rd career/salary" FROM table_38692 WHERE "6th career/salary" = 'design consultant ($500,000-degree)' |
### Instruction:
CREATE TABLE table_49015 (
"Name" text,
"Nationality" text,
"Position" text,
"S\u00e3o Paulo career" text,
"Appearances" real,
"Goals" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT SAN PAULO CAREER HAD SMALLER THAN 201 APP... | SELECT "S\u00e3o Paulo career" FROM table_49015 WHERE "Appearances" < '201' AND "Goals" < '2' AND "Name" = 'ricardo rocha' |
### Instruction:
CREATE TABLE table_53205 (
"MLB season" text,
"Reds season" real,
"League" text,
"Division" text,
"Finish" text,
"Wins" real,
"Losses" real,
"Win%" real,
"GB [c ]" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In 19... | SELECT "GB [c ]" FROM table_53205 WHERE "Win%" < '0.457' AND "Wins" = '62' AND "Reds season" = '1900' |
### Instruction:
CREATE TABLE table_1857 (
"Class" text,
"Team" text,
"103lbs" text,
"112lbs" text,
"119lbs" text,
"125lbs" text,
"130lbs" text,
"135lbs" text,
"140lbs" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who weighed 135lb... | SELECT "135lbs" FROM table_1857 WHERE "119lbs" = 'Treveor Grant (Lowry)' |
### Instruction:
CREATE TABLE table_54887 (
"Tournament" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which to... | SELECT "2013" FROM table_54887 WHERE "2006" = 'a' AND "2010" = '1r' |
### Instruction:
CREATE TABLE table_dev_58 (
"id" int,
"gender" string,
"pregnancy_or_lactation" bool,
"intra_aortic_balloon_pump_iabp" bool,
"systemic_arterial_po2" int,
"creatinine_clearance_cl" float,
"supplemental_oxygen" bool,
"age" float,
"NOUSE" float
)
-- Using valid SQLite... | SELECT * FROM table_dev_58 WHERE (gender = 'male' OR gender = 'female') AND (age >= 18 AND age <= 80) |
### Instruction:
CREATE TABLE table_58287 (
"NGC number" real,
"Object type" text,
"Constellation" text,
"Right ascension ( J2000 )" text,
"Declination ( J2000 )" text,
"Apparent magnitude" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's t... | SELECT SUM("NGC number") FROM table_58287 WHERE "Declination ( J2000 )" = '°15′55″' AND "Apparent magnitude" > '10' |
### Instruction:
CREATE TABLE table_34476 (
"Year" real,
"Class" text,
"Team name" text,
"Bike" text,
"Riders" text,
"Races" text,
"Wins" real,
"Podiums" real,
"Poles" real,
"F.laps" real,
"Points" text,
"Pos." text
)
-- Using valid SQLite, answer the following question... | SELECT COUNT("Poles") FROM table_34476 WHERE "Bike" = 'honda rc212v' AND "Podiums" < '0' |
### Instruction:
CREATE TABLE table_33232 (
"Player" text,
"Matches" real,
"Inns" real,
"Runs" real,
"High Score" real,
"Average" real,
"Catches" real,
"Stump" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the high score for the... | SELECT SUM("High Score") FROM table_33232 WHERE "Stump" = '0' AND "Catches" = '4' AND "Average" < '56.1' AND "Inns" > '14' |
### Instruction:
CREATE TABLE table_14998 (
"No.1" text,
"No.2" text,
"No.3" text,
"No.4" text,
"No.5" text,
"No.6" text,
"No.7" text,
"No.8" text,
"No.9" text,
"No.10" text,
"FINAL" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | SELECT "No.3" FROM table_14998 WHERE "No.2" = 'delfina' AND "FINAL" = 'pedro' |
### Instruction:
CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
-- Using valid SQLite, answer the following questions for the tables provided... | SELECT title, COUNT(title) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5 GROUP BY title ORDER BY COUNT(title) DESC |
### Instruction:
CREATE TABLE table_64325 (
"Name" text,
"Career" text,
"Matches" real,
"Overs" real,
"Maidens" real,
"Runs" real,
"Wickets" real,
"Average" real,
"Best" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who has fewer th... | SELECT "Name" FROM table_64325 WHERE "Overs" < '2047.3' AND "Wickets" > '200' AND "Average" > '29.02' |
### Instruction:
CREATE TABLE table_19746 (
"Team" text,
"Copa Libertadores 1998" text,
"Copa Mercosur 1998" text,
"Copa CONMEBOL 1998" text,
"Copa Interamericana 1998" text,
"Recopa Sudamericana 1998" text,
"Intercontinental Cup 1998" text
)
-- Using valid SQLite, answer the following que... | SELECT "Recopa Sudamericana 1998" FROM table_19746 WHERE "Team" = 'Flamengo' |
### Instruction:
CREATE TABLE musical (
Musical_ID int,
Name text,
Year int,
Award text,
Category text,
Nominee text,
Result text
)
CREATE TABLE actor (
Actor_ID int,
Name text,
Musical_ID int,
Character text,
Duration text,
age int
)
-- Using valid SQLite, answer ... | SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID ORDER BY COUNT(*) DESC |
### Instruction:
CREATE TABLE table_13094 (
"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 average of lo... | SELECT AVG("Lost") FROM table_13094 WHERE "Place" < '10' AND "Points" < '23' AND "Team" = 'chorrillo' AND "Goals Conceded" < '26' |
### 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, AVG(Weight) FROM people GROUP BY Sex ORDER BY AVG(Weight) |
### Instruction:
CREATE TABLE table_62472 (
"Mountain/Peak" text,
"Height (metres)" real,
"Prominence (metres)" real,
"Height (feet)" real,
"Prominence (feet)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the total number of prominence in m... | SELECT COUNT("Prominence (metres)") FROM table_62472 WHERE "Height (feet)" > '11,663' AND "Mountain/Peak" = 'otter mountain' AND "Height (metres)" < '2692' |
### Instruction:
CREATE TABLE table_29053 (
"District" real,
"Region" text,
"Communes" text,
"Population (2002 census)" real,
"% of total population" text,
"VAP" real,
"Enrolled" real,
"Total votes" real,
"Valid votes" real,
"Turnout" text,
"E/VAP" text,
"T/VAP" text,
... | SELECT "Communes" FROM table_29053 WHERE "Enrolled" = '174946' |
### Instruction:
CREATE TABLE table_13345 (
"Township" text,
"County" text,
"Pop. (2010)" real,
"Land ( sqmi )" real,
"Water (sqmi)" real,
"Latitude" real,
"Longitude" real,
"GEO ID" real,
"ANSI code" real
)
-- Using valid SQLite, answer the following questions for the tables provi... | SELECT MIN("Latitude") FROM table_13345 WHERE "Land ( sqmi )" < '32.696' AND "Water (sqmi)" < '0' |
### Instruction:
CREATE TABLE table_204_675 (
id number,
"year" number,
"game of the year" text,
"abstract strategy" text,
"advanced strategy" text,
"family" text,
"family card" text,
"family strategy" text,
"party" text,
"puzzle" text,
"word" text,
"historical simulation... | SELECT (SELECT "advanced strategy" FROM table_204_675 WHERE "year" = 1991) IS NULL |
### 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 T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name |
### Instruction:
CREATE TABLE table_69376 (
"Frame size" text,
"Width" real,
"Height" real,
"Mpix" real,
"Aspect Ratio" text,
"max. fps" real,
"max. fps HDRx" real,
"lowest possible REDCODE at 24 fps" text,
"lowest possible REDCODE at max. fps" text
)
-- Using valid SQLite, answer ... | SELECT MIN("Width") FROM table_69376 WHERE "Frame size" = '5k' AND "Height" < '2700' |
### Instruction:
CREATE TABLE table_77572 (
"Position" real,
"Club" text,
"Played" real,
"Points" text,
"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 MAX("Position") FROM table_77572 WHERE "Losses" < '17' AND "Goals for" > '57' AND "Goal Difference" < '4' |
### Instruction:
CREATE TABLE table_76457 (
"Place" text,
"Code" real,
"Area (km 2 )" real,
"Population" real,
"Most spoken language" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest code number for the remainder of the municipality... | SELECT MIN("Code") FROM table_76457 WHERE "Population" > '762' AND "Most spoken language" = 'xhosa' AND "Area (km 2 )" > '15.34' AND "Place" = 'remainder of the municipality' |
### 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(Total_Passengers) FROM station GROUP BY Location ORDER BY SUM(Total_Passengers) DESC |
### Instruction:
CREATE TABLE table_204_876 (
id number,
"ecclesiastical jurisdictions" text,
"latin name" text,
"type" text,
"rite" text,
"ecclesiastical province" text,
"established" text,
"area (km2)" number
)
-- Using valid SQLite, answer the following questions for the tables prov... | SELECT ABS((SELECT "area (km2)" FROM table_204_876 WHERE "ecclesiastical jurisdictions" = 'lubango') - (SELECT "area (km2)" FROM table_204_876 WHERE "ecclesiastical jurisdictions" = 'luanda')) |
### Instruction:
CREATE TABLE table_train_235 (
"id" int,
"urinary_protein" float,
"nephrotic_range_proteinuria" bool,
"hepatic_disease" bool,
"estimated_glomerular_filtration_rate_egfr" int,
"kidney_disease" bool,
"renal_transplantation" bool,
"NOUSE" float
)
-- Using valid SQLite, an... | SELECT * FROM table_train_235 WHERE nephrotic_range_proteinuria = 1 OR urinary_protein > 3.5 |
### Instruction:
CREATE TABLE church (
Church_ID int,
Name text,
Organized_by text,
Open_Date int,
Continuation_of text
)
CREATE TABLE wedding (
Church_ID int,
Male_ID int,
Female_ID int,
Year int
)
CREATE TABLE people (
People_ID int,
Name text,
Country text,
Is_Ma... | SELECT Country, COUNT(Country) FROM people WHERE Age < (SELECT AVG(Age) FROM people) GROUP BY Country ORDER BY COUNT(Country) DESC |
### Instruction:
CREATE TABLE table_17130 (
"Calculator" text,
"CPU" text,
"RAM" text,
"Display Size" text,
"Programming Languages" text,
"Link Abilities" text,
"Year Released" text,
"Predecessors" text,
"Successors" text
)
-- Using valid SQLite, answer the following questions for ... | SELECT "CPU" FROM table_17130 WHERE "RAM" = '28 KB of RAM' AND "Display Size" = '128×64 pixels 21×8 characters' |
### 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 T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name |
### Instruction:
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
basePrice INTEGER,
decor TEXT
)
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstNa... | SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType |
### Instruction:
CREATE TABLE actor (
Actor_ID int,
Name text,
Musical_ID int,
Character text,
Duration text,
age int
)
CREATE TABLE musical (
Musical_ID int,
Name text,
Year int,
Award text,
Category text,
Nominee text,
Result text
)
-- Using valid SQLite, answer ... | SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID ORDER BY COUNT(*) |
### 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.Manufacturer, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Name |
### 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 T1.Code, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder |
### Instruction:
CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
)
CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decisio... | SELECT cName, MIN(enr) FROM College GROUP BY state ORDER BY cName |
### 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 T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name |
### Instruction:
CREATE TABLE table_39436 (
"Rank" real,
"Name" text,
"Nationality" text,
"1st (m)" real,
"2nd (m)" real,
"Points" real,
"Overall NT points" text,
"Overall WC points (Rank)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- ... | SELECT MAX("Points") FROM table_39436 WHERE "2nd (m)" < '123.5' AND "Name" = 'thomas morgenstern' AND "Rank" > '4' |
### Instruction:
CREATE TABLE table_75343 (
"Station" text,
"Services" text,
"Local authority" text,
"Zone 2007" text,
"Zone 2008" text,
"Zone 2010" text,
"Zone 2013" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Station has a Zone 20... | SELECT "Station" FROM table_75343 WHERE "Zone 2008" = '8' AND "Zone 2007" = 'outside zones' AND "Services" = 'london overground' |
### Instruction:
CREATE TABLE table_55941 (
"Rank" real,
"Team" text,
"Floor Exercise" real,
"Pommel Horse" real,
"Rings" real,
"Vault" real,
"Parallel Bars" real,
"Horizontal Bar" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided ab... | SELECT COUNT("Pommel Horse") FROM table_55941 WHERE "Rings" = '37.461' AND "Total" < '229.507' |
### Instruction:
CREATE TABLE table_204_416 (
id number,
"chip" text,
"flash size" text,
"eeprom" number,
"sram" number,
"frequency\n[mhz]" number,
"package" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the flash size difference in... | SELECT ABS((SELECT "flash size" FROM table_204_416 WHERE "chip" = 'at90s8515') - (SELECT "flash size" FROM table_204_416 WHERE "chip" = 'at90s4414')) |
### Instruction:
CREATE TABLE AssignedTo (
Scientist int,
Project char(4)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50),
Hours int
)
CREATE TABLE Scientists (
SSN int,
Name Char(30)
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find th... | SELECT T2.Name, COUNT(T2.Name) FROM AssignedTo AS T1 JOIN Projects AS T2 ON T1.Project = T2.Code JOIN Scientists AS T3 ON T1.Scientist = T3.SSN WHERE T3.Name LIKE '%Smith%' GROUP BY T2.Name |
### Instruction:
CREATE TABLE table_46701 (
"Class" text,
"Leading bits" real,
"Size of network number bit field" text,
"Size of rest bit field" text,
"Number of networks" text,
"Addresses per network" text,
"Start address" text,
"End address" text
)
-- Using valid SQLite, answer the f... | SELECT "Size of rest bit field" FROM table_46701 WHERE "Leading bits" > '110' AND "Start address" = '224.0.0.0' |
### Instruction:
CREATE TABLE table_41430 (
"Position" text,
"Jersey #" real,
"Name" text,
"Height (cm)" real,
"Weight (kg)" real,
"Birthdate" text,
"Birthplace" text,
"1986\u20131987 Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- ... | SELECT AVG("Height (cm)") FROM table_41430 WHERE "Weight (kg)" > '84' AND "Birthdate" = 'june 24, 1964' |
### Instruction:
CREATE TABLE table_train_38 (
"id" int,
"left_ventricular_ejection_fraction_lvef" int,
"child_pugh_class" string,
"systolic_blood_pressure_sbp" int,
"heart_disease" bool,
"acute_hepatitis" bool,
"liver_disease" bool,
"heart_rate" int,
"NOUSE" float
)
-- Using valid... | SELECT * FROM table_train_38 WHERE systolic_blood_pressure_sbp < 90 |
### Instruction:
CREATE TABLE table_73802 (
"City / Municipality" text,
"No. of s Barangay" real,
"District" real,
"Area (km\u00b2)" text,
"Population (2010)" real,
"Income class (2007)" text,
"ZIP code" real,
"Mayor" text
)
-- Using valid SQLite, answer the following questions for the... | SELECT COUNT("Population (2010)") FROM table_73802 WHERE "Area (km\u00b2)" = '134.51' |
### Instruction:
CREATE TABLE table_19006 (
"Rank" real,
"Airport" text,
"Total Passengers" real,
"% Change 2007/2008" text,
"International Passengers" real,
"Domestic Passengers" real,
"Transit Passengers" real,
"Aircraft Movements" real,
"Freight ( Metric Tonnes )" real
)
-- Usin... | SELECT "Freight ( Metric Tonnes )" FROM table_19006 WHERE "Transit Passengers" = '147791' |
### Instruction:
CREATE TABLE table_55239 (
"Team" real,
"Games Played" real,
"Wins" real,
"Losses" real,
"Winning Percentage" real,
"Points For" real,
"Points Against" real,
"Point Differential" real
)
-- Using valid SQLite, answer the following questions for the tables provided above... | SELECT MAX("Losses") FROM table_55239 WHERE "Points For" < '79' AND "Games Played" = '10' AND "Point Differential" < '34' |
### Instruction:
CREATE TABLE Projects (
Code Char(4),
Name Char(50),
Hours int
)
CREATE TABLE AssignedTo (
Scientist int,
Project char(4)
)
CREATE TABLE Scientists (
SSN int,
Name Char(30)
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- A pie c... | SELECT T2.Name, COUNT(T2.Name) FROM AssignedTo AS T1 JOIN Projects AS T2 ON T1.Project = T2.Code JOIN Scientists AS T3 ON T1.Scientist = T3.SSN WHERE T3.Name LIKE '%Smith%' GROUP BY T2.Name |
### Instruction:
CREATE TABLE table_34953 (
"Region/country" text,
"1985-1990" real,
"1990-1995" real,
"1995-2000" real,
"2000-2005" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's China's highest 1985-1990 assuming a 2000-2005 larger than 3.0... | SELECT MAX("1985-1990") FROM table_34953 WHERE "Region/country" = 'china' AND "2000-2005" > '3.08' |
### Instruction:
CREATE TABLE people (
people_id number,
district text,
name text,
party text,
age number
)
CREATE TABLE debate_people (
debate_id number,
affirmative number,
negative number,
if_affirmative_win others
)
CREATE TABLE debate (
debate_id number,
date text,
... | SELECT T2.name FROM debate_people AS T1 JOIN people AS T2 ON T1.negative = T2.people_id GROUP BY T2.name HAVING COUNT(*) >= 2 |
### Instruction:
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
... | SELECT Sex, COUNT(Sex) FROM people GROUP BY Sex ORDER BY COUNT(Sex) |
### Instruction:
CREATE TABLE county_public_safety (
county_id number,
name text,
population number,
police_officers number,
residents_per_officer number,
case_burden number,
crime_rate number,
police_force text,
location text
)
CREATE TABLE city (
city_id number,
county_id ... | SELECT police_force, COUNT(*) FROM county_public_safety GROUP BY police_force |
### Instruction:
CREATE TABLE table_dev_58 (
"id" int,
"gender" string,
"pregnancy_or_lactation" bool,
"intra_aortic_balloon_pump_iabp" bool,
"systemic_arterial_po2" int,
"creatinine_clearance_cl" float,
"supplemental_oxygen" bool,
"age" float,
"NOUSE" float
)
-- Using valid SQLite... | SELECT * FROM table_dev_58 WHERE intra_aortic_balloon_pump_iabp = 1 |
### Instruction:
CREATE TABLE county (
county_id number,
county_name text,
population number,
zip_code text
)
CREATE TABLE party (
party_id number,
year number,
party text,
governor text,
lieutenant_governor text,
comptroller text,
attorney_general text,
us_senate text
)... | SELECT MAX(population), MIN(population) FROM county |
### Instruction:
CREATE TABLE volume (
Volume_ID int,
Volume_Issue text,
Issue_Date text,
Weeks_on_Top real,
Song text,
Artist_ID int
)
CREATE TABLE artist (
Artist_ID int,
Artist text,
Age int,
Famous_Title text,
Famous_Release_date text
)
CREATE TABLE music_festival (
... | SELECT Category, COUNT(*) FROM music_festival GROUP BY Category |
### Instruction:
CREATE TABLE table_name_53 (
engine_capacity INTEGER,
mpg_us_urban VARCHAR,
mpg_uk_urban__cold_ VARCHAR,
mpg_uk_extra_urban VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the engine capacity when the mpg-UK urban is less than ... | SELECT SUM(engine_capacity) FROM table_name_53 WHERE mpg_uk_urban__cold_ < 12.2 AND mpg_uk_extra_urban < 18.8 AND mpg_us_urban < 7.2 |
### Instruction:
CREATE TABLE table_4061 (
"Contestant" text,
"Age" real,
"Height" text,
"Starting BMI" text,
"Finale BMI" text,
"Reunion BMI" text,
"Start Weight" text,
"Finale Weight" text,
"Reunion Weight" text,
"lbs lost finale" text,
"lbs lost reunion" real
)
-- Using ... | SELECT "lbs lost reunion" FROM table_4061 WHERE "Finale Weight" = '151.4' |
### Instruction:
CREATE TABLE Scientists (
Name VARCHAR,
SSN VARCHAR
)
CREATE TABLE Projects (
Name VARCHAR,
Hours VARCHAR,
Code VARCHAR
)
CREATE TABLE AssignedTo (
Scientist VARCHAR,
Project VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT T1.Name, T3.Name, T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name, T1.Name |
### 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, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter |
### 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 title, MAX(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE director <> "null" GROUP BY title ORDER BY title |
### 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 location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'bethel island' AND location.street_name = 'bethel island rd' AND restaurant.id = location.restaurant_id |
### Instruction:
CREATE TABLE table_42261 (
"Position" text,
"Jersey number" real,
"Name v t e" text,
"Height (cm)" real,
"Weight (kg)" real,
"Birthplace" text,
"2009-10 team" text,
"NHL rights, if any" text
)
-- Using valid SQLite, answer the following questions for the tables provide... | SELECT "Birthplace" FROM table_42261 WHERE "Position" = 'd' AND "Height (cm)" = '190' AND "Jersey number" = '11' |
### Instruction:
CREATE TABLE table_65780 (
"Mother Tongue" text,
"Population (2006)" real,
"Percentage (2006)" text,
"Population (2011)" real,
"Percentage (2011)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What percentage of the 2011 population... | SELECT "Percentage (2011)" FROM table_65780 WHERE "Population (2006)" > '120' AND "Percentage (2006)" = '45.22%' |
### Instruction:
CREATE TABLE table_78172 (
"Season" real,
"Belonging league" text,
"Matches" real,
"league point" real,
"Draw" real,
"Lose" real,
"Goal difference" real,
"Point" real,
"Lost point" real,
"Final rank" real
)
-- Using valid SQLite, answer the following questions ... | SELECT AVG("Lose") FROM table_78172 WHERE "Lost point" > '16' AND "Goal difference" < '37' AND "Point" < '43' |
### Instruction:
CREATE TABLE table_60569 (
"Measure" text,
"Bombali" real,
"Bonthe" real,
"Kailahun" real,
"Kambia" text,
"Kenema" real,
"Koinadugu" real,
"Kono" real,
"Moyamba" text,
"Port Loko" text,
"Pujehun" real,
"Tonkolili" real
)
-- Using valid SQLite, answer th... | SELECT AVG("Pujehun") FROM table_60569 WHERE "Measure" = 'female enrollment' |
### Instruction:
CREATE TABLE table_72089 (
"District" text,
"Total amount of trees" real,
"Prevailing types, %" text,
"Amount of old trees" text,
"Amount of trees, that require replacement" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the... | SELECT "Amount of trees, that require replacement" FROM table_72089 WHERE "Prevailing types, %" = 'Pine — 29.37 Poplar — 26.12 Acer negundo — 13.2' |
### Instruction:
CREATE TABLE broadcast (
channel_id number,
program_id number,
time_of_day text
)
CREATE TABLE broadcast_share (
channel_id number,
program_id number,
date text,
share_in_percent number
)
CREATE TABLE program (
program_id number,
name text,
origin text,
lau... | SELECT name FROM channel ORDER BY rating_in_percent DESC |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.