leo-lZzln2Untitled Query
    with ftxtable as (
    select *
    from optimism.core.dim_labels
    where LABEL_SUBTYPE ilike '%ftx%' or address_name ilike '%ftx%'),
    Inflowt as (
    select block_timestamp::date as Inflow_Date,
    symbol as Symbol_IN,
    sum (amount_usd) as Inflow_Volume
    from ethereum.core.ez_token_transfers
    where to_address in (select distinct address from ftxtable)
    and from_address not in (select distinct address from ftxtable)
    and block_timestamp > CURRENT_DATE - 14
    group by 1,2
    union ALL
    select block_timestamp::date as Inflow_Date,
    'ETH' as symbol_in,
    sum (amount_usd) as Inflow_Volume
    from ethereum.core.ez_eth_transfers
    where eth_to_address in (select distinct address from ftxtable)
    and eth_from_address not in (select distinct address from ftxtable)
    and block_timestamp > CURRENT_DATE - 14
    group by 1,2),

    Outflowt as (
    select block_timestamp::date as Outflow_Date,
    symbol as Symbol_Out,
    sum (amount_usd) as Outflow_Volume
    from ethereum.core.ez_token_transfers
    where from_address in (select distinct address from ftxtable)
    and to_address not in (select distinct address from ftxtable)
    and block_timestamp > CURRENT_DATE - 14
    group by 1,2
    Run a query to Download Data