1
SQLIntermediate#queries#performance
ROLLUP adds super-aggregate subtotal rows to a GROUP BY result, producing per-group totals plus a grand total in a single query.
SELECT region, city, SUM(total) FROM sales GROUP BY ROLLUP (region, city); -- rows per city, per region, then overall total