kiacryptodaily block age - op
Updated 2023-03-10
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
›
⌄
with op as (
select block_timestamp, lead(block_timestamp) over(order by block_number) as next_block_time, datediff('s',block_timestamp,next_block_time) as diff, tx_count
from optimism.core.fact_blocks
where block_timestamp::date >= '2023-01-01'
),
info as (
select date_trunc('day', block_timestamp) as date, avg(diff) as avg_block_time, max(diff) as max_block_time, min(diff) as min_block_time, avg(tx_count) as avg_block_tx
from op
group by 1
),
avg_info as (
select avg(avg_block_time) as total_avg_block_time, avg(avg_block_tx) as total_avg_block_tx
from info
)
select *
from info, avg_info
Run a query to Download Data