SELECT `a`.*, `b`.`type` as `reason`, `c`.`position` as `position_hiring`, `d`.`name` as `user_reporting_name`, `e`.`name` as `branch`, `g`.`name` as `personnel_area`, `f`.`name` as `personal_subarea`, `h`.`type` as `employee_group`, `i`.`type` as `contract_element`, `j`.`indicator` as `employee_subgroup_indicator`, `j`.`designation` as `employee_subgroup_designation`, `k`.`action_efective_date` as `action_efective_date`, `l`.`type` as `action_type_name`, `m`.`designation` as `designation`, `n`.`name` as `business_entity`
FROM `user__joining_group` `a`
LEFT JOIN `_ref__hiring_reason` `b` ON `b`.`id` = `a`.`reason_id`
LEFT JOIN `company__position` `c` ON `c`.`id` = `a`.`position_id`
LEFT JOIN `user` `d` ON `d`.`id` = `a`.`user_reporting_id`
LEFT JOIN `company__branch` `e` ON `e`.`id` = `a`.`branch_id`
LEFT JOIN `company__division` `f` ON `f`.`id` = `a`.`personal_subarea_id`
LEFT JOIN `company__department` `g` ON `g`.`id` = `a`.`personnel_area_id`
LEFT JOIN `_ref__employee_group` `h` ON `h`.`id` = `a`.`employee_group_id`
LEFT JOIN `_ref__employee_contract_type` `i` ON `i`.`id` = `a`.`contract_element_id`
LEFT JOIN `_ref__salary_scale` `j` ON `j`.`id` = `a`.`employee_subgroup_id`
LEFT JOIN `user__profiling` `k` ON `k`.`id` = `a`.`profiling_id`
LEFT JOIN `_ref__action_type` `l` ON `l`.`id` = `k`.`action_type_id`
LEFT JOIN `_ref__designation` `m` ON `m`.`id` = `a`.`position_information`
LEFT JOIN `company__business_entity` `n` ON `n`.`id` = `a`.`business_entity_id`
WHERE `k`.`user_id` = '64'
AND `a`.`is_delete` =0