0-MIDweekly volume by new stakers
Updated 2024-12-28
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
›
⌄
with tab1 as (
select date_trunc('minute',BLOCK_TIMESTAMP) as time
,AMOUNT/1e6 as vol
,DELEGATOR_ADDRESS
from axelar.gov.fact_staking
where BLOCK_TIMESTAMP::date>='2024-01-01'and BLOCK_TIMESTAMP::date<='2024-03-31'
and ACTION='delegate'
and TX_SUCCEEDED='true'
),
tab2 as (
select date_trunc('week',time) as week
,DELEGATOR_ADDRESS
,vol
,row_number()over(partition by DELEGATOR_ADDRESS order by week) as time_row
from tab1
)
select week
,sum(vol) as volume
,sum(volume)over(order by week) as total_volume
from tab2
where time_row=1
group by 1
QueryRunArchived: QueryRun has been archived