Abolfazl_771025total flow
    Updated 2022-11-15
    select
    'Stake' as "action",
    count(distinct tx_id) as "transaction count",
    count(distinct delegator) as "user count",
    count(distinct node_id) as "nodes count",
    sum (amount) as "total count (Flow)",
    avg (amount) as "Average volume (Flow)"
    from flow.core.ez_staking_actions
    where tx_succeeded = 'TRUE'
    and action in ('DelegatorTokensCommitted','TokensCommitted')
    group by 1
    union
    select
    'unStake' as "action",
    count(distinct tx_id) as "transaction count",
    count(distinct delegator) as "user count",
    count(distinct node_id) as "nodes count",
    sum (amount) as "total count (Flow)",
    avg (amount) as "Average volume (Flow)"
    from flow.core.ez_staking_actions
    where tx_succeeded = 'TRUE'
    and action in ('DelegatorUnstakedTokensWithdrawn','UnstakedTokensWithdrawn')
    group by 1
    union
    select
    'get reward' as "action",
    count(distinct tx_id) as "transaction count",
    count(distinct delegator) as "user count",
    count(distinct node_id) as "nodes count",
    sum (amount) as "total count (Flow)",
    avg (amount) as "Average volume (Flow)"
    from flow.core.ez_staking_actions
    where tx_succeeded = 'TRUE'
    and action in ('DelegatorRewardTokensWithdrawn','RewardTokensWithdrawn')
    group by 1
    Run a query to Download Data