NatBlocks in July
Updated 2022-11-05Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
›
⌄
with op_blocks as (select *,
lag(block_timestamp, 1) OVER (order by block_timestamp) as previous_block,
datediff(millisecond, previous_block, block_timestamp) as time_difference
from optimism.core.fact_blocks
where block_timestamp::date > '2022-07-01'
and block_timestamp::date < '2022-08-01'
),
gas as (select
date_trunc(day, block_timestamp) as date,
count(distinct op_blocks.block_number) as block_count,
avg(op_blocks.time_difference) as average_time_between_blocks
from op_blocks
where block_timestamp::date > '2022-07-01'
and block_timestamp::date < '2022-08-01'
GROUP BY date)
select * from gas
Run a query to Download Data