Alexayinflow outflow eth
    Updated 2022-11-17
    with ftxtable as ( select *
    from ethereum.core.dim_labels
    where label 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 > '2022-11-01'
    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 > '2022-11-01'
    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 > '2022-11-01'
    group by 1,2
    union ALL
    select block_timestamp::date as Outflow_Date, 'ETH' as sybmol_out, sum (amount_usd) as Outflow_Volume
    from ethereum.core.ez_eth_transfers
    where eth_from_address in (select distinct address from ftxtable)
    and Eth_to_address not in (select distinct address from ftxtable)
    and block_timestamp > '2022-11-01'
    group by 1,2)

    Run a query to Download Data