Query to get list of EBS users with responsibility and last login date (responsibility wise)


Script:

SELECT
    usr.user_name,
    rsp.responsibility_name,
    MAX(ful.start_time) "LAST_CONNECT"
FROM
    apps.icx_sessions ses,
    apps.fnd_user usr,
    apps.fnd_logins ful,
    apps.fnd_responsibility_tl rsp
WHERE
     ses.login_id (+) = ful.login_id
    AND
        ses.responsibility_id = rsp.responsibility_id (+)
    AND
        ses.responsibility_application_id = rsp.application_id (+)
    AND
        usr.user_id = ful.user_id
 and rsp.responsibility_name is not null
GROUP BY
    usr.user_name,
    rsp.responsibility_name
ORDER BY
    usr.user_name,
    rsp.responsibility_name,
    last_connect