select
sum (amount) as FLOW,
count (distinct tx_id) as TRXS,
delegator,
case when action in ('DelegatorTokensCommitted','TokensCommitted') then 'Stake'
end as TYPE
from flow.core.ez_staking_actions
where tx_succeeded = 'TRUE' AND TYPE IS NOT NULL
group by TYPE , delegator
order by 2 desc limit 10