JonasoFlow : user : stake
Updated 2024-09-08Copy Reference Fork
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
›
⌄
with
X as( select block_timestamp, delegator, tx_id from flow.gov.ez_staking_actions ),
A as(
select date_trunc('month',block_timestamp) as time, count(distinct delegator) as delegator
from X
where year(block_timestamp) = '2024'
group by 1),
B as(
select date_trunc('month',block_timestamp) as times, count(distinct delegator) as delegators
from (select delegator, min(block_timestamp) as block_timestamp from X group by 1)
where year(block_timestamp) = '2024'
group by 1)
select
time, delegator, delegators,
'active delegators' as A,
'new delegators' as B
from A as a
left join B as b on a.time = b.times
order by 1 desc
QueryRunArchived: QueryRun has been archived