freemartianBolide ETH Cummulative
    Updated 2023-09-11
    with ETH_table as (
    select
    tx_hash,
    block_timestamp,
    decoded_log:from as actor,
    decoded_log:value/pow(10,decimals) as amount,
    'Deposit' as action
    from
    bsc.core.ez_decoded_event_logs l
    inner join bsc.core.dim_contracts c on c.address = l.contract_address
    where event_name = 'Transfer'
    and contract_address = '0x2170ed0880ac9a755fd29b2688956bd959f933f8'
    and origin_function_signature = '0x6e553f65'
    and decoded_log:to = '0x941ef9aaf3277052e2e6c737ae9a75b229a20988'
    and tx_status = 'SUCCESS'
    and block_timestamp > '2022-08-01'

    UNION
    SELECT
    tx_hash,
    block_timestamp,
    decoded_log:to as actor,
    decoded_log:value/pow(10,decimals) as amount,
    'Withdraw' as action
    from bsc.core.ez_decoded_event_logs l
    inner join bsc.core.dim_contracts c on c.address = l.contract_address
    where event_name = 'Transfer'
    and contract_address = '0x2170ed0880ac9a755fd29b2688956bd959f933f8'
    and origin_function_signature = '0x00f714ce'
    and decoded_log:from in ('0x941ef9aaf3277052e2e6c737ae9a75b229a20988', '0x21ff050aa96b370fa4784a48533144bfe42416a2')
    and tx_status = 'SUCCESS'
    and block_timestamp > '2022-08-01'
    ),
    data AS (
    select
    block_timestamp :: date AS day,
    Run a query to Download Data