roketos16
    Updated 2022-11-20
    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
    Run a query to Download Data