How many users per application in Backend
select application_name, count(user_name)
from
(SELECT fu.user_name,
application_name,
count(application_name)
FROM fnd_responsibility_tl t,
fnd_responsibility b,
fnd_application_tl fn,
fnd_user fu,
wf_all_user_roles wur,
per_all_assignments_f asg
WHERE b.responsibility_id = t.responsibility_id
AND asg.person_id = fu.employee_id
AND b.application_id = t.application_id
AND b.application_id = fn.application_id
AND t.LANGUAGE = 'US'
--AND fu.end_date IS NULL
--AND wur.expiration_date IS NULL
AND fn.LANGUAGE = 'US'
AND b.end_date IS NULL
AND fu.user_name = wur.user_name
AND wur.role_orig_system_id = t.responsibility_id
AND wur.role_orig_system = 'FND_RESP'
AND sysdate between wur.START_DATE and NVL (wur.expiration_date, SYSDATE )
and sysdate between fu.START_DATE and nvl(fu.end_date,sysdate)
group by application_name, fu.user_name)
group by application_name;
select application_name, count(user_name)
from
(SELECT fu.user_name,
application_name,
count(application_name)
FROM fnd_responsibility_tl t,
fnd_responsibility b,
fnd_application_tl fn,
fnd_user fu,
wf_all_user_roles wur,
per_all_assignments_f asg
WHERE b.responsibility_id = t.responsibility_id
AND asg.person_id = fu.employee_id
AND b.application_id = t.application_id
AND b.application_id = fn.application_id
AND t.LANGUAGE = 'US'
--AND fu.end_date IS NULL
--AND wur.expiration_date IS NULL
AND fn.LANGUAGE = 'US'
AND b.end_date IS NULL
AND fu.user_name = wur.user_name
AND wur.role_orig_system_id = t.responsibility_id
AND wur.role_orig_system = 'FND_RESP'
AND sysdate between wur.START_DATE and NVL (wur.expiration_date, SYSDATE )
and sysdate between fu.START_DATE and nvl(fu.end_date,sysdate)
group by application_name, fu.user_name)
group by application_name;