Exercise 7: Write Nested SQL Queries

Exercise 6.3.1 from the textbook. Write the following queries, based on the database schema

Product(maker, model, type) 
Laptop(model, speed, ram, hd, screen, price)
PC(model, speed, ram, hd, price) 
Printer(model, color, type, price)

of Exercise 2.4.1, and evaluate your queries using the data of that exercise. You MUST 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 ) .

  1. Find the makers of PC’s with a speed of at least 3.0.

  2. Find the printers with the highest price.

  3. Find the laptops whose speed is slower than that of any PC.

  4. Find the model number of the item ( PC , laptop , or printer ) with the highest price.

  5. Find the maker of the color printer with the lowest price.

  6. Find the maker(s) of the PC(s) with the fastest processor among all those PC’s that have the smallest amount of RAM.