Instruction
Good job! Let's write one more query with SUM(), this time from scratch!
Exercise
There have been a lot of orders shipped to France. Of these, how many order items were sold at full price and how many were discounted? Show two columns with the respective counts: full_price and discounted_price.
Stuck? Here's a hint!
Use the discount column from the order_items table.
Here's an example of using SUM() (from the previous exercise):
SELECT
SUM(CASE
WHEN region = 'WA' THEN 1
END) AS orders_wa_employees,
SUM(CASE
WHEN region != 'WA' THEN 1
END) AS orders_not_wa_employees
FROM employees e
JOIN orders o
ON e.employee_id = o.employee_id;




