select r.orgrolename "orgrolename",
r.description "Description",
au.FIRST_NAME "Name",
DepartmentDefinition.DEPTNAME "Department",
SDOrganization.NAME "Site" from aaauser au
left join (select roleid,userid From roletousermapping rm group by roleid,userid) rm on au.user_id = rm.userid
left join orgroles r on rm.roleid = r.orgroleid
LEFT JOIN UserDepartment ON au.USER_ID=UserDepartment.USERID
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
where r.orgrolename is not null
order by 1,2