/* Login Trail */
SELECT DECODE( lt.ENUM_EVENT, 
	   		   1,  'LIMG_LOGON_SUCCESS',
			   -1, 'LIMG_LOGON_FAIL',
			   0,  'LIMG_LOGOFF',
			   2,  'LIMG_SESSION_EXPIRE') AS event_icon,
	   lt.USER_NAME,
	   usr.USER_ID,
	   usr.FULL_NAME,
	   lt.CLIENT_IP,
	   app.APP_ID,
	   app.APPLICATION_NAME,
	   lt.STAMP,
	   lt.COMMENTS
  FROM LOGIN_TRAIL lt,
  	   APPLICATIONS app,
	   USERS usr
 WHERE lt.APP_ID = app.APP_ID (+)
   AND lt.USER_NAME = usr.USER_NAME (+)
ORDER BY lt.STAMP DESC	   