Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- transaction_history.account_id,
- transaction_history.amount,
- transaction_history.amount_national,
- transaction_history.budget_code,
- transaction_history.currency,
- transaction_history.is_deleted,
- transaction_history.document_number,
- transaction_history.external_id,
- transaction_history.history_date,
- transaction_history.id,
- transaction_history.is_credit,
- ppc.name payment_purpose_code_name,
- ppc.code payment_purpose_code,
- transaction_history.operation_type,
- transaction_history.order_payer,
- transaction_history.order_receiver,
- transaction_history.payer,
- transaction_history.payer_account,
- transaction_history.payer_bank,
- transaction_history.payer_bank_bik,
- transaction_history.payer_bank_place,
- transaction_history.payer_bank_place_type,
- transaction_history.payer_bank_type,
- transaction_history.payer_bin,
- transaction_history.payer_corr_account,
- transaction_history.payer_property_type,
- transaction_history.payer_residency_code,
- transaction_history.payment_purpose,
- transaction_history.payment_purpose_code_id,
- transaction_history.receiver,
- transaction_history.receiver_account,
- transaction_history.receiver_account_bik,
- transaction_history.receiver_bank,
- transaction_history.receiver_bank_place,
- transaction_history.receiver_bank_place_type,
- transaction_history.receiver_bank_type,
- transaction_history.receiver_bin,
- transaction_history.receiver_corr_account,
- transaction_history.receiver_property_type,
- transaction_history.receiver_residency_code,
- transaction_history.value_date,
- accounts.account_number
- FROM
- transaction_history
- INNER JOIN accounts ON accounts.id = transaction_history.account_id
- LEFT JOIN payment_purpose_code ppc ON ppc.id = transaction_history.payment_purpose_code_id
- WHERE
- (
- transaction_history.is_deleted = : 1
- )
- AND (
- transaction_history.account_id = : 2
- )
- AND (
- transaction_history.history_date BETWEEN TO_DATE (: 3, 'YYYY.MM.DD')
- AND TO_DATE (: 4, 'YYYY.MM.DD')
- )
- ORDER BY
- history_date DESC,
- transaction_history.id DESC OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement