keshanUntitled Query
    Updated 2022-07-28
    select dc.tx_hash, dc.block_timestamp as time,
    dc.origin_from_address as user,
    ul.address_name as user_address_name,
    ul.label_type as user_label_type,
    ul.label_subtype as user_label_subtype,
    ul.project_name as user_project_name,
    dc.event_inputs:delegator as delegator,
    dc.event_inputs:fromDelegate as from_delegator,
    dc.event_inputs:toDelegate as to_delegator,
    dv.event_inputs:newBalance/ pow(10, 18) as newb,
    dv.event_inputs:previousBalance/ pow(10, 18) as prevb
    from optimism.core.fact_event_logs dc
    inner join optimism.core.fact_event_logs dv using(tx_hash)
    left join optimism.core.dim_labels ul on ul.address=dc.origin_from_address
    where
    dc.contract_address='0x4200000000000000000000000000000000000042' and
    dc.event_name = 'DelegateChanged' and
    dv.event_name = 'DelegateVotesChanged' and
    dc.tx_status='SUCCESS'
    Run a query to Download Data