m0rt3zalil nouns voting 1
    Updated 2022-06-19
    WITH all_votes AS (
    SELECT
    origin_from_address AS voter,
    event_inputs:proposalId,
    to_number(event_inputs:votes) AS votes,
    block_timestamp
    FROM ethereum.core.fact_event_logs
    WHERE
    event_name = 'VoteCast'
    AND ORIGIN_TO_ADDRESS = lower('0x5d2C31ce16924C2a71D317e5BbFd5ce387854039') --NounsDAOProxy
    AND tx_status = 'SUCCESS'
    )

    SELECT
    voter,
    sum(votes) AS total_votes
    FROM all_votes
    GROUP BY voter
    ORDER BY total_votes DESC

    Run a query to Download Data