littlenaomiUntitled Query
    Updated 2022-11-18
    --credit to alik110

    with ftx as (
    select *
    from ethereum.core.dim_labels
    where label ilike '%ftx%' or address_name ilike '%ftx%'),
    Inflowt as (
    select
    case
    when block_timestamp::date >= '2022-11-07' then 'After FTX Collapse'
    else 'Before FTX Collapse'
    end as time_label,
    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 ftx)
    and from_address not in (select distinct address from ftx)
    and block_timestamp > CURRENT_DATE - 24
    group by 1,2,3
    union ALL
    select
    case
    when block_timestamp::date >= '2022-11-07' then 'After FTX Collapse'
    else 'Before FTX Collapse'
    end as time_label,
    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 ftx)
    and eth_from_address not in (select distinct address from ftx)
    and block_timestamp > CURRENT_DATE - 24
    Run a query to Download Data