piper2023-11-17 04:53 PM
    Updated 2023-11-17
    SELECT
    DATE_TRUNC('day', BLOCK_TIMESTAMP) AS "Date",
    COUNT(DISTINCT TX_HASH) AS "Daily Transactions"
    FROM
    polygon.core.fact_transactions
    WHERE
    BLOCK_TIMESTAMP BETWEEN '2020-05-01' AND '2020-12-31'
    GROUP BY 1
    UNION
    SELECT
    DATE_TRUNC('day', BLOCK_TIMESTAMP) AS "Date",
    COUNT(DISTINCT TX_HASH) AS "Daily Transactions"
    FROM
    polygon.core.fact_transactions
    WHERE
    BLOCK_TIMESTAMP BETWEEN '2021-01-01' AND '2021-12-31'
    GROUP BY 1
    UNION
    SELECT
    DATE_TRUNC('day', BLOCK_TIMESTAMP) AS "Date",
    COUNT(DISTINCT TX_HASH) AS "Daily Transactions"
    FROM
    polygon.core.fact_transactions
    WHERE
    BLOCK_TIMESTAMP BETWEEN '2022-01-01' AND '2022-12-31'
    GROUP BY 1
    UNION
    SELECT
    DATE_TRUNC('day', BLOCK_TIMESTAMP) AS "Date",
    COUNT(DISTINCT TX_HASH) AS "Daily Transactions"
    FROM
    polygon.core.fact_transactions
    WHERE
    BLOCK_TIMESTAMP BETWEEN '2023-01-01' AND '2023-12-31'
    GROUP BY 1
    Run a query to Download Data