scottincryptoTop 5 Delegate Voting History
    Updated 2021-07-04
    with pre_format as (
    select
    block_timestamp,
    /* case
    when tx_from_address = '0xe02457a1459b6c49469bf658d4fe345c636326bf' then '0xe0..bf'
    when tx_from_address = '0x7e4a8391c728fed9069b2962699ab416628b19fa' then '0x7e..fa'
    when tx_from_address = '0x2b1ad6184a6b0fac06bd225ed37c2abc04415ff4' then '0x2b..f4'
    when tx_from_address = '0xbbf3f1421d886e9b2c5d716b5192ac998af2012c' then '0xbb..2c'
    when tx_from_address = '0x6626593c237f530d15ae9980a95ef938ac15c35c' then '0x66..5c'
    end as voter_address,*/
    concat(substr(tx_from_address, 0, 4),'..',substr(tx_from_address, 41, 2)) as voter_address,
    event_inputs:votes/1e18 as votes,
    case
    when event_inputs:proposalId = 3 then 'Proposal 0.3'
    when event_inputs:proposalId = 4 then 'Proposal 0.4'
    when event_inputs:proposalId = 1 then 'Proposal 1.1'
    else event_inputs:proposalId
    end as proposal_id
    -- event_inputs:support as support
    from ethereum.events_emitted
    where contract_address in('0x5e4be8bc9637f0eaa1a755019e06a68ce081d58f' ,'0xc4e172459f1e7939d522503b81afaac1014ce6f6','0xeCa491E162d157760F167c4DD92b45AE6E5Cf0f1') -- UNI gov contract
    and tx_from_address in ('0xe02457a1459b6c49469bf658d4fe345c636326bf',
    '0x7e4a8391c728fed9069b2962699ab416628b19fa',
    '0x2b1ad6184a6b0fac06bd225ed37c2abc04415ff4',
    '0xbbf3f1421d886e9b2c5d716b5192ac998af2012c',
    '0x6626593c237f530d15ae9980a95ef938ac15c35c')
    and event_name = 'VoteCast'
    -- and tx_succeeded = 'TRUE'
    and block_timestamp > '2019-01-01'
    order by 1
    )

    --select * from pre_format
    select
    *
    from pre_format
    Run a query to Download Data