rahoVoting Power: All Proposals
    Updated 2024-10-14
    -- all snapshots with outcome
    with all_ss as (
    select *
    from ethereum.core.ez_snapshot
    where space_id = 'opcollective.eth'
    and proposal_title != '%Test%'
    and proposal_title != 'Final test'
    and proposal_title != 'Test Proposal'
    ),

    ex_proposal as(
    select
    proposal_title,
    voter,
    vote_option,
    voting_power
    from all_ss
    where voting_power > 0.1
    order by voting_power asc
    )
    select
    count(voter) as num_votes,
    sum(voting_power) as total_vp,
    max(voting_power) as max_vp,
    min(voting_power) as min_vp,
    avg(voting_power) as avg_vp,
    median(voting_power) as med_vp,
    proposal_title
    from ex_proposal
    group by proposal_title
    QueryRunArchived: QueryRun has been archived