MostafaUntitled Query
    Updated 2022-07-24
    with polygon as
    (select date_trunc('day',d2) as date, avg(time) as polygon_avgtime
    from( select a.block_number, a.block_timestamp as d1, b.block_number, b.block_timestamp as d2, timediff(second, d1,d2) as time
    from polygon.core.fact_blocks a
    join polygon.core.fact_blocks b
    on a.block_number=b.block_number-1)
    where date>='2022-06-22'
    group by date),
    optimism as
    (select date_trunc('day',d2) as date, avg(time) as optimisim_avgtime
    from
    (select a.block_number, a.block_timestamp as d1, b.block_number, b.block_timestamp as d2, timediff(second, d1,d2) as time
    from optimism.core.fact_blocks a
    join optimism.core.fact_blocks b
    on a.block_number=b.block_number-1)
    where date>='2022-06-22'
    group by date),
    arbitrum as
    (select date_trunc('day',d2) as date, avg(time) as arbitrum_avgtime
    from (select a.block_number, a.block_timestamp as d1, b.block_number, b.block_timestamp as d2, timediff(second, d1,d2) as time
    from arbitrum.core.fact_blocks a
    join arbitrum.core.fact_blocks b
    on a.block_number=b.block_number-1)
    where date>='2022-06-22'
    group by date),

    flow as
    (select date_trunc('day',d2) as date, avg(time) as flow_avgtime
    from (select a.block_height, a.block_timestamp as d1, b.block_height, b.block_timestamp as d2, timediff(second, d1,d2) as time
    from flow.core.fact_blocks a
    join flow.core.fact_blocks b
    on a.block_height=b.block_height-1)
    where date>='2022-06-22'
    group by date),
    solana as
    (select date_trunc('day',d2) as date, avg(time) as solana_avgtime
    Run a query to Download Data