SELECT `a`.*, `b`.`name`, `c`.`action_efective_date`, `d`.`type` as `action_type`, `e`.`id` as `attachment_id`, `e`.`attachment_name`, `e`.`location`, `e`.`file_type`, `e`.`file_ext`, `e`.`mask_id`
FROM `user__bank_detail` `a`
JOIN `_ref__bank` `b` ON `b`.`id` = `a`.`bank_id`
LEFT JOIN `user__profiling` `c` ON `c`.`id` = `a`.`profiling_id`
LEFT JOIN `_ref__action_type` `d` ON `d`.`id` = `c`.`action_type_id`
LEFT JOIN `user__bank_detail_attachment` `e` ON `e`.`bank_detail_id` = `a`.`id` and `e`.`is_delete` = 0
WHERE `a`.`user_id` = '3'
AND `a`.`is_delete` =0