Only this week, get the SQL Complete Track of 9 courses in a special prize of $330$89!
Introduction
CUBE
Summary

## Instruction

Great! As with ROLLUP, you can use the GROUPING() function with CUBE.

## Exercise

Show the average damage repair cost for all possible combinations of Year, Month, and Cause. Remove the row containing the total average from the results with the help of the GROUPING() function.

Show the following columns in the query result: Year, Month, Cause, and AvgCost.

### Stuck? Here's a hint!

Use:

GROUPING(Year) + GROUPING(Month) + GROUPING(Cause) > 0