Management Information Systems (33:136:370:02) 
Fall 2015, Professor Eckstein
Assignment 10

Due: Thursday, December 10
   

Q1.  Download the bookstore-2000.mdb database from the class website (under December 3).  For each of the following queries, hand in both SQL code and your query results.  Note that in this database, the cost_each field is set equal to the price of the item at the time of sale, and cost_line is always equal to quantity times cost_each.

  1. Write a query that indicates the total revenue received over the entire life of the database, labeled total_revenue).  Note that only the Orderlines table is needed for this query.
     
  2. Find the total revenue received since January 1, 2000, also labeled total_revenue.  Note that for this query you will also need the Orders table, because you need to examine order dates.
     
  3. For each customer who has ordered any items since January 1, 2000, show the customer's last name and the total revenue received from him or her since January 1, 2000 (labeled revenue).  Customers with the same last name should have different lines of output, rather than being merged into a single line.  Assume it is possible for two customers to have both the same first name and same last name.
     
  4. Repeat the same query as in part (c), but only show customers who have spent at least $75 since January 1, 2000, and list them in order of amount spent, starting with the largest amount spent.
     

Q2.  Problem 6 on pages 16-17 of draft chapter 11.
 

Q3.  Problem 3 on page 14 of draft chapter 9.  The Excel file with the problem data may be found at http://eckstein.rutgers.edu/mis/databases/express-mail.xlsx.