adds Group by