  select
    a.claimant_id,
    c.first_name,
    c.family_name,
    sum(a.amount) as total_paid_out
  from
    transaction a
    join
    claimant b
    on a.claimant_id = b.id
    join
    person c
    on b.person_id = c.id
  where
    a.actual_or_reserve = 'Actual' and
    a.payment_or_recovery = 'Payment'
  group by
    a.claimant_id,
    c.first_name,
    c.family_name
  order by
    total_paid_out desc;