Mufasaaverage time between blocks - Polygon vs solana vs arbitrum?
    Updated 2022-07-26
    -- SELECT
    -- (86400 / count(hash)) as seconds_between_blocks,
    -- block_timestamp::date as date
    -- from polygon.core.fact_blocks
    -- where date >= current_date - 1
    -- group by date
    -- order by 2 desc
    with polygon as (
    SELECT
    AVG(DATEDIFF(SECOND, a.block_timestamp, b.block_timestamp)) as AVG_time_between_polygon_blocks
    FROM polygon.core.fact_blocks a
    JOIN polygon.core.fact_blocks b
    on a.block_number= b.block_number - 1
    ), solana as (
    SELECT
    AVG(DATEDIFF(SECOND, a.block_timestamp, b.block_timestamp)) as AVG_time_between_solana_blocks
    FROM solana.core.fact_blocks a
    JOIN solana.core.fact_blocks b
    on a.block_id= b.block_id - 1
    ), arbitrum as (
    SELECT
    AVG(DATEDIFF(SECOND, a.block_timestamp, b.block_timestamp)) as AVG_time_between_arbitrum_blocks
    FROM arbitrum.core.fact_blocks a
    JOIN arbitrum.core.fact_blocks b
    on a.block_number= b.block_number - 1
    )
    select AVG_time_between_polygon_blocks, AVG_time_between_solana_blocks, AVG_time_between_arbitrum_blocks
    from polygon, solana, arbitrum


    Run a query to Download Data