isabelhendrickpbp1
Updated 2022-07-28Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
›
⌄
with time_diffs as
(select a.BLOCK_NUMBER as block1, a.BLOCK_TIMESTAMP as date1, b.BLOCK_NUMBER as block2, b.BLOCK_TIMESTAMP as date2, timediff(second, date1,date2) as time_diff
from polygon.core.fact_blocks a
join polygon.core.fact_blocks b
on a.BLOCK_NUMBER=b.BLOCK_NUMBER-1
order by block1
)
select max(time_diff) as max_diff, avg(time_diff) as avg_diff,min(time_diff) as min_diff,
(select avg(TX_COUNT) from polygon.core.fact_blocks) as avg_txs,
(select min(TX_COUNT) from polygon.core.fact_blocks) as min_txs,
(select max(TX_COUNT) from polygon.core.fact_blocks) as max_txs
from time_diffs
Run a query to Download Data