GEEK POST
Okay so in the course of my work today, I learned something entirely new. Asking around the office did not turn up much. Everyone had practically no straight answer about it. It's the keyword ROLLUP used in Oracle. The MSSQL version is WITH ROLLUP.
I was amazed at how this little known and obscure word found its way into my company source codes. And since 2005 too!
Simply phrased, its job is to calculate a subtotal by grouping on multiple columns not part of a Count/Sum (or some other aggregating function). The outcome is additional rows in the results that displays the subtotal summation of the aggregate functions, grouped by the retrieved columns which are non-aggregate.
Fascinating!
No comments:
Post a Comment