Instruction
Good! Now we'll show you how to write your own multi-level aggregation query. As we said earlier, we'll go step by step. Let's start with finding the average number of items in each order.
In step one, we'll count the items in each query.
Exercise
Create a simple query (no CTE needed) that will show two columns: order_id and item_count. The item_count column should show the sum of quantities of all items in a given order.
Stuck? Here's a hint!
Use the order_items table. Group by order_id and use SUM(quantity).



