alirsOP-ETH-02
    Updated 2022-10-14
    with CEX as (
    select address
    from ethereum.core.dim_labels
    where label_type = 'cex'),
    base as (
    select block_timestamp::date as date,
    case when date>='2022-08-15' and date<'2022-09-15'then '1 month Before the merge'
    when date >= '2022-09-15' and date<='2022-10-14' then '1 month after the merge'
    else null
    end as Time_period,
    count (distinct tx_hash) as tx_count,
    count (distinct eth_from_address) as User_Count,sum(amount) as Volume
    from ethereum.core.ez_eth_transfers
    where eth_to_address in (select address from cex)
    group by Time_Period,Date)
    select Date,Time_period,
    avg (tx_count),
    avg (user_count),
    avg (volume)
    from base
    where time_period is not null
    group by 1,2
    Run a query to Download Data