Handles missing group by column