SELECT p.DEPT AS DEPT,
d.COMMON_NAME AS NAME,
d.SERVICE AS SERVICE,
p.UNIT_ID AS UNIT_ID,
p.EMPLOYEE_ID AS EMPLOYEE_ID,
p.LAST_NAME AS LAST_NAME,
p.FIRST_NAME AS FIRST_NAME,
p.POS_CODE AS POS_CODE,
p.TITLE AS TITLE,
P.MIN_WKLY_HRS/40 AS FTE,
E.CERTIFICATION AS CERTIFICATION,
E.CERT_TITLE AS CERT_TITLE,
E.EXP_DATE AS EXPIRATION,
E.FACILITY
FROM MAGNET_PROFILES_HH P
LEFT JOIN MAGNET_DIF_UNITS_HH D
ON D.HRMS_DEPT = P.DEPT
LEFT JOIN IER_CERTIFICATIONS E
ON E.EMPLOYEE_ID = P.EMPLOYEE_ID
AND E.EXP_DATE >= '01-JAN-14'
AND E.FACILITY = 'HH'
ORDER BY E.FACILITY,
E.CERTIFICATION,
E.CERT_TITLE,
E.CERT_BODY,
P.POS_CODE,
P.LAST_NAME,
P.FIRST_NAME;