SELECT max(TIMESTAMP), A.USERNAME FROM DBA_AUDIT_TRAIL A WHERE ACTION_NAME = 'LOGON' GROUP BY USERNAME ORDER BY 1 DESC;