SELECT selectCondition
FROM `hs_hr_employee` AS e
LEFT JOIN `ohrm_subunit` AS cs
  ON e.work_station = cs.id
LEFT JOIN `ohrm_job_title` AS jt
  ON e.job_title_code = jt.id
WHERE e.joined_date IS NOT NULL
  AND whereCondition1
GROUP BY e.emp_number
;