mrwildcatUNI Token volume by exchange complete list
    Updated 2023-05-24
    WITH volume_from AS (
    SELECT
    dl.label AS exchange,
    dl.label_type AS type,
    SUM(tt.amount) AS volume_from,
    SUM(tt.amount_usd) AS volume_usd_from
    FROM
    ethereum.core.ez_token_transfers AS tt
    JOIN
    ethereum.core.dim_labels AS dl
    ON
    tt.from_address = dl.address
    WHERE
    tt.contract_address = lower('0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984')
    AND dl.label_type IN ('dex', 'cex')
    AND tt.block_timestamp >= DATE_TRUNC('MONTH', DATEADD(MONTH, - {{last_n_months}}, CURRENT_TIMESTAMP))
    GROUP BY
    dl.label,
    dl.label_type
    ),
    volume_to AS (
    SELECT
    dl.label AS exchange,
    dl.label_type AS type,
    SUM(tt.amount) AS volume_to,
    SUM(tt.amount_usd) AS volume_usd_to
    FROM
    ethereum.core.ez_token_transfers AS tt
    JOIN
    ethereum.core.dim_labels AS dl
    ON
    tt.to_address = dl.address
    WHERE
    tt.contract_address = lower('0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984')
    AND dl.label_type IN ('dex', 'cex')
    AND tt.block_timestamp >= DATE_TRUNC('MONTH', DATEADD(MONTH, - {{last_n_months}}, CURRENT_TIMESTAMP))
    Run a query to Download Data