SELECT
oap.id AS application_id,
oap.assignee_id,
oap.sharer_id,
d.id AS decision_id,
d.number AS decision_number,
d.date AS decision_date,
d.accepted,
d.canceled,
d.rejected
FROM ourpension.ops_assignee_payment oap
LEFT JOIN back_office.ops_assignee_decision d
ON d.ops_assignee_payment_id = oap.id
WHERE oap.assignee_id = 13973809
ORDER BY d.date DESC, d.id DESC;