SELECT `a`.*, `c`.`name`, `c`.`department_id`, `d`.`name` as `department`, `e`.`name` as `branch`
FROM `user__role` `a`
LEFT JOIN `user__employment_detail` `c` ON `c`.`user_id` = `a`.`user_ID`
LEFT JOIN `company__department` `d` ON `d`.`id` = `c`.`department_id`
LEFT JOIN `company__branch` `e` ON `e`.`id` = `d`.`branch_id`
WHERE `a`.`is_delete` = 0
AND `a`.`role` = 'ADMIN'
AND `c`.`department_id` > 0