mehrancrypto-dxoepqQ78-2
Updated 2022-11-15
99
1
2
3
4
5
6
7
8
9
10
11
12
›
⌄
SELECT date_trunc('day' , BLOCK_TIMESTAMP) as weekly , sum(case
when ACTION like '%Stake%' THEN (STAKE_AMOUNT)
when ACTION like '%Unstake%' THEN -(STAKE_AMOUNT) end
) *power(10,-24) as volume ,
case
when weekly BETWEEN '2022-11-07' and '2022-11-13' then 'Week of 11/7 and 11/14'
when weekly <'2022-11-07' then 'Before'
else 'After' end as type
from near.core.dim_staking_actions
WHERE weekly > CURRENT_DATE -60
GROUP by 1 ,3
Run a query to Download Data