Yousefi_1994Merge Behavior - Transfer ETH to CEX
    Updated 2022-09-29
    with ethereum_eth_transfer as (
    select
    block_timestamp,
    block_number,
    tx_hash,
    origin_from_address,
    eth_to_address,
    amount
    from ethereum.core.ez_eth_transfers
    where origin_function_signature = '0x'
    and identifier = 'CALL_ORIGIN'
    and origin_to_address = eth_to_address
    and block_timestamp::date >= '2022-09-06'
    and block_timestamp::date <= '2022-09-24'
    ),
    cex_address as (
    select
    address
    from ethereum.core.dim_labels
    where label_type = 'cex'
    )

    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 Transactions",
    count(distinct origin_from_address) as "Number of Unique User",
    sum(amount) as "Amount of ETH Transferred"
    from ethereum_eth_transfer
    where eth_to_address in (select address from cex_address)
    group by "Days", "Time Frame"
    order by "Days"
    Run a query to Download Data