--其中policyno为可能有多条重复的id字段,date是时间字段
select *
from (select t.*,
row_number() over(partition by t.policyno order by t.date desc) rn
from tmp_lst_fcbf t) c
where rn = 1;
Oracle相同ID有多条记录取时间最近的一条
最新推荐文章于 2024-03-02 22:58:51 发布