To Homework

IT 240 -- Homework H3

More Queries

Due date: Wednesday, Apr 23, 2008

For this homework you will need Microsoft Access. You may either do the query in SQL or use QBE.
Here's a Crosstab query example.


  1. Download the Access file HenryBooks.mdb (it's the same one as in H2).

  2. Queries: [Number 8 is worth 12 extra credit points.]

    1. Which books have been published in paperback? List author last name and book title. Sort by last name.

    2. Find the average price of each type of book. Format price as currency.

    3. For each branch store, list the number of books on hand.

    4. List all fiction (FIC) books published in New York. Just show the book title and publisher name.

    5. Find the average price of all books for which there are more than 2 on hand in inventory.

    6. The president of Henry Books would like to know the average price of books at each of the four branches. But she wants the prices
      broken down by type.  And she only wants the prices for fiction (FIC), horror (HOR), mystery (MYS), and science fiction (SFI).
      Format your results using currency.

    7. (challenging) List all publishers that do not have any books at the Henry Brentwood branch.
    8. (more challenging) Which author has the most number of books on hand in inventory?  List author last name and number of books on hand.

  3. Requirements:
    • Your seven (or eight) queries in part 2 above, must be named Q1,...,Q7, (Q8).
    • Your database file must be called smith-H3.mdb, where Smith is your last name.
    • Double check that your database file opens properly and contains your seven (eight) queries.
    • Just before you submit your database, open it one final time.  Click on:  Tools | Database Utilities | Compact and Repair Database...
      Now close your database.  This step can save quite a bit of space.
    • Submit your smith-H3.mdb file using COLweb.