Instruction
Perfect! One more exercise before we move on.
Exercise
For each order, determine how many line items (unique products) were discounted and how many weren't. Show three columns:
- The order ID (
order_id). - The number of line items that were not discounted (as
full_price_product_count). - The number of line items that were discounted (as
discount_product_count)
Stuck? Here's a hint!
You can use the following to calculate the number of full-price products in each order:
COUNT(CASE
WHEN discount = 0
THEN product_id
END)



