freemartianDaily enter to Binance
    Updated 2022-02-24
    WITH cex_addresses AS (
    SELECT address, label
    FROM algorand.labels
    WHERE label_type = 'cex'
    ),
    sent_to_cex AS (
    SELECT DATE(block_timestamp) as DATE, receiver as cex_address, label as cex_label, amount as sent_amount
    FROM algorand.payment_transaction
    INNER JOIN cex_addresses
    ON receiver = address
    )
    SELECT date_trunc('day', DATE) AS time_period, cex_label, sum(sent_amount) AS total_amount
    FROM sent_to_cex
    WHERE DATE >= '2021-01-01'
    AND cex_label in ('binance')
    GROUP BY time_period, cex_label
    ORDER BY time_period ASC
    Run a query to Download Data