POTD 4: SQL Subqueries and quantifiers

Due 7-Oct-2025, 1pm EST

Purpose:

You may make a copy of a worksheet and complete this activity, or simply type your answers in any text editor.

You may work alone or with at most 2 other students (max size=3) in this course.


Use the following schema.

Product (maker, model, type)     -- maker is foreign key to Manufacturer(maker)
PC (model, speed, ram, hd, price)
Laptop (model, speed, ram, hd, screen, price)
Printer (model, color, type, price)

Alternatively, you may import Product-Laptop-PC-Printer.sql into your database server.

You may find subqueries helpful.


Write SQL queries to solve at least 5 of the following problems.
  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 maker of the color printer with the lowest price
  5. Consider the manufacturers that make printers, find the average hard disk size of a PC these manufacturers make
  6. List all laptops with price greater than the average price of PC's
  7. Find the average price of PC's and laptops made by manufacturer "EEE"

Grading rubric

[Total: 10 points]: Done (or provide evidence of your attempt, full or reasonable effort)

(-2.5 points) for 24 hours late (submitted after 7-Oct-2025 1pm EST, by 8-Oct-2025 1pm EST)
(-5 points) for 48 hours late (submitted after 8-Oct-2025 1pm EST, by 9-Oct-2025 1pm EST)


Submission


Copyright © 2025 Upsorn Praphamontripong
Released under the Creative Commons License CC-BY-NC-SA 4.0 license.
Last updated 2025-09-26 21:47