thejoyceused-aquamarine
    Updated 2024-11-17
    WITH daily_tps AS (
    SELECT
    DATE_TRUNC('day', BLOCK_TIMESTAMP) AS day,
    COUNT(*) / (24 * 60 * 60) AS daily_tps -- Calculate TPS for each day
    FROM
    near.core.fact_transactions
    WHERE
    BLOCK_TIMESTAMP >= DATEADD(day, -30, CURRENT_DATE)
    GROUP BY
    day
    )

    SELECT
    AVG(daily_tps) AS avg_daily_tps,
    MAX(daily_tps) AS max_daily_tps,
    PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY daily_tps) AS median_daily_tps
    FROM
    daily_tps;

    Last run: 2 months ago
    AVG_DAILY_TPS
    MAX_DAILY_TPS
    MEDIAN_DAILY_TPS
    1
    79.91373774193593.6102280.483947
    1
    38B
    8s