mlhAverage recorded time between two blocks
Updated 2022-12-12Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
›
⌄
select 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, 'Algorand' as blockchain
from (
select block_timestamp, lead(block_timestamp) over(order by block_ID) as next_block_time, datediff('s',block_timestamp,next_block_time) as diff, tx_count
from algorand.core.fact_block
where block_timestamp::date >= '2022-01-01'
)
union all
select 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, 'Flow' as blockchain
from (
select block_timestamp, lead(block_timestamp) over(order by block_height) as next_block_time, datediff('s',block_timestamp,next_block_time) as diff, tx_count
from flow.core.fact_blocks
where block_timestamp::date >= '2022-01-01'
)
union all
select 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, 'Near' as blockchain
from (
select block_timestamp, lead(block_timestamp) over(order by block_id) as next_block_time, datediff('s',block_timestamp,next_block_time) as diff, TX_COUNT
from near.core.fact_blocks
where block_timestamp::date >= '2022-01-01'
)
union all
select 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, 'Ethereum' as blockchain
from (
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 ethereum.core.fact_blocks
where block_timestamp::date >= '2022-01-01'
)
Run a query to Download Data