grahamBinance ETH token Flows
    Updated 2023-10-16
    with
    ETH_eth_base as (
    select
    block_timestamp::date as date,
    c.address_name,
    'ETH' as token,
    sum(amount) as amount
    from ethereum.core.ez_eth_transfers a
    inner join (select distinct address, address_name from crosschain.core.dim_labels
    where label_subtype = 'hot_wallet' and project_name like 'binance'
    and address_name like 'binance %' and blockchain = 'ethereum') c
    on a.eth_from_address = c.address
    where a.block_timestamp >= current_date - {{lookback_days}}
    and a.eth_to_address not in (select distinct address from crosschain.core.dim_labels
    where label_subtype = 'hot_wallet' and project_name like 'binance'
    and address_name like 'binance %' and blockchain = 'ethereum')
    group by 1,2,3
    ),
    net_out as (
    select
    distinct date,
    address_name,
    token,
    -amount,
    'out' as direction
    from ETH_eth_base
    ),
    ETH_eth_base_in as (
    select
    block_timestamp::date as date,
    c.address_name,
    'ETH' as token,
    sum(amount) as amount
    from ethereum.core.ez_eth_transfers a
    inner join (select distinct address, address_name from crosschain.core.dim_labels
    where label_subtype = 'hot_wallet' and project_name like 'binance'
    Run a query to Download Data