Popex404CEX SOL Outflow Volume by Destination
    Updated 2022-11-18
    -- Sql From JacktheGuy https://app.flipsidecrypto.com/dashboard/hjINU0

    WITH Outflow as (
    SELECT
    DISTINCT tx_id
    FROM solana.core.fact_transfers
    LEFT outer JOIN solana.core.dim_labels
    ON TX_FROM = address
    WHERE (label_type iLIKE '%CEX%' )
    AND mint in ('So11111111111111111111111111111111111111112')
    )

    SELECT
    date_trunc('day', block_timestamp) as day,
    label,
    sum(amount) as Volume_OUT
    FROM solana.core.fact_transfers
    LEFT outer JOIN solana.core.dim_labels
    ON TX_TO = address
    WHERE TX_ID IN (SELECT * FROM Outflow)
    AND not label LIKE 'ftx'
    AND block_timestamp > CURRENT_DATE - 11
    GROUP BY 1,2
    Run a query to Download Data