Version : 11027
DB : PGSQL
OUTPUT:
Select au.FIRST_NAME "Employee Name" ,
SDUSER.employeeid "Employee ID",
SDUSER.Userid "User ID",
SDUSER.jobtitle "Job Title",
ar.NAME "Role",
al.name "Login Name",
qdef.queuename "Associate Group",
SDUSER.STATUS "Status(Active/Inactive)" from PortalTechnicians pu
left join AaaUser au on pu.userid=au.USER_ID
left JOIN SDUser ON au.USER_ID=SDUser.USERID
left join queue_technician qtech on pu.userid=qtech.technicianid
left join queuedefinition qdef on qtech.queueid=qdef.queueid
left join aaausercontactinfo auci on auci.user_id = SDUser.userid
left join aaacontactinfo aci on aci.contactinfo_id = auci.contactinfo_id
left join AaaLogin al on au.USER_ID=al.USER_ID
left join AaaAccount aa on al.LOGIN_ID=aa.LOGIN_ID
LEFT JOIN AaaAccSession ON aa.ACCOUNT_ID = AaaAccSession.ACCOUNT_ID
left join sdAuthorizedRole aar on aa.ACCOUNT_ID=aar.ACCOUNT_ID
left join AaaRole ar on aar.ROLE_ID=ar.ROLE_ID
LEFT JOIN AaaRoleToCategory ON ar.ROLE_ID=AaaRoleToCategory.ROLE_ID
where (AaaRoleToCategory.ROLE_ID IS NULL) and (SDUser.STATUS = 'ACTIVE')
group by au.first_name,ar.name,al.name,aci.emailid,sduser.status,SDUSER.employeeid,SDUSER.Userid,qdef.queuename