SpiltadavidNear: Volume of Stakes & Unstakes
Updated 2022-11-15Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
›
⌄
with near_staking as (select count(*) as ncount ,count(distinct tx_signer) as nusers ,
sum(STAKE_AMOUNT/1e24) as namount , action as naction , trunc(block_timestamp, 'DAY') as ndate
from near.core.dim_staking_actions
where ndate >= '2022-11-04'
group by naction ,ndate )
, solana_staking as (select count(*) as scount ,count(distinct ADDRESS) as susers ,
sum(AMOUNT/1e9) as samount , case
when action like '%deposit%' then 'Stake'
when action like '%withdraw%' then 'Unstake'
end as saction , trunc(block_timestamp, 'DAY') as sdate
from solana.core.fact_stake_pool_actions
where sdate >= '2022-11-04' and (action like '%deposit%' or action like '%withdraw%')
group by saction ,sdate)
select sum(ncount) , sum(nusers) , sum(namount) , naction from near_staking group by naction
Run a query to Download Data