SocioCryptothe average time between blocks
    Updated 2022-06-26
    --Show the average time between blocks over time
    SELECT date_trunc('hour',a.block_timestamp) as hours,
    avg(datediff(second, a.block_timestamp,b.block_timestamp)) as avg_time_diff,
    max(datediff(second, a.block_timestamp,b.block_timestamp)) as max_time_diff,
    min(datediff(second, a.block_timestamp,b.block_timestamp)) as min_time_diff
    FROM avalanche.core.fact_blocks a,avalanche.core.fact_blocks b
    WHERE a.block_number = b.block_number -1
    AND a.block_timestamp::date >= '2022-06-20'
    GROUP BY hours

    Run a query to Download Data