3c
CREATE TABLE Product( maker VARCHAR(25),
model VARCHAR(25),
"year" INT);
CREATE TABLE Car(model VARCHAR(25),
city REAL,
highway REAL,
style VARCHAR(25),
passengers INT,
trunk REAL,
msrp INT);
CREATE TABLE Pickup(model VARCHAR(25),
city REAL,
highway REAL,
passengers INT,
cargo REAL,
towing REAL,
msrp INT);
CREATE TABLE EV(model VARCHAR(25),
range REAL,
battery REAL,
passengers INT,
msrp INT);
insert into Product (maker, model, "year") values ('Toughjoyfax', 'Down-sized', 1952);
insert into Product (maker, model, "year") values ('Temp', 'framework', 1950);
insert into Product (maker, model, "year") values ('Bitchip', 'dynamic', 1949);
insert into Product (maker, model, "year") values ('Overhold', 'leading edge', 1907);
insert into Product (maker, model, "year") values ('Tempsoft', '6th generation', 1907);
insert into Product (maker, model, "year") values ('Daltfresh', 'Quality-focused', 1945);
insert into Product (maker, model, "year") values ('Konklab', 'optimal', 1948);
insert into Product (maker, model, "year") values ('Vagram', 'composite', 1980);
insert into Product (maker, model, "year") values ('Sonair', 'ability', 1949);
insert into Product (maker, model, "year") values ('Opela', 'synergy', 1969);
insert into Product (maker, model, "year") values ('Namfix', 'Quality-focused', 2007);
insert into Product (maker, model, "year") values ('Sonair', 'groupware', 1915);
insert into Product (maker, model, "year") values ('Ventosanzap', 'strategy', 1957);
insert into Product (maker, model, "year") values ('Cardify', 'Multi-lateral', 1991);
insert into Product (maker, model, "year") values ('Cardify', 'utilisation', 1913);
insert into Product (maker, model, "year") values ('Pannier', 'Streamlined', 1907);
insert into Product (maker, model, "year") values ('Fix San', 'foreground', 1957);
insert into Product (maker, model, "year") values ('Flexidy', 'Stand-alone', 1931);
insert into Product (maker, model, "year") values ('Ventosanzap', 'matrix', 2016);
insert into Product (maker, model, "year") values ('Ventosanzap', 'matrix2', 2016);
insert into Product (maker, model, "year") values ('Ventosanzap', 'matrix3', 2016);
insert into Product (maker, model, "year") values ('Subin', 'support', 1993);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('matrix', 78, 24.2, 'Green', 110, 6100, 6938);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('static', 85, 50.0, 'Teal', 8010, 4546, 4947);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('24/7', 81, 50.1, 'Green', 6320, 5277, 7500);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('even-keeled', 26, 88.8, 'Teal', 4265, 2350, 386);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('info-mediaries', 99, 18.8, 'Pink', 1310, 4487, 1872);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('superstructure', 16, 20.4, 'Fuscia', 2196, 816, 6081);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('focus group', 21, 87.9, 'Khaki', 7343, 1008, 1036);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('User-friendly', 40, 21.1, 'Puce', 805, 3856, 2329);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('transitional', 5, 25.3, 'Maroon', 7077, 8532, 2993);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('Future-proofed', 73, 14.9, 'Orange', 3302, 7198, 2193);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('Secured', 23, 18.1, 'Red', 6417, 3816, 7471);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('maximized', 22, 27.9, 'Maroon', 6862, 3249, 3545);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('Extended', 33, 45.0, 'Green', 524, 5092, 823);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('composite', 9, 18.0, 'Teal', 5426, 7513, 1942);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('circuit', 82, 94.2, 'Pink', 5286, 8202, 1893);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('approach', 76, 59.7, 'Turquoise', 7952, 5282, 8606);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('algorithm', 2, 19.0, 'Crimson', 10, 95, 8161);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('Realigned', 7, 12.9, 'Violet', 5325, 3300, 5334);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('Distributed', 27, 24.8, 'Green', 5970, 7703, 8066);
insert into Car (model, city, highway, style, passengers, trunk, msrp) values ('infrastructure', 29, 26.8, 'Khaki', 4605, 8359, 4074);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('matrix3', 93, 85.8, 7367, 6774.4, 3547.6, 1927);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('benchmark', 93, 85.8, 7367, 6774.4, 3547.6, 1927);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('24/7', 5, 71.1, 1972, 4785.9, 6918.5, 7310);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('Switchable', 40, 83.1, 2102, 4087.2, 792.7, 5498);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('Synergistic', 81, 13.1, 3396, 6693.9, 7410.1, 3284);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('Upgradable', 72, 80.5, 5665, 1265.5, 5828.4, 7234);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('asynchronous', 79, 13.7, 5606, 985.0, 3244.4, 4164);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('database', 34, 83.8, 6150, 8508.0, 1364.8, 5908);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('zero tolerance', 69, 54.6, 972, 2705.4, 353.5, 706);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('scalable', 80, 55.5, 389, 2722.8, 8895.4, 7145);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('client-driven', 28, 87.3, 7645, 7101.5, 862.7, 491);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('monitoring', 8, 20.1, 2461, 4551.4, 5124.6, 6447);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('Intuitive', 58, 46.9, 2867, 8606.6, 2670.1, 218);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('Switchable', 89, 11.4, 685, 172.6, 6719.8, 3496);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('data-warehouse', 34, 99.1, 8891, 6311.3, 746.4, 5946);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('standardization', 61, 90.5, 1786, 1811.2, 7536.6, 3371);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('logistical', 76, 31.5, 6665, 8349.8, 571.3, 5110);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('complexity', 56, 48.0, 8574, 3280.5, 8575.2, 3671);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('Managed', 12, 88.2, 6310, 3896.9, 2233.1, 3170);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('Reduced', 37, 14.6, 8279, 1291.4, 4017.4, 2655);
insert into Pickup (model, city, highway, passengers, cargo, towing, msrp) values ('strategy', 69, 54.7, 8780, 4405.9, 5938.5, 7351);
insert into EV (model, range, battery, passengers, msrp) values ('modular', 98, 79.2, 1968, 3529);
insert into EV (model, range, battery, passengers, msrp) values ('strategy', 30, 47.2, 6014, 4235);
insert into EV (model, range, battery, passengers, msrp) values ('Reverse-engineered', 14, 36.0, 7116, 2393);
insert into EV (model, range, battery, passengers, msrp) values ('framework', 11, 98.8, 5022, 4648);
insert into EV (model, range, battery, passengers, msrp) values ('transitional', 82, 31.4, 943, 6175);
insert into EV (model, range, battery, passengers, msrp) values ('3rd generation', 84, 99.1, 2596, 2958);
insert into EV (model, range, battery, passengers, msrp) values ('ability', 20, 55.3, 4655, 2046);
insert into EV (model, range, battery, passengers, msrp) values ('policy', 94, 34.2, 5878, 8961);
insert into EV (model, range, battery, passengers, msrp) values ('Self-enabling', 99, 73.5, 5572, 261);
insert into EV (model, range, battery, passengers, msrp) values ('6th generation', 2, 28.6, 1300, 831);
insert into EV (model, range, battery, passengers, msrp) values ('executive', 16, 33.8, 5219, 7616);
insert into EV (model, range, battery, passengers, msrp) values ('Realigned', 70, 40.8, 1721, 4097);
insert into EV (model, range, battery, passengers, msrp) values ('leverage', 12, 88.8, 6311, 8935);
insert into EV (model, range, battery, passengers, msrp) values ('Cross-platform', 40, 94.9, 8295, 7600);
insert into EV (model, range, battery, passengers, msrp) values ('exuding', 96, 1.6, 6593, 2560);
insert into EV (model, range, battery, passengers, msrp) values ('Ergonomic', 43, 22.7, 7456, 3854);
insert into EV (model, range, battery, passengers, msrp) values ('Reactive', 73, 18.0, 8306, 7541);
insert into EV (model, range, battery, passengers, msrp) values ('access', 3, 13.4, 5332, 4271);
insert into EV (model, range, battery, passengers, msrp) values ('flexibility', 21, 86.3, 3261, 686);
insert into EV (model, range, battery, passengers, msrp) values ('task-force', 10, 35.0, 6105, 398);
(Select maker
From(Select model
from Car
where msrp>6000
union
Select model
from EV where msrp>6000
union
Select model
from Pickup
where msrp>6000)as A, Product
Where Product.model = A.model
)
intersect
(Select maker
From(Select model
from Car
where msrp<2500
union
Select model
from EV where msrp<2500
union
Select model
from Pickup
where msrp<2500)as B, Product
Where Product.model = B.model
)
|
run
| edit
| history
| help
|
0
|
|
|