SleepyTop 10 tokens of total outflow volume
    Updated 2023-04-19
    -- forked from 2023-04-18 08:38 PM @ https://flipsidecrypto.xyz/edit/queries/e67cc54c-cf43-40f9-af06-1e74a13ed97f

    with cex_address as
    (
    select address, project_name from avalanche.core.dim_labels
    where label_type='cex'
    and label_subtype = 'deposit_wallet'
    )

    --outflow token volume
    select
    contract_address,
    symbol,
    count(distinct tx_hash) total_tx,
    sum(coalesce(amount_usd, 0)) outflow_token_volume,
    median(amount_usd) median_outflow_transfer
    from avalanche.core.ez_token_transfers transfers
    join cex_address
    on transfers.from_address = cex_address.address
    where block_timestamp::date >= current_date - 365
    and amount_usd > 0 and amount_usd is not null
    group by contract_address, symbol
    order by outflow_token_volume desc
    limit 10



    Run a query to Download Data