rahoaave onchain total for/against/sum
    Updated 2023-04-13
    with allv as (
    select
    date(block_timestamp) as Date,
    proposal_id as Proposal,
    support as Support,
    voting_power / pow(10, 18) as VP,
    voter as Voter
    from ethereum.aave.ez_votes
    ),

    sumz as (
    select
    Proposal,
    count(distinct voter) as num_voters,
    sum(VP) as total_vp
    from allv
    group by 1
    ),
    tot_for as (
    select
    Proposal,
    count(distinct voter) as num_voters_for,
    sum(VP) as total_vp_for
    from allv
    where Support = 'True'
    group by 1
    ),
    combined as (
    select
    *
    from sumz
    left join tot_for using(Proposal)
    order by Proposal desc
    )
    Run a query to Download Data