Alexaydist by balance
Updated 2022-11-25Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
with voters as ( select voter, count(distinct tx_id) as votes, count(distinct vote_option) as Options
from osmosis.core.fact_governance_votes
where tx_status = 'SUCCEEDED'
and proposal_id in ('362')
group by 1)
select case when (balance/pow(10,decimal)) < 10 then '<10 OSMO'
when (balance/pow(10,decimal)) >= 10 and (balance/pow(10,decimal)) < 100 then '10-100 OSMO'
when (balance/pow(10,decimal)) >= 100 and (balance/pow(10,decimal)) < 1000 then '100 - 1k OSMO'
when (balance/pow(10,decimal)) >= 1000 and (balance/pow(10,decimal)) < 10000 then '1k - 10k OSMO'
else '>10k OSMO' end as type,
count(distinct address) as Users
from osmosis.core.fact_daily_balances
where currency = 'uosmo'
and date = (select max(date) from osmosis.core.fact_daily_balances)
and address in (select voter from voters)
group by 1
order by 2 desc
Run a query to Download Data