Add grouping key to QueryGraph and enabling it in QueryGraphBuilder
Introduce aggregation step for planning [broken]