superflyNumber of voters which had 1-12 votes
Updated 2022-11-24Copy 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 as v, count(*) as c from osmosis.core.fact_governance_votes where proposal_id=362
group by v
)
, voters_histogram as (select count(*) as cc , c from voters
group by c)
, voters_more_than_once_vote as (select voter, count(distinct vote_option) as vp from osmosis.core.fact_governance_votes
where voter in (select v from voters where c>1)
group by voter)
,voters_more_than_once_vote_histogram as (select count(*) as cvp ,vp from voters_more_than_once_vote
group by vp)
, OSMO_balance as (select sum(BALANCE/1e6) as bal , address from osmosis.core.fact_daily_balances
where CURRENCY = 'uosmo' and DATE= (select max(ds.DATE)
from osmosis.core.fact_daily_balances as ds inner join osmosis.core.fact_governance_votes
on address=voter and PROPOSAL_ID=362
) and address in (select v from voters)
group by address)
select c,cc from voters_histogram
Run a query to Download Data