NavidCopy of Untitled Query
    Updated 2022-07-27
    with blocks as (
    select
    'Polygon' as network,
    a.tx_count,
    DATEDIFF('millisecond', a.block_timestamp, b.block_timestamp) as duration
    from
    polygon.core.fact_blocks a
    join polygon.core.fact_blocks b on a.hash = b.parent_hash
    where
    a.tx_count > 0
    union all
    select
    'Flow' as network,
    a.tx_count,
    DATEDIFF('millisecond', a.block_timestamp, b.block_timestamp) as duration
    from
    flow.core.fact_blocks a
    join flow.core.fact_blocks b on a.id = b.parent_id
    where
    a.tx_count > 0
    union all
    select
    'Solana' as network,
    a.tx_count,
    DATEDIFF('millisecond', a.block_timestamp, b.block_timestamp) as duration
    from
    solana.core.fact_blocks a
    join solana.core.fact_blocks b on a.block_hash = b.previous_block_hash
    where
    a.tx_count > 0
    union all
    select
    'Arbitrum' as network,
    a.tx_count,
    DATEDIFF('millisecond', a.block_timestamp, b.block_timestamp) as duration
    from
    Run a query to Download Data