SELECT `a`.*, `b`.`id` as `attachment_id`, `b`.`attachment_name`, `b`.`location`, `b`.`file_type`, `b`.`file_ext`, `b`.`mask_id`, `c`.`action_efective_date`, `d`.`type` as `action_type`
FROM `user__profesional_membership` `a`
LEFT JOIN `user__profesional_membership_attachment` `b` ON `b`.`professional_membership_id` = `a`.`id` and `b`.`is_delete` = 0
LEFT JOIN `user__profiling` `c` ON `c`.`id` = `a`.`profiling_id`
LEFT JOIN `_ref__action_type` `d` ON `d`.`id` = `c`.`action_type_id`
WHERE `a`.`user_id` = '128'
AND `a`.`is_delete` =0