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

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.