Management Information Systems (33:623:370) 
Professor Eckstein
Computer Store In-Class Exercise, Version II, Part 2

Suppose we have the following database:

CUSTOMER(CustomerID, FirstName, LastName, Address, City, State, Zip, Phone)

ORDER(OrderID, CustomerID, OrderDate)
        CustomerID foreign key to CUSTOMER

ORDERDETAILS(OrderID, ProductID, Quantity)
        OrderID foreign key to ORDER
        ProductID foreign key to PRODUCT

PRODUCT(ProductID, Name, Description)

PRICE(ProductID, EffectiveDate, Price)
        ProductID foreign key to PRODUCT

To prevent the database from growing too fast, we only enter prices into the PRICE table on the day they go into effect -- that is, when we first start carrying a product, or whenever we change the price. 

We would like to make a query that displays the ID, Customer first and last names, date, and total price for each order, correctly calculated using the prices in effect for each product at the time of the order.