Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Get to know the database
7. The Orders and OrderItems tables
Summary

Instruction

Very well done! Let's now take a look at the Orders and OrderItems tables.

The Orders table contains general information about an order: the OrderID, CustomerID, and EmployeeID related to that sale. There are also timestamp columns (OrderDate and ShippedDate) and many columns related to the shipment process.

The OrderItems table contains information about order items. Each row represents a single item from an order. You'll find the OrderID and ProductID alongside UnitPrice, Quantity, and (possibly) Discount.

Exercise

Display the list of products purchased in the order with ID equal to 10250. Show the following information: product name (ProductName), the quantity of the product ordered (Quantity), the unit price (UnitPrice from OrderItems table), the discount (Discount), and the OrderDate. Order the items by product name.

Stuck? Here's a hint!

You will need to join three tables: OrderItems, Orders, and Products. Remember to select only the order with ID of 10250 and to order the items by product name.