I am trying to perform a number of calculations on a database table that requires me to aggregate (perform groupby\'s) at different levels.
Let\'s say I have an exist