Categories
MySQL

Optim MySQL: OLAP Paradise – WITH ROLLUP

Optim MySQL: OLAP Paradise – WITH ROLLUP

Though this is an age old concept, but after seeing the ignorance factor of many regarding this, I thought of writing a bit about it. ROLLUP is a GROUP BY modifier that adds extra rows to the output which contain summary data. At each level of aggregation the aggregated column is filled with a NULL value.