0-MIDweekly 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
›
⌄
with tab1 as (
select date_trunc('minute',BLOCK_TIMESTAMP) as time
--,sum(AMOUNT/1e6) as volume
,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
,row_number()over(partition by DELEGATOR_ADDRESS order by week) as time_row
from tab1
)
select week
,count(DELEGATOR_ADDRESS) as new_stakers
,sum(new_stakers)over(order by week) as total_new_stakers
from tab2
where time_row=1
group by 1
QueryRunArchived: QueryRun has been archived