select
d.clientid,
SELECT client.commonname AS "Client",
c.claimtype AS "Claim Type",
c.reasontype AS "Claim Category",
c.reason AS "Claim Reason",
d.claimid AS "Claim ID",
d.disputeid AS "Dispute ID",
c.customercontactdate AS "Contact Date",
d.acquirernetwork AS "Network",
d.status AS "Dispute Status",
d.disputeamount AS "Dispute Amount",
toTo_date(cb.performedondatetime) AS "Chargeback Date",
cb.amount
from AS "Chargeback Amount",
FROM dispute asAS d
joinJOIN claim asAS c onON d.tenantid = c.tenantid andAND d.claimid = c.claimid
join tenant as tenant
on d.tenantid = tenant.tenantid
join client asJOIN client AS 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'
where
cb.performedondatetime is not null -- only disputes with chargebacks
where
WHERE d.tenantid = 'YOURTENANTIDHERE' AND AND chargebackdate=cb.performedondatetime = :daterange
|