SELECT AaaUser.USER_ID,
AaaUser.FIRST_NAME "FullName",
AaaLogin.NAME "LoginName",
AaaLogin.DOMAINNAME "Domain",
AaaContactInfo.EMAILID "Email",
DepartmentDefinition.DEPTNAME "Department",
SDOrganization.NAME "Site",
AaaContactInfo.LANDLINE "Phone",
AaaContactInfo.MOBILE "Mobile" FROM AaaUser
LEFT JOIN UserDepartment ON AaaUser.USER_ID=UserDepartment.USERID
LEFT JOIN AaaUserContactInfo ON AaaUser.USER_ID=AaaUserContactInfo.USER_ID
LEFT JOIN AaaContactInfo ON AaaUserContactInfo.CONTACTINFO_ID=AaaContactInfo.CONTACTINFO_ID
LEFT JOIN DepartmentDefinition ON UserDepartment.DEPTID=DepartmentDefinition.DEPTID
LEFT JOIN SiteDefinition ON DepartmentDefinition.SITEID=SiteDefinition.SITEID
LEFT JOIN SDOrganization ON SiteDefinition.SITEID=SDOrganization.ORG_ID
INNER 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
WHERE (SDUser.STATUS = 'ACTIVE')
Below report returns the complete details of all requesters.
SELECT AaaUser.USER_ID,
AaaUser.FIRST_NAME "FullName",
AaaLogin.NAME "LoginName",
AaaLogin.DOMAINNAME "Domain",
AaaContactInfo.EMAILID "Email",
DepartmentDefinition.DEPTNAME "Department",
SDOrganization.NAME "Site",
AaaContactInfo.LANDLINE "Phone",
SDUser.JOBTITLE "JobTitle",
AaaContactInfo.MOBILE "Mobile" FROM AaaUser
LEFT JOIN UserDepartment ON AaaUser.USER_ID=UserDepartment.USERID
LEFT JOIN AaaUserContactInfo ON AaaUser.USER_ID=AaaUserContactInfo.USER_ID
LEFT JOIN AaaContactInfo ON AaaUserContactInfo.CONTACTINFO_ID=AaaContactInfo.CONTACTINFO_ID
LEFT JOIN DepartmentDefinition ON UserDepartment.DEPTID=DepartmentDefinition.DEPTID
LEFT JOIN SiteDefinition ON DepartmentDefinition.SITEID=SiteDefinition.SITEID
LEFT JOIN SDOrganization ON SiteDefinition.SITEID=SDOrganization.ORG_ID
INNER JOIN SDUser ON AaaUser.USER_ID=SDUser.USERID
LEFT JOIN HelpDeskCrew ON SDUser.USERID=HelpDeskCrew.TECHNICIANID
LEFT JOIN AaaLogin ON AaaUser.USER_ID=AaaLogin.USER_ID
WHERE ((HelpDeskCrew.TECHNICIANID IS NULL)
AND (SDUser.STATUS = 'ACTIVE'))