select si.WORKSTATIONNAME AS "WORKSTATION NAME", ua.USERNAME,ua.DOMAINNAME,ua.FULLNAME,ua.DESCRIPTION,ua.STATUS,ua.LOCALACCOUNT,ua.SID, si.model AS "MODEL",si.servicetag AS "Service Tag",max(net.macaddress) "MAC ADDRESS",MAX(regionDef.REGIONNAME) AS "Region", MAX(deptDef.DEPTNAME) AS "Department", MAX(aaov.NAME) AS "Site", MAX(resLocation.LOCATION) AS "Location" from UsersAccountInfo ua full join SystemInfo si on si.WORKSTATIONID = ua.WORKSTATIONID left join networkinfo net on ua.WORKSTATIONID=net.WORKSTATIONID LEFT JOIN Resources resource ON si.WORKSTATIONID=resource.RESOURCEID LEFT JOIN ResourceOwner rOwner ON resource.RESOURCEID=rOwner.RESOURCEID LEFT JOIN DepartmentDefinition deptDef ON rOwner.DEPTID=deptDef.DEPTID LEFT JOIN ResourceLocation resLocation ON resource.RESOURCEID=resLocation.RESOURCEID LEFT JOIN RegionDefinition regionDef ON resLocation.REGIONID=regionDef.REGIONID LEFT JOIN SiteDefinition siteDef ON resLocation.SITEID=siteDef.SITEID LEFT JOIN SDOrganization aaov ON siteDef.SITEID=aaov.ORG_ID group by si.WORKSTATIONNAME,si.model,si.servicetag,ua.USERNAME,ua.DOMAINNAME,ua.FULLNAME,ua.DESCRIPTION,ua.STATUS,ua.LOCALACCOUNT,ua.SID order by 1