SELECT `a`.`id` as `userID`, `a`.`name`, `a`.`staff_id` as `staffID`, `a`.`department_id` as `deptId`, `b`.*, `c`.`email`
FROM `user__employment_detail` `a`
LEFT OUTER JOIN `view__count_job_by_user` `b` ON `b`.`staff_id` = `a`.`user_id`
LEFT JOIN `user` `c` ON `c`.`id` = `a`.`user_id`
WHERE `a`.`is_delete` = 0
AND a.department_id IN((select id from company__department where name = "Advisory and Corporate Finance"))
ORDER BY `c`.`name` ASC