Ali3NDistribution of Votes and Voters By Choice (Cosmos Osmosis Terra)
    Updated 2023-02-22
    select 'Cosmos' as chain,
    case when vote_option = '3' then 'NO'
    when vote_option = '4' then 'NO WITH VETO'
    when vote_option = '2' then 'ABSTAIN'
    when vote_option = '1' then 'YES' end as vote_description,
    count (distinct tx_id) as Votes_Count,
    count (distinct voter) as Voters_Count
    from cosmos.core.fact_governance_votes
    where tx_succeeded = 'TRUE'
    group by 1,2

    union ALL

    select 'Osmosis' as chain,
    case when vote_option = '3' then 'NO'
    when vote_option = '4' then 'NO WITH VETO'
    when vote_option = '2' then 'ABSTAIN'
    when vote_option = '1' then 'YES' end as vote_description,
    count (distinct tx_id) as Votes_Count,
    count (distinct voter) as Voters_Count
    from osmosis.core.fact_governance_votes
    where tx_succeeded = 'TRUE'
    group by 1,2

    union ALL

    select 'Terra' as chain,
    case when vote_option = '3' then 'NO'
    when vote_option = '4' then 'NO WITH VETO'
    when vote_option = '2' then 'ABSTAIN'
    when vote_option = '1' then 'YES' end as vote_description,
    count (distinct tx_id) as Votes_Count,
    count (distinct voter) as Voters_Count
    from terra.core.fact_governance_votes
    where tx_succeeded = 'TRUE'
    group by 1,2
    Run a query to Download Data