cypherGoverning the Cosmos - avg vote distribution - osmosis
    Updated 2023-01-12
    with osmosis_votes as (select
    proposal_id,
    description,
    count(distinct(tx_id)) as n_votes
    from osmosis.core.fact_governance_votes v
    join osmosis.core.dim_vote_options o on v.vote_option = o.vote_id
    where v.vote_option != 'VOTE_OPTION_UNSPECIFIED'
    group by proposal_id, description),

    osmosis_avg as (select
    description as vote,
    round(avg(n_votes), 0) as avg_votes,
    'osmosis' as chain
    from osmosis_votes
    group by vote)

    select * from osmosis_avg
    Run a query to Download Data