First of all thanks for your help. sorted_id is the id sorted after group_id grouping. I hope to aggregate according to group_id and retur
sorted_id
group_id