banbannardA vs B 5
    Updated 2022-07-03
    with base2 as (select tx_hash
    from bsc.core.fact_event_logs
    where event_name = 'Swap'
    and block_timestamp >= current_date - 6),

    base3 as (select block_timestamp,
    event_inputs:from as active_user,
    event_inputs:value/1e18 as transaction_size
    from bsc.core.fact_event_logs
    where (contract_address ilike '0x55d398326f99059fF775485246999027B3197955' or contract_address ilike '0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d')
    and event_name = 'Transfer'
    and tx_hash not in (select tx_hash from base2)
    and block_timestamp >= current_date - 6
    and event_inputs:value > 0),

    base12 as (select tx_hash
    from arbitrum.core.fact_event_logs
    where event_name = 'Swap'
    and block_timestamp >= current_date - 6),

    base13 as (select block_timestamp,
    event_inputs:from as active_user,
    event_inputs:value/1e6 as transaction_size
    from arbitrum.core.fact_event_logs
    where (contract_address ilike '0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8' or contract_address ilike '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9')
    and event_name = 'Transfer'
    and tx_hash not in (select tx_hash from base12)
    and block_timestamp >= current_date - 6
    and event_inputs:value > 0)

    select
    date_trunc('day', block_timestamp) as day,
    count(distinct(active_user)),
    sum(transaction_size),
    'Arbitrum'
    from base13
    Run a query to Download Data