Introduction
GROUPING SETS
Summary

## Instruction

Nice job!

What can we do with those NULL values? Naturally, we can use COALESCE():

SELECT
CustomerId,
COALESCE(RepairCenter, 'ALL'),
AVG(RepairDuration) AS AvgRepairDuration
FROM WarrantyRepair
GROUP BY GROUPING SETS
(
(CustomerId, RepairCenter),
)


In the query above, any NULL values in the RepairCenter column will be replaced with the word ALL.

## Exercise

Show the sum of all Principal amounts for two grouping sets:

1. SalesPerson
2. Country

Show the following columns in the query result: SalesPerson, Country, and SumPrincipal.

Instead of NULL values in the columns SalesPerson and Country, show a double dash (--).

### Stuck? Here's a hint!

SELECT