Updating group by