Tested in build PGSQL (14300) and MSSQL (14306)
PGSQL & MSSQL:
SELECT AaaUser.FIRST_NAME "Technician Name",
aci.emailid "Email ID",
LONGTODATE(AaaUser.createdtime) "Technician Created Time",
SDUSER.STATUS "Status(Active/Inactive)" FROM AaaUser
left JOIN SDUser ON AaaUser.USER_ID=SDUser.USERID
inner JOIN HelpDeskCrew ON SDUser.USERID=HelpDeskCrew.TECHNICIANID
LEFT JOIN AaaLogin ON AaaUser.USER_ID=AaaLogin.USER_ID
LEFT JOIN Queue_Technician qt on qt.TECHNICIANID=AaaUser.USER_ID
LEFT JOIN QueueDefinition qd ON qt.QUEUEID=qd.QUEUEID
left join aaausercontactinfo auci on auci.user_id = SDUser.userid
left join aaacontactinfo aci on aci.contactinfo_id = auci.contactinfo_id
LEFT JOIN aaaaccount aaa on aaa.login_id=AaaLogin .login_id
WHERE (SDUser.STATUS = 'ACTIVE') group by AaaUser.FIRST_NAME, aci.emailid, sduser.status, AaaUser.createdtime
For builds greater than 10.6 please use below query:
SELECT AaaUser.FIRST_NAME "Technician Name",
aci.emailid "Email ID",
LONGTODATE(AaaUser.createdtime) "Technician Created Time",
SDUSER.STATUS "Status(Active/Inactive)" FROM AaaUser
left JOIN SDUser ON AaaUser.USER_ID=SDUser.USERID
inner JOIN portaltechnicians ON SDUser.USERID=portaltechnicians.userID
LEFT JOIN AaaLogin ON AaaUser.USER_ID=AaaLogin.USER_ID
LEFT JOIN Queue_Technician qt on qt.TECHNICIANID=AaaUser.USER_ID
LEFT JOIN QueueDefinition qd ON qt.QUEUEID=qd.QUEUEID
left join aaausercontactinfo auci on auci.user_id = SDUser.userid
left join aaacontactinfo aci on aci.contactinfo_id = auci.contactinfo_id
LEFT JOIN aaaaccount aaa on aaa.login_id=AaaLogin .login_id
WHERE (SDUser.STATUS = 'ACTIVE') group by AaaUser.FIRST_NAME, aci.emailid, sduser.status, AaaUser.createdtime