Adjustments by Type and by Client for a Period


Back to Query Directory


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
    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
    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



CategoryQueries
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki