select
x.session_id,
x.patches,
x.phase,
x.phase_name,
x.product,
x.job_name,
x.arguments,
x.worker_id,
xxen_util.client_time(x.start_time) start_time,
xxen_util.client_time(x.end_time) end_time,
xxen_util.time(x.elapsed_time*86400) elapsed_time,
x.elapsed_time*1440 elapsed_minutes,
x.session_percentage,
xxen_util.zero_to_null(x.restart_count) restarts,
xxen_util.zero_to_null(x.defer_count) deferrals,
x.program,
x.command,
x.subdirectory
from
(
select
att.*,
ratio_to_report(att.elapsed_time) over (partition by att.session_id)*100 session_percentage,
aprd.patches
from
ad_task_timing att,
(
select
apr.session_id,
listagg(apd.driver_file_name,', ') within group (order by apd.driver_file_name) patches
from
ad_patch_runs apr,
ad_patch_drivers apd
where
apr.patch_driver_id=apd.patch_driver_id
group by
apr.session_id
) aprd
where
1=1 and
att.session_id=aprd.session_id(+)
) x
where
2=2
order by
x.session_id desc,
x.elapsed_time desc nulls last |