Moetergov
    Updated 2023-01-23
    with base as
    (select
    distinct PROPOSAL_ID from
    terra.core.fact_governance_votes
    order by 1 desc limit 5)

    select
    concat ('Proposal #', proposal_id) as pps,
    VOTE_OPTION_TEXT,
    count (distinct tx_id) as Votes_Count,
    count (distinct voter) as Voters_Count
    from terra.core.fact_governance_votes
    where TX_SUCCEEDED = 'TRUE'
    and proposal_id in (select * from base)
    group by 1,2
    order by 3 desc

    Run a query to Download Data