Oracle 查询

--查询某字段不重复数据并取出最新的
select * from (
select m.proposalno,m.operatedate,m.underwriteflag ,
row_number() over(partition by underwriteflag order by operatedate desc ) as row_flg
from prptmain m
) temp where temp.row_flg=1

 

posted @ 2018-08-02 11:22  wuyueping  阅读(115)  评论(0编辑  收藏  举报