首页
服务
产品
文档
关于
search
close
首页
数据库
sqlserver去重
select count(*) as H from (select user_id, ROW_NUMBER() OVER (PARTITION BY tb.user_id order by tb.id) rn from tb where user_id>0) T where rn =1