oracle 重复数据查重删除
select id
from (select row_number() over(partition by self_object_id order by self_object_id) record_line,
si.*
from sample_info si
where self_object_id in
(select self_object_id
from (select sample_info.self_object_id,
count(sample_info.self_object_id)
from sample_info
where sample_info.delete_flag = 0
and sample_info.sample_lab_no is null
group by sample_info.self_object_id
having count(sample_info.self_object_id) > 1)))
where record_line > 1