Alexayby action
    Updated 2022-11-15
    select case when action in ('DelegatorTokensCommitted','TokensCommitted') then 'Stake'
    when action in ('DelegatorUnstakedTokensWithdrawn','UnstakedTokensWithdrawn') then 'Unstake'
    when action in ('DelegatorRewardTokensWithdrawn','RewardTokensWithdrawn') then 'Claim Reward' end as type,
    count(distinct tx_id) as txns, count(distinct delegator) as delegators,
    sum(amount) as sum_vol, avg(amount) as avg_vol, median(amount) as median_vol,
    min(amount) as min_Vol, max(amount) as max_vol
    from flow.core.ez_staking_actions
    where tx_succeeded = 'TRUE'
    group by 1
    order by 2 desc
    Run a query to Download Data