Query to find the last logged time of a contact in the portal

Query to find the last logged time of a contact in the portal

select aas.session_id "SessionID", aal.name "User Name",aau.FIRST_NAME "Contact Name",org.NAME "Account Name", parentorg.NAME "Parent Account Name",suborg.name "Sub Account", aas.user_host "User Host", aas.application_host "Application Host", longtodate(aas.opentime) "Start Time", longtodate(aas.closetime) "End Time", aas.status "Status" from AaaAccSession aas left join aaalogin aal on aas.account_id=aal.login_id left join sduser sd on aal.user_id=sd.userid left join departmentuser depu on sd.userid=depu.userid left join aaauser aau on depu.userid=aau.user_id LEFT JOIN Customer_Requester custreq ON sd.USERID=custreq.REQUESTER_ID LEFT JOIN Customer cust ON custreq.CUSTOMER_ID=cust.CUSTOMER_ID LEFT JOIN AaaOrganization org ON cust.CUSTOMER_ID=org.ORG_ID LEFT JOIN SUBACCOUNT sab ON custreq.CUSTOMER_ID=sab.subaccountid LEFT JOIN AaaOrganization suborg ON sab.subaccountid=suborg.ORG_ID LEFT JOIN SUBACCOUNT sab2 ON custreq.CUSTOMER_ID=sab2.parentaccountid LEFT JOIN AaaOrganization parentorg ON sab.parentaccountid=parentorg.ORG_ID where (depu.USERTYPE = 'Contact') group by aas.session_id
      • Related Articles

      • Login Frequency Query Report

        The below report would help us find the last logged in time of the users in SCP 11.0 SELECT AaaUser.FIRST_NAME "Technician",        MAX(AaaLogin.NAME) "LoginName",        MAX(AaaContactInfo.EMAILID) "Email",        MAX(AaaAccSession.USER_HOST) "IP ...
      • List of contacts logged into the system

        Mysql select aas.session_id "SessionID", aal.name "User Name",aau.FIRST_NAME "Contact Name",org.NAME "Account Name", aas.user_host "User Host", aas.application_host "Application Host", longtodate(aas.opentime) "Start Time", longtodate(aas.closetime) ...
      • Last logged in time of SupportReps

        select max(au.first_name)'Technician',al.name"Login Name", longtodate(max(acs.opentime))"Last Logged in Time" from aaaaccsession acs left join aaaaccount act on act.account_id=acs.account_id left join aaalogin al on al.login_id=act.login_id left join ...
      • To find the details about number of users logged in to the application and other related informations

        In order to find the details about the list of users logging time to host, their logout time and current status of their connections. Please use the below query, select aas.session_id "SessionID", aal.name "User Name", aas.user_host "User Host", ...
      • Support rep last login time, start time, end time along with personal information

        select aas.session_id "SessionID", aal.name "User Name",longtodate(aaauser.createdtime) as "User Created Time", aaacontactinfo.emailid "Email", aaacontactinfo.landline "Phone",aaacontactinfo.mobile "Mobile", aas.user_host "User Host", ...