Kickstart 2020 with new opportunities! - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
GROUPING SETS
Summary

Instruction

Nicely done! Now it's your turn.

Exercise

Find the average principal (as avg_principal) and average interest (as avg_interest) for the following grouping combinations:

  1. year and quarter
  2. country
  3. None (overall averages)

Stuck? Here's a hint!

Use the template to help you:

SELECT
  A,
  B,
  ...
FROM X
GROUP BY GROUPING SETS
(
  (A),
  (B),
  ()
)