b1nary0mega
10/15/2014 - 1:06 PM

Provide a count of non productive time codes by unit for all Highland Hospital units

Provide a count of non productive time codes by unit for all Highland Hospital units

SELECT unit_id,
  COUNT(np_time_code) as NP_COUNT
FROM Unit_Np_Time
WHERE unit_id IN
  ( SELECT DISTINCT unit_id 
    FROM Unit_Spec 
    WHERE Unit_Spec.Facility_Id = 'HH'
  )
GROUP BY unit_id
ORDER BY NP_COUNT ASC, UNIT_ID;