CUBE3daily deployed contracts
    Updated 2025-01-09
    SELECT AVG(sc_count) AS avg_counte, 'ethereum' as chain FROM (
    SELECT TO_CHAR(BLOCK_TIMESTAMP, 'yyyy-MM-DD') AS year_month_day, COUNT(*) as sc_count
    FROM ethereum.core.fact_traces
    WHERE BLOCK_TIMESTAMP >= '2025-01-08' AND BLOCK_TIMESTAMP < '2025-01-09'
    AND TYPE IN ('CREATE2', 'CREATE')
    AND TX_STATUS = 'SUCCESS'
    AND TRACE_STATUS = 'SUCCESS'
    GROUP BY year_month_day
    ORDER BY year_month_day ASC
    )
    UNION
    SELECT AVG(sc_count) AS avg_counte, 'optimism' as chain FROM (
    SELECT TO_CHAR(BLOCK_TIMESTAMP, 'yyyy-MM-DD') AS year_month_day, COUNT(*) as sc_count
    FROM optimism.core.fact_traces
    WHERE BLOCK_TIMESTAMP >= '2025-01-08' AND BLOCK_TIMESTAMP < '2025-01-09'
    AND TYPE IN ('CREATE2', 'CREATE')
    AND TX_STATUS = 'SUCCESS'
    AND TRACE_STATUS = 'SUCCESS'
    GROUP BY year_month_day
    ORDER BY year_month_day ASC
    )
    UNION
    SELECT AVG(sc_count) AS avg_counte, 'bsc' as chain FROM (
    SELECT TO_CHAR(BLOCK_TIMESTAMP, 'yyyy-MM-DD') AS year_month_day, COUNT(*) as sc_count
    FROM bsc.core.fact_traces
    WHERE BLOCK_TIMESTAMP >= '2025-01-08' AND BLOCK_TIMESTAMP < '2025-01-09'
    AND TYPE IN ('CREATE2', 'CREATE')
    AND TX_STATUS = 'SUCCESS'
    AND TRACE_STATUS = 'SUCCESS'
    GROUP BY year_month_day
    ORDER BY year_month_day ASC
    )
    UNION
    SELECT AVG(sc_count) AS avg_counte, 'polygon' as chain FROM (
    SELECT TO_CHAR(BLOCK_TIMESTAMP, 'yyyy-MM-DD') AS year_month_day, COUNT(*) as sc_count
    FROM polygon.core.fact_traces
    QueryRunArchived: QueryRun has been archived