PromotedPawnPolygon block Performance vs. L2s - Arbitrum_Static
    Updated 2022-07-27
    with polygon as (
    select
    block_timestamp,
    trunc(block_timestamp, 'Day') as days,
    count(distinct tx_hash) as number_tx,
    timestampdiff('Seconds', lag(block_timestamp) over (order by block_timestamp), block_timestamp) as time_diff
    from polygon.core.fact_transactions
    group by 1, 2
    order by 1, 2
    ),

    arbitrum as (
    select
    block_timestamp,
    trunc(block_timestamp, 'Day') as days,
    count(distinct tx_hash) as number_tx,
    timestampdiff('Seconds', lag(block_timestamp) over (order by block_timestamp), block_timestamp) as time_diff
    from arbitrum.core.fact_transactions
    group by 1, 2
    order by 1, 2
    )

    select

    avg(p.number_tx) as number_tx_POL,
    avg(a.number_tx) as number_tx_ARB,
    number_tx_POL / number_tx_ARB as POL_output,
    avg(p.time_diff) as block_time_diff_POL,

    avg(a.time_diff) as block_time_diff_ARB,
    block_time_diff_POL / block_time_diff_ARB -1 as block_time_diff_POL_vs
    from polygon p
    join arbitrum a on p.days = a.days
    Run a query to Download Data