After adding the WITH ROLLUP in the GROUP BY statement the ranges reordered. How can this be fixed?
Here is the code