oracle over partition by

select * from (select b.ID, b.Version,row_number() over(partition by OSCAR_CASE_ID order by VERSION desc) rn from TD_ADVERSE_EVENT b where b.status = 2)
where rn=1

你可能感兴趣的:(oracle)