adriaparcerisasOptimism vs Arbitrum
    Updated 2023-01-18
    with
    t1 as (
    SELECT
    trunc(x.block_timestamp,'day') as date,
    count(distinct x.tx_hash) as transactions,
    count(distinct x.from_address) as active_users,
    transactions/active_users as avg_tx_per_user,
    sum(tx_fee) as fees,
    avg(tx_fee) as avg_tx_fee
    from arbitrum.core.fact_transactions x
    --where x.block_timestamp>='2023-01-01'
    group by 1
    ),
    t2 as (
    select
    trunc(y.block_timestamp,'day') as date,
    count(distinct y.tx_hash) as swaps,
    count(distinct ORIGIN_FROM_ADDRESS) as swappers,
    swaps/swappers as avg_swaps_per_swapper
    from arbitrum.core.fact_event_logs y
    --where y.block_timestamp>='2023-01-01'
    where event_name='Swap'
    group by 1
    ),
    t3 as (
    select
    trunc(z.block_timestamp,'day') as date,
    count(distinct z.tx_hash) as nft_sales,
    count(distinct z.origin_from_address) as nft_buyers,
    nft_sales/nft_buyers as nft_bought_per_user
    from arbitrum.core.fact_event_logs z
    join arbitrum.core.dim_labels l on z.contract_address=l.address
    --where z.block_timestamp>='2023-01-01'
    where label_type='nft'
    group by 1
    ),
    Run a query to Download Data