Save up to $499! Grab all Python courses for $49 or all online courses we’ve ever launched for only $169. Only Feb 11-16. Happy Valentine's!
Introduction
GROUPING SETS
Summary

Instruction

Okay, it's time to practice GROUPING SETS.

Exercise

Rewrite the template query so it uses GROUPING SETS instead of UNION ALL.

Stuck? Here's a hint!

Use the template to help you:

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