Stop Writing UNION ALL for Subtotals: Aggregation Extensions in Redshift and Athena

Simple GROUP BY computes one level of aggregation. When you need multiple levels (subtotals, grand totals, cross-dimensional summaries)…