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

    select
    date(BLOCK_TIMESTAMP) as date ,
    concat ('Proposal #', proposal_id) as pps,

    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

    Run a query to Download Data