selectSELECT
client.commonname asAS "Client",
c.claimtype asAS "Claim Type",
c.reasontype asAS "Claim Category",
c.reason asAS "Claim Reason",
d.claimid asAS "Claim ID",
d.disputeid asAS "Dispute ID",
c.customercontactdate asAS "Contact Date",
d.acquirernetwork asAS "Network",
d.status asAS "Dispute Status",
d.disputeamount asAS "Dispute Amount",
toTo_date(cb.performedondatetime) asAS "Chargeback Date",
cb.amount asAS "Chargeback Amount",
toTo_date(rp.performedondatetime) asAS "Representment Date",
rp.amountasamount AS "Representment Amount"
fromFROM dispute asAS d
joinJOIN claim asAS c onON d.tenantid = c.tenantid andAND d.claimid = c.claimid
joinJOIN client asAS client onON d.tenantid = client.tenantid andAND d.clientid = client.clientid
joinJOIN recoveryaction asAS cb onON d.tenantid = cb.tenantid andAND d.disputeid = cb.disputeid andAND cb.actionname inIN ( 'Dispute Submitted', 'Rapid Dispute Resolution' ) andAND cb.cycle = '1'
joinJOIN recoveryaction asAS rp onON d.tenantid = rp.tenantid andAND d.disputeid = rp.disputeid andAND rp.actionname inIN ( 'Inbound Pre-Compliance Received', 'Dispute Declined', 'Pre-Arbitration Received', 'Dispute Accepted - Partial' )
where
cb.performedondatetime is not null -- only disputes with chargebacks
where
WHERE d.tenantid = 'YOURTENANTIDHERE' AND AND chargebackdate=rp.performedondatetime = :daterange
|