NavidCopy of Untitled Query
Updated 2022-11-24
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
›
⌄
with validators as (
select
address,
label,
raw_metadata[0]['account_address']::string as account
from
osmosis.core.dim_labels
where label_subtype = 'validator'
), base as (
select
*,b.label as ss,
case when b.label is not null then 'Validator' else 'User' end as validlbl
from
osmosis.core.fact_governance_votes a left join validators b on a.voter=b.account
)
select
description,
validlbl,
count(distinct tx_id) as votes,
count(distinct voter) as voters,
sum(vote_weight) as weight
from
base a join osmosis.core.dim_vote_options b on a.vote_option = b.vote_id
where
tx_status='SUCCEEDED' and proposal_id='362'
group by
description, validlbl
Run a query to Download Data