zakkisyedLil Nouns
    Updated 2022-06-17

    select distinct event_inputs:proposalId::number as proposal_id,
    count (distinct event_inputs:voter::string) as voter_count,
    block_timestamp

    from

    (

    select * from ethereum.core.fact_event_logs
    where contract_address = '0x5d2c31ce16924c2a71d317e5bbfd5ce387854039'
    and event_name = 'VoteCast'

    )

    where proposal_id is not null
    group by 1
    order by 1 asc






    -- contract_address = '0x5d2c31ce16924c2a71d317e5bbfd5ce387854039'
    --event_name = 'VoteCast'
    -- event_inputs = {"proposalId":"7","reason":"","support":"0","voter":"0xf76e2d2bba0292cf88f71934aff52ea54baa64d9","votes":"1"}
    -- topics = ["0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4","0x000000000000000000000000f76e2d2bba0292cf88f71934aff52ea54baa64d9"]
    -- event_removed = false
    -- ORIGIN_FUNCTION_SIGNATURE = 0x56781388

    --ORIGIN_FROM_ADDRESS = '0xf76e2d2bba0292cf88f71934aff52ea54baa64d9'
    --ORIGIN_TO_ADDRESS = '0x5d2c31ce16924c2a71d317e5bbfd5ce387854039'

    Run a query to Download Data