You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Exercise_4.4.1.sql 281B

123456789101112
  1. SELECT
  2. email_address,
  3. o.order_id,
  4. SUM((item_price - discount_amount) * quantity) AS order_total
  5. FROM
  6. customers c
  7. JOIN
  8. orders o ON c.customer_id = o.customer_id
  9. JOIN
  10. order_items oi ON o.order_id = oi.order_id
  11. GROUP BY email_address , order_id