Ali3NActually Good : Swap Activity Average
    Updated 2022-09-29
    with t1 as (
    select case when block_timestamp >= '2022-08-15' and block_timestamp < '2022-09-15' then 'Before Merge'
    when block_timestamp >= '2022-09-15' then 'Post Merge' else null end as timespan,
    block_timestamp::date as date,
    count (distinct tx_hash) as tx_count,
    count (distinct origin_from_address) as Users_Count,
    sum (amount_in_usd) as Volume
    from ethereum.core.ez_dex_swaps
    where timespan is not null
    and block_timestamp::date != CURRENT_DATE
    group by 1,2)

    select timespan,
    avg (tx_count),
    avg (users_count),
    avg (volume)
    from t1
    group by 1

    Run a query to Download Data