如下图数据,我们业务需要,只取每个dumpingSite一样的第一条数据:
写法:
select s.*
from (
select *, row_number() over (partition by [重复字段] order by [排序字段]) as group_idx
from table_name
) s
where s.group_idx = 1
标签:group,idx,只取,list,第一条,mysql,数据,select
来源: https://blog.csdn.net/hanshanyunhai/article/details/104926731