Advanced Aggregation with ROLLUP

Published July 26, 2025 By Sai Sree Ram Gundepudi

Using ROLLUP

SELECT department, SUM(salary) 
FROM employees 
GROUP BY department WITH ROLLUP;

The NULL row shows the grand total.

Was this solution helpful?

Your feedback helps improve our technical knowledge repository.

Share this article