MorphMorph

Daily Dispute Volume

Description:Provides total count of disputes by day, Claim Type, and Claim Category.
Sources:Disputes

It is important that you always include tenantID in your WHERE clause.  Not doing so will result in poor performance.  

WHERE tenantid = 'YOURTENANTIDHERE'

SQL

SELECT
    to_date(createdate) AS "Create Date",
    type AS "Claim Type",
    category AS "Claim Category",
    count(*) as "Disputes"
FROM
    disputes AS d
WHERE
    tenantid='YOURTENANTIDHERE'
    AND createdate=:daterange
GROUP BY
    "Create Date", type, category
ORDER BY
    "Create Date" DESC, type DESC, category DESC