Elprognerd9 - daily staking
    Updated 2023-04-12
    SELECT
    date_trunc('day', block_timestamp) as day,
    action,
    count(distinct tx_hash) as "Number of Daily TXs",
    count(distinct tx_signer) as "Number of Daily Users",
    --count(distinct POOL_ADDRESS) as "Total Number of Pools",
    sum(stake_amount/pow(10, 24)) as "Total Daily 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,2
    order by 1
    Run a query to Download Data