afonsototal unstake
    Updated 2023-01-12
    select
    count(distinct (tx_hash)) as unstakes_count,
    count(distinct (tx_signer)) as unstakers_count,
    sum(coalesce(tx:actions[0]:FunctionCall:deposit/pow(10,24), 0)) total_volume_unstaked,
    avg(coalesce(tx:actions[0]:FunctionCall:deposit/pow(10,24), 0)) average_volume_unstaked
    from near.core.fact_actions_events_function_call a
    join near.core.fact_transactions b
    using(tx_hash)
    where method_name in ('withdraw_token', 'unstake_all', 'unstake')
    and year(a.block_timestamp) = 2022
    Run a query to Download Data