Question: 6 . 3 . SUBQUERIES 6 . 3 . 9 Exercises for Section 6 . 3 Exercise 6 . 3 . 1 : Write the
SUBQUERIES
Exercises for Section
Exercise : Write the following queries, based on the database schema
Product model, type
speed, ram, price
Laptop speed, ram, screen, price
Printer color, type, price
of Exercise You should use at least one subquery in each of your answers
and write each query in two significantly different ways eg using different
sets of the operators EXISTS, IN ALL, and ANY
a Find the makers of PCs with a speed of at least
b Find the printers with the highest price.
c Find the laptops whose speed is slower than that of any PC
d Find the model number of the item PC laptop, or printer with the
highest price.
e Find the maker of the color printer with the lowest price.
f Find the makers of the with the fastest processor among all those
PCs that have the smallest amount of RAM.
Exercise : Write the following queries, based on the database schema
Classes type, country, numGuns, bore, displacement
Ships class, launched
Battles date
Outcomes battle, result
of Exercise You should use at least one subquery in each of your answers
and write each query in two significantly different ways eg using different
sets of the operators EXISTS, IN ALL, and ANY
a Find the countries whose ships had the largest number of guns.
b Find the classes of ships, at least one of which was sunk in a battle.
c Find the names of the ships with a inch bore.
d Find the battles in which ships of the Kongo class participated.
e Find the names of the ships whose number of guns was the largest for
those ships of the same bore.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
