mlhUntitled Query
Updated 2022-07-10Copy 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
32
33
34
35
36
›
⌄
with stake as
(with st as
(with del as
(select DELEGATOR_ADDRESS, sum(amount)/10e5 as del_vol
from osmosis.core.fact_staking
where currency='uosmo' and action='delegate'
group by 1
order by 1
),
undel as (
select DELEGATOR_ADDRESS, sum(amount)/10e5 as undel_vol
from osmosis.core.fact_staking
where currency='uosmo'
and action='undelegate'
group by 1
order by 1
)
select del.DELEGATOR_ADDRESS as staker,
undel_vol,
del_vol,
undel_vol-del_vol as bal
from del inner join undel on del.DELEGATOR_ADDRESS=undel.DELEGATOR_ADDRESS
)
select staker,
bal,
case when bal>0 then 'Positive Staking Balance'
else ' Zero Staking Balance'
end as st_bal
from st),
pool as (
with a as
(with inx as
Run a query to Download Data