alirsnyk-05
    Updated 2022-11-19
    -- Credit: https://app.flipsidecrypto.com/velocity/queries/aeba56dd-fb52-4a6d-b6f0-145ff5a9180b || alik110
    with ftxtable as (
    select *
    from ethereum.core.dim_labels
    where label ilike '%ftx%' or address_name ilike '%ftx%' )
    select initcap (label) as Destination,
    count (distinct tx_hash) as TX_Count,
    sum (amount_usd) as Outflow_Volume
    from ethereum.core.ez_token_transfers t1 join ethereum.core.dim_labels t2 on t1.to_address = t2.address
    where from_address in (select distinct address from ftxtable)
    and to_address not in (select distinct address from ftxtable)
    and block_timestamp > CURRENT_DATE - 7
    group by 1

    union ALL

    select initcap (label) as Destination,
    count (distinct tx_hash) as TX_Count,
    sum (amount_usd) as Outflow_Volume
    from ethereum.core.ez_eth_transfers t1 join ethereum.core.dim_labels t2 on t1.eth_to_address = t2.address
    where eth_from_address in (select distinct address from ftxtable)
    and Eth_to_address not in (select distinct address from ftxtable)
    and block_timestamp > CURRENT_DATE - 7
    group by 1
    order by 2 desc
    Run a query to Download Data