SELECT `a`.*, `b`.`action_efective_date`, `c`.`type` as `action_type`
FROM `user__third_party_payment` `a`
LEFT JOIN `user__profiling` `b` ON `b`.`id` = `a`.`profiling_id`
LEFT JOIN `_ref__action_type` `c` ON `c`.`id` = `b`.`action_type_id`
WHERE `a`.`user_id` = '64'
AND `a`.`is_delete` =0
AND a.profiling_id IN (SELECT MAX(a.profiling_id)
FROM `user__third_party_payment` `a`
WHERE `a`.`user_id` = '64'
AND `a`.`is_delete` =0)