Question
Question 1 -- Find the maker or makers of PCs with at least three different speeds. -- If more than one, order by maker. --
Question 1
-- Find the maker or makers of PCs with at least three different speeds. -- If more than one, order by maker. -- hint: use a having clause containing a count(distinct ) function.
part 2
-- Find those makers of at least two different computers (PCs or -- laptops) with speeds of at least 2.80. Order the list by maker. -- hint: use a subquery that does a UNION of the pc and laptop tables.
part 3
-- Find the maker(s) of the computer (PC or laptop) with the highest -- speed. If there are multiple makers, list all of them and order by maker.
Schema used -
create schema product;
use product;
create table product ( maker char(5) not null, model char(4) primary key, type char(10) not null );
create table pc ( model char(4) primary key, speed decimal(8,2) not null, ram int not null, hd int not null, price int );
create table laptop ( model char(4) primary key, speed decimal(8,2) not null, ram int not null, hd int not null, screen decimal(8,2) not null, price int not null );
create table printer ( model char(4) primary key, color boolean not null, type char(10) not null, price int not null );
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started