SQL - How to Use Rollup Operator to Calculate SubTotal and GrandTotal at hierarchal Level
Mukesh Singh
In this tutorial, you will learn "How to Use Rollup Operator to Calculate SubTotal and GrandTotal at hierarchal Level in SQL" in SQL Server.
ROLLUP is an extension of the SQL GROUP BY clause, used to generate summary reports with subtotals and grand totals. It helps in aggregating data at multiple levels of granularity..
šThe ROLLUP operator produces a result set that shows aggregates for a hierarchy of values.
šItās typically used to create subtotals and grand totals.
šIt works from left to right, creating subtotals that roll up from the most detailed level to a grand total.
šNULL values represent subtotals and the grand total.
āTo learn more, please follow us - http://www.sql-datatools.com āTo Learn more, please visit our YouTube channel at - http://www.youtube.com/c/Sql-datatools āTo Learn more, please visit our Instagram account at - https://www.instagram.com/asp.mukesh/ āTo Learn more, please visit our twitter account at - https://twitter.com/macxima āTo Learn more, please visit our Medium account at - https://medium.com/@macxima ... https://www.youtube.com/watch?v=48sPZZr9V4c
24280907 Bytes