27,579
社区成员
发帖
与我相关
我的任务
分享
select * from (
select ROW_NUMBER() over( Partition by name order by createTime)
as num ,* from [user]
) a where num =1
select * from (
select
ROW_NUMBER() over( Partition by name order by createTime) as num
,count(1) over( Partition by name ) as cnt
,* from [user]
) a where num =1 and cnt >1