Through the over() function, add serial numbers to the data packets, and finally filter to remove duplicates.
select row_number() over(partition by a.分组列 order by a.排序列) rn,a.* from table_name a;
Through the over() function, add serial numbers to the data packets, and finally filter to remove duplicates.
select row_number() over(partition by a.分组列 order by a.排序列) rn,a.* from table_name a;