RayyykOpen Analytics Bounty: Arbitrum (August 6) 1
    Updated 2022-08-10
    with arbi_old as (select distinct(from_address) as arbi_old_users
    from arbitrum.core.fact_transactions
    where block_timestamp <= {{time_period}}),

    opti_old as (select distinct(from_address) as opti_old_users
    from optimism.core.fact_transactions
    where block_timestamp <= {{time_period}}),

    avax_old as (select distinct(from_address) as avax_old_users
    from avalanche.core.fact_transactions
    where block_timestamp <= {{time_period}})

    select date_trunc({{data}}, block_timestamp) as day,
    'Arbitrum',
    count(distinct(from_address)) as new_user_count,
    count(distinct(tx_hash)) as tx_count
    from arbitrum.core.fact_transactions
    where from_address not in (select arbi_old_users from arbi_old)
    group by 1
    union
    select date_trunc({{data}}, block_timestamp) as day,
    'Optimism',
    count(distinct(from_address)),
    count(distinct(tx_hash))
    from optimism.core.fact_transactions
    where from_address not in (select opti_old_users from opti_old)
    group by 1
    union
    select date_trunc({{data}}, block_timestamp) as day,
    'Avalanche',
    count(distinct(from_address)),
    count(distinct(tx_hash))
    from avalanche.core.fact_transactions
    where from_address not in (select avax_old_users from avax_old)
    group by 1
    order by 1
    Run a query to Download Data