PostgreSQL - Aggregate Functions and GROUP BY
You want to generate a report showing sales totals by
year, region, and category, including subtotals for each level and a grand total. Which query correctly uses ROLLUP to achieve this?