ECC Receivables, Payment History, SQL2

Description
Columns: Ledger Currency Code, Ledger, Customer, Account Number, Receipt Number, Receipt Currency Code, Receipt Amount, Receipt Date, Application Date, Receipt Class ...
Imported from ECC
select * from (SELECT /*+ leading(rcpt_hist_v.process_t) full(rcpt_hist_v.process_t) */
rcpt_hist_v.OPERATING_UNIT,rcpt_hist_v.LEDGER_CURRENCY,rcpt_hist_v.LEDGER_CURRENCY_CODE,rcpt_hist_v.LEDGER,rcpt_hist_v.CUSTOMER,
rcpt_hist_v.ACCOUNT_NUMBER,rcpt_hist_v.RECEIPT_NUMBER,rcpt_hist_v.RECEIPT_CURRENCY,rcpt_hist_v.RECEIPT_CURRENCY_CODE,rcpt_hist_v.RECEIPT_AMOUNT,
rcpt_hist_v.RECEIPT_DATE,rcpt_hist_v.APPLICATION_DATE,rcpt_hist_v.RECEIPT_CLASS,rcpt_hist_v.RECEIPT_METHOD,rcpt_hist_v.RECEIPT_STATUS,rcpt_hist_v.RECEIPT_STATUS_CODE,
rcpt_hist_v.ACCOUNTED_AMOUNT,rcpt_hist_v.TRANSACTION_NUMBER,rcpt_hist_v.ORG_ID,rcpt_hist_v.CASH_RECEIPT_ID,rcpt_hist_v.ECC_SPEC_ID,rcpt_hist_v.ECC_LAST_UPDATE_DATE,
rcpt_hist_v.RECORD_TYPE,rcpt_hist_v.ATTRIBUTE_CATEGORY,rcpt_hist_v.ATTRIBUTE1,rcpt_hist_v.ATTRIBUTE2,rcpt_hist_v.ATTRIBUTE3,rcpt_hist_v.ATTRIBUTE4,rcpt_hist_v.ATTRIBUTE5,
rcpt_hist_v.ATTRIBUTE6,rcpt_hist_v.ATTRIBUTE7,rcpt_hist_v.ATTRIBUTE8,rcpt_hist_v.ATTRIBUTE9,rcpt_hist_v.ATTRIBUTE10,rcpt_hist_v.ATTRIBUTE11,rcpt_hist_v.ATTRIBUTE12,
rcpt_hist_v.ATTRIBUTE13,rcpt_hist_v.ATTRIBUTE14,rcpt_hist_v.ATTRIBUTE15,rcpt_hist_v.LANGUAGE
  FROM ar_ecc_receipt_history_v rcpt_hist_v where rcpt_hist_v.language in ('US'))
   PIVOT(max(OPERATING_UNIT) as OPERATING_UNIT, max(LEDGER_CURRENCY) as LEDGER_CURRENCY, max(RECEIPT_CURRENCY) as RECEIPT_CURRENCY,
   max(RECEIPT_STATUS) as RECEIPT_STATUS
   for LANGUAGE in ('US' "US"))