alirsOsmos-G-07
    Updated 2022-11-23
    with main as (
    SELECT
    voter,
    count(*) as vote_count

    FROM osmosis.core.fact_governance_votes
    WHERE not vote_weight is NULL and PROPOSAL_ID=362
    GROUP BY 1
    )

    select
    Case
    when vote_count=1 then 'Only One Vote'
    when vote_count=2 then 'TWO Votes'
    when vote_count=3 then 'Three Votes'
    Else 'Greater than Three Votes'
    END as vote_distribution,
    count(*) ,
    row_number() over (order by count(*) desc) as ranking
    from main
    group by 1
    order by ranking
    Run a query to Download Data