SELECT `a`.*, `b`.`name` as `business_name`, `c`.`name` as `department_name`, `d`.`name` as `branch_name`, `e`.`name` as `company_name`, `f`.`parent_id` as `position_parent_id`, `f`.`position` as `position_name`, `g`.`position` as `position_parent`
FROM `user__employment_detail` `a`
LEFT JOIN `company__business_entity` `b` ON `b`.`id` = `a`.`business_entity_id`
LEFT JOIN `company__department` `c` ON `c`.`id` = `a`.`department_id`
LEFT JOIN `company__branch` `d` ON `d`.`id` = `c`.`branch_id`
LEFT JOIN `company` `e` ON `e`.`id` = `a`.`company_id`
LEFT JOIN `company__position` `f` ON `f`.`id` = `a`.`position_id`
LEFT JOIN `company__position` `g` ON `g`.`id` = `f`.`parent_id`
WHERE `a`.`user_id` = '23'
AND `a`.`status` =0