Alexayrealms vote distributon
    Updated 2022-08-31
    WITH votes AS ( SELECT DISTINCT VOTER, COUNT (DISTINCT TX_ID) AS total_vote
    FROM solana.core.fact_proposal_votes
    where GOVERNANCE_PLATFORM = 'realms'
    GROUP BY 1)

    SELECT CASE WHEN total_vote = 1 THEN 'one vote'
    WHEN total_vote > 1 AND total_vote <10 THEN 'Between 1 and 10 votes'
    WHEN total_vote >= 10 AND total_vote <20 THEN 'Between 10 and 20 votes'
    when total_vote >= 20 and total_vote <30 then 'between 20 - 30 Votes'
    when total_vote >= 30 and total_vote <40 then 'between 30 - 40 Votes'
    WHEN total_vote >= 40 THEN '40 votes or more'
    END AS total_votes,
    COUNT (DISTINCT VOTER) as total_voter
    FROM votes
    GROUP BY 1
    Run a query to Download Data