How to make a data tree out of a rollup SQL query
For our Cube module we use the ROLLUP SQL query to fetch all data from the database and then make a tree data structure out of the given result. This is how we make it a lot easier to render cubes dynamically.