saber-jlTop 10 validators with most staked amount
Updated 2022-11-02
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
with delegate as (select VALIDATOR_ADDRESS, sum(amount/pow(10,6)) as delegate
from osmosis.core.fact_staking
where TX_STATUS = 'SUCCEEDED'
and action = 'delegate'
and currency = 'uosmo'
group by 1
order by 2),
undelegate as (select VALIDATOR_ADDRESS, sum(amount/pow(10,6)) as undelegate
from osmosis.core.fact_staking
where TX_STATUS = 'SUCCEEDED'
and action = 'undelegate'
and currency = 'uosmo'
group by 1
order by 2)
select d.VALIDATOR_ADDRESS, sum(delegate - undelegate) as total, rank() over (ORDER by total desc) as rank
from delegate d
join undelegate u
on d.VALIDATOR_ADDRESS = u.VALIDATOR_ADDRESS
group by 1
order by 2 desc
limit 10
Run a query to Download Data