Question: 6 . 3 . SUBQUERIES 6 . 3 . 9 Exercises for Section 6 . 3 Exercise 6 . 3 . 1 : Write the

6.3. SUBQUERIES
6.3.9 Exercises for Section 6.3
Exercise 6.3.1: Write the following queries, based on the database schema
Product(maker, model, type)
PC(model, speed, ram, hd, price)
Laptop(model, speed, ram, hd, screen, price)
Printer(model, color, type, price)
of Exercise 2.4.1. You should use at least one subquery in each of your answers
and write each query in two significantly different ways (e.g., using different
sets of the operators EXISTS, IN, ALL, and ANY).
a) Find the makers of PC's with a speed of at least 3.0.
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 maker(s) of the PC(s) with the fastest processor among all those
PC's that have the smallest amount of RAM.
Exercise 6.3.2 : Write the following queries, based on the database schema
Classes(class, type, country, numGuns, bore, displacement)
Ships(name, class, launched)
Battles(name, date)
Outcomes(ship, battle, result)
of Exercise 2.4.3. You should use at least one subquery in each of your answers
and write each query in two significantly different ways (e.g., 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 16-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.
 6.3. SUBQUERIES 6.3.9 Exercises for Section 6.3 Exercise 6.3.1: Write the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!