• Just building on what you already have...

    SELECT Group, SUM(Received), SUM(Paid)

    FROM (

    SELECT a.ReceiverGroup AS Group, SUM(a.Value) as Received, 0 as Paid

    FROM Test a

    Group by a.ReceiverGroup

    UNION ALL

    SELECT b.PayerGroup as Group, 0 as Received, SUM(b.Value) as Paid

    FROM Test b

    Group by b.PayerGroup

    ) AS c

    GROUP BY Group

    Assuming SUM is the correct aggregation for Received and Paid

    -----------------
    ... Then again, I could be totally wrong! Check the answer.
    Check out posting guidelines here for faster more precise answers[/url].

    I believe in Codd
    ... and Thinknook is my Chamber of Understanding