MLDZMNOGB10
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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with tbt as (select
label,
raw_metadata[0]:"account_address" as validators
from osmosis.core.dim_labels
where label_subtype ilike 'validator'),
tb1 as (select
voter,
block_timestamp,
tx_id,
Description
from osmosis.core.fact_governance_votes a
left join osmosis.core.dim_vote_options b on a.vote_option = b.vote_id
where proposal_id ='362'
and tx_status = 'SUCCEEDED'),
tb2 as (select
distinct a.voter,
a.block_timestamp,
a.tx_id,
b.Description
from osmosis.core.fact_governance_votes a left join osmosis.core.dim_vote_options b on a.vote_option = b.vote_id
join tb1 c on a.voter = c.voter and b.description <> c.description and a.block_timestamp > c.block_timestamp
where proposal_id ='362'
and tx_status = 'SUCCEEDED')
select
case
when voter in (select voter from tb2) then 'Switch Vote'
else 'Remain as same Vote'
end as voters_type,
case
when voter in(select validators from tbt) then 'Validators'
else 'Ordinary voters' end as gp,
count (distinct voter) as no_voters
from tb1
Run a query to Download Data