select
    claimant_id,
    to_char(created_at, 'YYYY-MM') as payment_month,
    sum(amount) as total_paid_out
from
    transaction
where
    actual_or_reserve = 'Actual' and
    payment_or_recovery = 'Payment'
group by
    claimant_id,
    payment_month
order by
    claimant_id,
    payment_month;