hessVote Options Of Validators and Normal Users
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
21
22
›
⌄
with voter as ( select trunc(block_timestamp,'hour') as hourly,voter, proposal_id, vote_option, vote_weight
from osmosis.core.fact_governance_votes
where TX_STATUS = 'SUCCEEDED'
and proposal_id = '362')
,
voters as ( select hourly, voter, description
from voter a join osmosis.core.dim_vote_options b on a.vote_option = b.vote_id
where hourly::date >= CURRENT_DATE - 60)
,
validator as ( select raw_metadata[0]:account_address as address
from osmosis.core.dim_labels
where label_subtype = 'validator' )
select 'Validators' as type,description, count(DISTINCT(voter)) as total_voter
from voters
where voter in (select address from validator)
group by 1,2
UNION
select 'Normal Users' as type,description, count(DISTINCT(voter)) as total_voter
from voters
where voter not in (select address from validator)
group by 1,2
Run a query to Download Data