Site icon SOS Resources

Adjustments by Type and by Client for a Period

I want a detailed or summary report of adjustments for a particular date range, grouped by type and then by client.

 

The detailed query would be:

SELECT
    adjcode, fullnameid, trandate, payorname, amount
FROM
    sos.rv_credits
WHERE
    credtype = 'Adjustment'
    AND trandate BETWEEN '2000-01-01' AND '2008-07-31'
ORDER BY
    adjcode, fullnameid, trandate

 

and the summary query would be:

SELECT
    adjcode, fullnameid, payorname, SUM(amount)
FROM
    sos.rv_credits
WHERE
    credtype = 'Adjustment'
    AND trandate BETWEEN '2000-01-01' AND '2008-07-31'
GROUP BY
    adjcode, fullnameid, payorname
ORDER BY
    adjcode, fullnameid, payorname

 

 

 

Exit mobile version