RhoninPolygon Block Performance p4
    Updated 2022-07-24
    WITH polygon as (
    SELECT
    DATEDIFF(SECOND, a.block_timestamp, b.block_timestamp) as polygon_block_time_defference
    FROM polygon.core.fact_blocks a
    JOIN polygon.core.fact_blocks b
    on a.block_number = b.block_number - 1
    ),
    flow as (
    SELECT
    DATEDIFF(SECOND, a.block_timestamp, b.block_timestamp) as flow_block_time_defference
    FROM flow.core.fact_blocks a
    JOIN flow.core.fact_blocks b
    on a.block_height = b.block_height - 1
    ),
    solana as (
    SELECT
    DATEDIFF(SECOND, a.block_timestamp, b.block_timestamp) as solana_block_time_defference
    FROM solana.core.fact_blocks a
    JOIN solana.core.fact_blocks b
    on a.block_id = b.block_id - 1
    )
    SELECT
    max(polygon_block_time_defference) as time_difference1 , min(polygon_block_time_defference) as time_difference2 ,'Maximum Time between Polygon Blocks' as type1 ,'Minimum Time between Polygon Blocks' as type2
    FROM polygon
    GROUP BY 3,4
    UNION
    SELECT
    max(flow_block_time_defference) as time_difference1 , min(flow_block_time_defference) as time_difference2, 'Maximum Time between Flow Blocks' as type1 ,'Minimum Time between Flow Blocks' as type2
    FROM flow
    GROUP BY 3,4
    UNION
    SELECT
    max(solana_block_time_defference) as time_difference1 , min(solana_block_time_defference) as time_difference2, 'Maximum Time between Solana Blocks' as type1 ,'Minimum Time between Solana Blocks' as type2
    FROM solana
    GROUP BY 3,4
    Run a query to Download Data