분석 함수를 사용하면 어떨까요?
with t1 as
( select 1 num,'실패' result from dual union all
select 1 ,'실패' from dual union all
select 2 ,'성공' from dual union all
select 2 ,'성공' from dual union all
select 3 , '실패' from dual union all
select 3 , '실패' from dual)
select *
from (
select row_number() over(partition by num order by result) rn,
a.*
from t1 a
where result ='실패'
)
where rn=1;