ありがとうブルーフィート。あなたの答えは正しかったし、私が思いついた解決策よりも速かった.
--bluefeet のやり方、2 秒
select *
from
(select
j.wip_entity_id
,m.transaction_date
,m.to_operation_seq_num
,row_number() over(partition by j.wip_entity_id order by m.transaction_date desc) rn
from wip_discrete_jobs_v j
inner join wip_move_transactions_v m
on j.wip_entity_id = m.wip_entity_id
and j.organization_id = m.organization_id
and j.status_type in (3,6)
) d
where 1=1
and rn = 1
and to_operation_seq_num = 30
order by d.wip_entity_id desc;
-- ところで、53 秒
select
j.wip_entity_id
,m.transaction_date
,m.to_operation_seq_num
from wip_discrete_jobs_v j, wip_move_transactions_v m
where 1=1
and j.status_type in (3,6)
and m.wip_entity_id = j.wip_entity_id
and m.to_operation_seq_num = 30
and m.organization_id = j.organization_id
and m.transaction_id = (select max(transaction_id) from WIP_MOVE_TRANSACTIONS_v where wip_entity_id = j.wip_entity_id)
order by j.wip_entity_id desc;