rahoaaveVoting Power: All Proposals
    Updated 2022-12-20
    -- all snapshots with outcome
    with all_ss as (
    select
    date(proposal_start_time) as date,
    proposal_title,
    voter,
    vote_option,
    voting_power
    from ethereum.core.ez_snapshot
    where space_id = 'aave.eth'
    ),

    ex_proposal as(
    select
    date,
    proposal_title,
    voter,
    vote_option,
    voting_power
    from all_ss
    where voting_power > 0.1
    ),
    comb as (
    select
    proposal_title,
    -- 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,
    max_vp / total_vp as "Top Voter's % of Total"
    from ex_proposal
    group by proposal_title
    )
    Run a query to Download Data