nsa2000osmo11
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
›
⌄
-- this code is thankfully burrowed from alik110: https://app.flipsidecrypto.com/dashboard/MIXbqK
with firstvotes as (
select voter,
block_timestamp,
tx_id,
Description
from osmosis.core.fact_governance_votes t1 join osmosis.core.dim_vote_options t2 on t1.vote_option = t2.vote_id
where proposal_id in ('362')
and tx_status = 'SUCCEEDED'),
secondvotes as (
select distinct t1.voter,
t1.block_timestamp,
t1.tx_id,
t2.Description
from osmosis.core.fact_governance_votes t1 join osmosis.core.dim_vote_options t2 on t1.vote_option = t2.vote_id
join firstvotes t3 on t1.voter = t3.voter and t1.block_timestamp > t3.block_timestamp and t2.description != t3.description
where proposal_id in ('362')
and tx_status = 'SUCCEEDED')
select case when voter in (select voter from secondvotes) then 'Changed Their Votes'
else 'Did Not Change Vote' end as type,
count (distinct voter) as Voters_Count
from firstvotes
group by 1
order by 2 desc