Added sorting of grouped rows with summary (aggregation)

Change-Id: I6789dd0d23debe809dfbeacd3d1ef497ac12bc28