Thursday, June 11, 2020

Query to Get AVG, MAX , MIN Time of Concurren program.

select
b.user_name username,
a.USER_CONCURRENT_PROGRAM_NAME  as PNAME,
avg(((nvl(ACTUAL_COMPLETION_DATE,sysdate)-a.REQUESTED_START_DATE)*24)*60) avg_Hrs_running, 
max(((nvl(ACTUAL_COMPLETION_DATE,sysdate)-a.REQUESTED_START_DATE)*24)*60) Max_Hrs_running,
min((nvl(ACTUAL_COMPLETION_DATE,sysdate)-a.REQUESTED_START_DATE)*24) Min_Hrs_running
from
apps.fnd_conc_req_summary_v a,
apps.fnd_user  b
where
phase_code = 'C' and status_code = 'C' and
a.REQUESTED_START_DATE > sysdate-30 and
upper(a.USER_CONCURRENT_PROGRAM_NAME) like upper('concurrent program name%') and
a.REQUESTED_BY=b.user_id
and a.description is null
group by b.user_name,a.USER_CONCURRENT_PROGRAM_NAME;

No comments:

Post a Comment