Yousefi_1994Sushi vs Uni - Daily Arbitrum Total Number of Swaps and Swappers
    Updated 2022-10-16
    with arbitrum_uniswap as (
    select
    block_timestamp::date as "Days",
    'Uniswap' as "Platform",
    count (distinct tx_hash) as "Number of Swaps",
    count (distinct Origin_from_address) as "Number of Swappers"
    from arbitrum.core.fact_event_logs
    where origin_to_address in ('0xe592427a0aece92de3edee1f18e0157c05861564','0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45')
    and event_name = 'Swap'
    and tx_status = 'SUCCESS'
    group by "Days"
    order by "Days"
    ),
    arbitrum_sushiswap as (
    select
    block_timestamp::date as "Days",
    'Sushiswap' as "Platform",
    count (distinct tx_hash) as "Number of Swaps",
    count (distinct Origin_from_address) as "Number of Swappers"
    from arbitrum.sushi.ez_swaps
    where platform = 'sushiswap'
    group by "Days"
    order by "Days"
    )

    select * from arbitrum_uniswap
    union all
    select * from arbitrum_sushiswap
    Run a query to Download Data