Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Method One
4. Method 1 – exercise 2
Method Two
Method Three


Perfect! We have a slightly more complicated task for you next.


Calculate the total revenue generated (after discount) by customers from France and by customers from other countries. Show two columns: CustomerCountry (either N'France' or N'Other') and DiscountRevenue. Round the second column to two decimal places.

Stuck? Here's a hint!

In the inner query, join the Orders and Customers table. Use the Country column to find out if a customer is from France. In the outer query, join the CTE with OrderItems to calculate the sum for each order. Use the ROUND(Column, 2) function.