SELECT b.user_name,
a.USER_CONCURRENT_PROGRAM_NAME,
a.Program,
ROUND (
( (a.actual_completion_date - a.actual_start_date)
* 24
* 60
* 60
/ 60),
2)
AS Process_time,
a.request_id,
TO_CHAR (a.request_date, 'DD-MON-YY HH24:MI:SS')
AS Request_Date,
TO_CHAR (a.actual_start_date, 'DD-MON-YY HH24:MI:SS')
AS Actual_Start_Date,
TO_CHAR (a.actual_completion_date, 'DD-MON-YY HH24:MI:SS')
AS Actual_Completion_Date,
ROUND ((a.actual_completion_date - a.request_date) * 24 * 60 * 60, 2)
AS end_to_end,
a.phase_code,
a.status_code,
a.argument_text,
a.completion_text
FROM apps.fnd_conc_req_summary_v a, apps.fnd_user b
WHERE a.requested_by = b.user_id
AND (a.ACTUAL_COMPLETION_DATE) BETWEEN '<start date>' AND '<end date>'
AND a.status_code = 'C'
AND ( ( is_sub_request = 'Y'
AND request_type = 'P'
AND request_id <> priority_request_id
AND EXISTS
(SELECT 1
FROM fnd_concurrent_requests fc
WHERE fc.request_id = a.priority_request_id
AND fc.parent_request_id != -1))
OR ( is_sub_request = 'N'
AND request_id = priority_request_id
AND parent_request_id != -1))
AND b.user_name NOT LIKE 'XX__%' ESCAPE '_'
ORDER BY request_id DESC;