SniperUntitled Query
    Updated 2022-08-14
    with Cex_Lable as (select
    address
    from flipside_prod_db.crosschain.address_labels
    where label_type = 'cex' and
    label_subtype = 'hot_wallet'
    and blockchain = 'ethereum')

    , in_eth as ( select
    Date(block_timestamp::date) as date ,
    tx_hash
    ,from_address as cex_wallet,
    to_address as user_wallet,
    amount_usd,
    symbol
    from ethereum.core.ez_token_transfers
    where from_address in ( select address from Cex_Lable ) and
    block_timestamp::date >= CURRENT_DATE - 180
    UNION
    select
    Date(block_timestamp::date) as date ,
    tx_hash
    ,eth_from_address as cex_wallet,
    eth_to_address as user_wallet,
    amount_usd,
    'ETH' as symbol
    from ethereum.core.ez_eth_transfers
    where eth_from_address in ( select address from Cex_Lable ) and
    block_timestamp::date >= CURRENT_DATE - 180),

    out_eth as (select
    Date(block_timestamp::date) as date,
    tx_hash
    ,from_address as user_wallet,
    to_address as cex_wallet,
    amount_usd,
    symbol
    Run a query to Download Data