oracle相同记录取第一行

select

   zhuyh , mingxh , bianh , mingc

from (

         select

             t.zhuyh , t.mingxh , t.bianh,t.mingc,


             row_number() OVER(PARTITION BY  t.zhuyh ORDER BY t.zhuyh desc) as row_flg   

          from jzd t ) temp

where temp.row_flg  = '1'

原文地址:https://www.cnblogs.com/maweiwei/p/12664589.html