RANK()OVER() 去重

select *
  from dcs_reserved_rnscb0609 c
 where c.dcs_id in (select dcs_id
                      from (select RANK() over(partition by zqdm, zqjc, sj, xynx, jyfs, zxjz, zxsyl, ljcjl, dzf, jqpjjj, jppjsyl, pmll, zqpj, ztpj, cjrq order by oper_user) rn,
                                   a.dcs_id
                              from dcs_reserved_rnscb0609 a) b
                     where rn > 1)

  

posted @ 2021-06-16 14:47  rjm123456  阅读(124)  评论(0编辑  收藏  举报