rahoVotes cast + VP Cast-stgdao
    Updated 2023-04-13
    with all_ss as (
    select
    date_trunc('second', proposal_start_time) as start_date,
    replace(proposal_title,',','' ) as proposal,
    voter,
    voting_power,
    date_trunc('second', vote_timestamp) as vote_timestamp,
    proposal_end_time
    from ethereum.core.ez_snapshot
    where space_id = 'stgdao.eth'
    ),

    vhist as (
    select
    voter,
    count(*) as votes_cast,
    sum(voting_power) as voting_power_cast
    from all_ss
    group by voter
    order by votes_cast desc
    ),

    combine as (
    select
    *
    from all_ss
    join vhist using(voter)
    ),

    sip_17 as
    (
    select
    *
    from combine
    where proposal = 'SIP #17 - Optimize Ethereum and Optimism POL'
    order by vote_timestamp asc
    Run a query to Download Data