Mager-MUntitled Query
    Updated 2022-04-17
    SELECT

    DATE_TRUNC('day', block_timestamp) AS date,

    label AS exchange_name,

    SUM(amount) AS volume

    FROM algorand.labels

    LEFT JOIN algorand.payment_transaction

    ON address = sender

    WHERE date >= '2021-01-01'

    AND label_type = 'cex'

    AND label NOT LIKE 'group%'

    GROUP BY label, date

    ORDER BY date