SELECT tt.company_name, tt.name, tt.prefecture, ta.action_datetime, tar.result_disp FROM ( SELECT * FROM tbl_actions t1 WHERE action_datetime = (SELECT MAX(action_datetime) FROM tbl_actions t2 WHERE t1.target_id = t2.target_id GROUP BY target_id) ) ta JOIN tbl_targets tt ON ta.target_id = tt.id JOIN tbl_mst_action_results tar ON ta.action_result_id = tar.id;