The ROLLUP clause is used to do aggregate operations on multiple levels in hierarchy. If we want a sum on different levels without adding any new columns, then we can do it easily by using ROLLUP. We have to just add the WITH ROLLUP clause in the GROUP BY clause.
Thanks for reading this article,
Next steps :
- Share this with your colleagues because Sharing is Learning
- Comment below if you need any assistance
Powered by CodeReview – Let’s make it Better!