arctic-night-foxfirst six month speed transaction
    Updated 2022-07-14
    WITH six_month_speed as (
    SELECT
    DATE_TRUNC ('day',solana.core.fact_transactions.BLOCK_TIMESTAMP) as TIME_STAMP_daily,
    COUNT(TX_ID) / (24*60*60) as transaction_speed
    from
    solana.core.fact_transactions
    WHERE solana.core.fact_transactions.BLOCK_TIMESTAMP::DATE >= '2022-01-01'
    AND solana.core.fact_transactions.BLOCK_TIMESTAMP::DATE < '2022-06-01'
    GROUP BY TIME_STAMP_daily
    ),
    six_month_avg as (
    SELECT
    SUM(transaction_speed) / 152 as avg_speed
    FROM
    six_month_speed
    )
    SELECT
    TIME_STAMP_daily as main_time ,
    transaction_speed,
    avg_speed
    FROM
    six_month_speed , six_month_avg
    ORDER BY TIME_STAMP_daily
    Run a query to Download Data