Only this week, get the SQL Complete Track of 9 courses in a special prize of $330 $89!
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)
)