initial GROUP BY and mathematical expressions ready