Yousefi_1994Merge Behavior - Swap to ETH
    Updated 2022-09-29
    with ethereum_swaps as (
    select
    block_timestamp,
    block_number,
    tx_hash,
    origin_from_address,
    amount_in_usd
    from ethereum.core.ez_dex_swaps
    where block_timestamp::date >= '2022-09-06'
    and block_timestamp::date <= '2022-09-24'
    and symbol_in = 'WETH'
    and amount_in_usd > 0 and amount_in_usd is not null
    )

    select
    block_timestamp::date as "Days",
    case
    when block_timestamp::date >= '2022-09-06' and block_timestamp::date <= '2022-09-15' and block_number < 15537394 then 'Before Merge'
    else 'After Merge'
    end as "Time Frame",
    count(distinct tx_hash) as "Number of Swaps",
    count(distinct origin_from_address) as "Number of Unique Swapper",
    sum(amount_in_usd) as "Swap Volume (USD)"
    from ethereum_swaps
    group by "Days", "Time Frame"
    order by "Days"
    Run a query to Download Data