Загрузка данных


SELECT
    o.id AS operation_id,
    ot.code AS operation_type_code,
    rd.id AS rops_decision_id,
    rd.rops_decisions_register_id,
    rd.sharer_id,
    t.id AS transaction_id,
    t.value AS transaction_value,
    da.id AS debit_account_id,
    dat.mnemonics AS debit_account_type,
    da.owner_sharer_id AS debit_owner_sharer_id,
    ca.id AS credit_account_id,
    cat.mnemonics AS credit_account_type,
    ca.owner_sharer_id AS credit_owner_sharer_id
FROM back_office.operation o
JOIN back_office.operation_type ot
    ON ot.id = o.operation_type_id
JOIN back_office.transaction_without_effective_date t
    ON t.operation_id = o.id
JOIN back_office.account da
    ON da.id = t.debit_account_id
JOIN back_office.account_type dat
    ON dat.id = da.account_type_id
JOIN back_office.account ca
    ON ca.id = t.credit_account_id
JOIN back_office.account_type cat
    ON cat.id = ca.account_type_id
LEFT JOIN back_office.rops_decisions rd
    ON rd.operation_id = o.id
WHERE o.id = 84319200
ORDER BY t.id;