On January 21th at 14:15 UTC , progression through exercises will be unavailable for 10 minutes due to a planned maintenance break.
Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Reports with revenue in categories


Before we start creating reports that use product categories, let's get comfortable with joining tables. Look at the following query:

FROM OrderItems OI
JOIN Products P
  ON OI.ProductId = P.ProductId
JOIN Categories C
  ON P.CategoryId = C.CategoryId
WHERE OrderId = 10480;

The query returns some basic order info by selecting columns from three tables: the product name from Products, the category name from Categories, and the amount paid from OrderItems. Notice the JOINs we use here; we'll have to join these three tables quite often in this part.


For all order items from the order with the ID of 10498, show the following columns:

  1. ProductId
  2. CategoryName
  3. ProductName
  4. Amount

Stuck? Here's a hint!

Use the same tables as shown in the example code.