maybeyonaseth_whale_eth_transfer_cex_pref
    Updated 2022-07-26
    with
    whales as (
    select
    user_address,
    balance
    from ethereum.erc20_balances
    where balance_date = current_date
    and contract_address = 'ETH'
    and label is null
    and user_address not in (
    '0x00000000219ab540356cbb839cbe05303d7705fa' -- eth2 staking
    )
    -- and balance > 5000
    and amount_usd >= 10000000
    order by balance desc
    ),
    cex as (
    select
    user_address,
    label
    from ethereum.erc20_balances
    where balance_date = current_date
    and contract_address = 'ETH'
    and label_type = 'cex'
    ),
    transfers as (
    select
    block_timestamp,
    tx_hash,
    origin_function_signature,
    eth_from_address,
    eth_to_address,
    case when wf.user_address is not null then 'whale'
    when cf.user_address is not null then cf.label
    -- when cf.user_address is not null then 'cex'
    else null end
    Run a query to Download Data