oracle 查询最新时间的数据

SELECT t.id
FROM t_staff t
left join (select *
from (select b.*,
(row_number()
over (partition by STAFF_ID order by CREATED_AT desc)) px
from R_STAFF_PLAN b) e
where px = 1) rsp on t.id = rsp.STAFF_ID
posted @ 2020-12-24 10:20  微风微风  阅读(3408)  评论(0编辑  收藏  举报