SELECT id, p.lastname, p.firstname, e.pay_amount
  FROM person p JOIN employee e USING (id)
 WHERE e.pay_type_code = 'H'
   AND e.pay_amount <
       (SELECT avg(pay_amount)
          FROM employee
         WHERE pay_type_code = 'H')
/
