binhachon114. [Easy] New Validators - Last 60 Days
Updated 2021-12-14
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
34
›
⌄
with new_validators as(
select
date_trunc('day', block_timestamp) as blocktime,
count(address) as number_of_new_validators
from
(
select
block_timestamp,
address,
row_number() over (
partition by address
order by
block_timestamp
) as rownumber
from
terra.validator_voting_power qualify rownumber = 1
)
where
block_timestamp > getdate() - interval '60 days'
group by
blocktime
)
select
blocktime,
number_of_new_validators,
sum(number_of_new_validators) over (
order by
blocktime
) as total_new_validators
from
new_validators
order by
blocktime desc
Run a query to Download Data