Ariopolygon - far
    Updated 2022-07-27
    with polygon as (
    select
    LAG(block_timestamp) over(order by block_timestamp) as previous_block_time,
    block_timestamp as block_time,
    tx_count
    from polygon.core.fact_blocks
    ),
    polygon_blocks as (
    select
    datediff('second', previous_block_time, block_time) as diff,
    tx_count
    from polygon
    ),
    polygon_performance as (
    select
    max(diff) as max_time_polygon,
    min(diff) as min_time_polygon,
    avg(diff) as average_polygon,
    avg(tx_count) as average_transactions_polygon
    from polygon_blocks
    ),
    flow as (
    select
    LAG(block_timestamp) over(order by block_timestamp) as previous_block_time,
    block_timestamp as block_time,
    tx_count
    from flow.core.fact_blocks
    ),
    flow_blocks as (
    select
    datediff('second', previous_block_time, block_time) as diff,
    tx_count
    from flow
    ),
    flow_performance as (
    select
    Run a query to Download Data