Need to perform YTD calculation over ap_checks_all for report
Summary:
Hi Forum:
my customer would like to insert a YTD column right after Payment_Amount (SQL is over ap_checks_all) but there is no seeded YTD in ap_checks_all table.
Content (required):
Code snippet contains the DM SQL
Version (include the version you are using, if applicable):
23A
Code Snippet (add any code snippets that support your topic, if applicable):
/* Regulatory Spend DM - MAIN */
select psv.VENDOR_NAME Description,
psv.segment1 as "Address Number",
sum(decode(aca.STATUS_LOOKUP_CODE,'VOIDED',(aca.amount*-1),aca.amount)) as "Payment Amount",
aca.STATUS_LOOKUP_CODE,
PII.income_tax_id as "Individual Tax ID",
0