Deebs-DeFi-j9fRbzRUNE Flow from CEXes
    Updated 2023-11-13

    SELECT
    date_trunc('month', BLOCK_TIMESTAMP) AS DATE,
    sum(Amount_E8/pow(10,8)) AS total_bought_USD
    FROM thorchain.core.fact_transfer_events
    WHERE BLOCK_TIMESTAMP BETWEEN {{start_date}} AND {{end_date}}
    AND asset='THOR.RUNE'
    AND FROM_ADDRESS IN (select address from thorchain.core.dim_labels WHERE label_type = 'cex')
    Group by 1
    having total_bought_USD>0
    Order by total_bought_USD DESC
    Run a query to Download Data