Exercise 6: Write Basic SQL Queries

Modified from Exercise 2.4.1 from the textbook. The products database consists of 4 relational instances with the following schemas

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

Write SQL queries for the following questions.

  1. What PC models have a speed of at least 3.00?

  2. Which manufacturers make laptops with a hard disk of at least 100GB?

  3. Find the model number and price of all products (of any type) made by manufacturer B.

  4. Find the model numbers of all color laser printers.

  5. Find those manufacturers that sell Laptops, but not PC’s.

  6. Find those hard disk sizes that occur in two or more PC’s.

  7. Find those pairs of PC models that have both the same speed and RAM. A pair should be listed only once; e.g., list (i, j) but not (j, i).

  8. Find those manufacturers of at least two different computers (PC’s or laptops) with speeds of at least 2.80.

  9. Find the manufacturer(s) of the computer (PC or laptop) with the highest available speed.

  10. Find the manufacturers of PC’s with at least three different speeds.

  11. Find the manufacturers who sell exactly three different models of PC