phu[Post Merge Behavior] ETH swap from by period
    Updated 2022-09-25
    with
    swap_from_cte as (
    select
    BLOCK_TIMESTAMP::date date
    , ORIGIN_FROM_ADDRESS swapper
    , sum(amount_in) amount
    , count(tx_hash) tx_count
    from ethereum.core.ez_dex_swaps
    where 1=1
    and token_in = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
    group by 1,2
    )
    select
    date
    , period
    , amount
    , swapper
    , tx_count / swapper tx_count_per_swapper
    from (
    select
    date
    , case
    when date < '2022-09-15' then 'Before'
    when date > '2022-09-15' then 'After'
    else 'The Merge'
    end period
    , sum(amount) amount
    , sum(tx_count) tx_count
    , count(distinct swapper) swapper
    from swap_from_cte
    group by 1,2
    )
    where 1=1
    and date between '2022-08-01' and '2022-09-24'
    Run a query to Download Data