SELECT DISTINCT count(*)
FROM apps.fnd_user fu,
apps.fnd_responsibility fr,
apps.icx_sessions ic
WHERE fu.user_id = ic.user_id
AND fr.responsibility_id = ic.responsibility_id
AND ic.disabled_flag ='N'
and IC.RESPONSIBILITY_ID is not null
AND ic.last_connect > sysdate - (ic.time_out/60)/96;
FROM apps.fnd_user fu,
apps.fnd_responsibility fr,
apps.icx_sessions ic
WHERE fu.user_id = ic.user_id
AND fr.responsibility_id = ic.responsibility_id
AND ic.disabled_flag ='N'
and IC.RESPONSIBILITY_ID is not null
AND ic.last_connect > sysdate - (ic.time_out/60)/96;