Elprognerd10 - staking net volume
    Updated 2023-04-12
    SELECT
    date_trunc('day', block_timestamp) as day,
    sum(case WHEN action = 'Stake' then stake_amount/pow(10, 24) else -1*stake_amount/pow(10, 24) end) as "Total Daily Net Volume"
    FROM near.core.dim_staking_actions
    WHERE action in ('Stake', 'Unstake') and block_timestamp BETWEEN '{{From}}' and DATEADD(DAY, 7, '{{From}}')
    group by 1
    order by 1
    Run a query to Download Data