MLDZMNgno3
Updated 2023-03-15Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with tb1 as (select
distinct BLOCK_TIMESTAMP,
BLOCK_NUMBER
from gnosis.core.fact_transactions
order by 1
),
tb2 as (select
BLOCK_NUMBER,
BLOCK_TIMESTAMP as x1,
lag(BLOCK_TIMESTAMP,1)over(order by BLOCK_TIMESTAMP) as x2,
datediff(second,x2,x1) as time_difference
from tb1 )
select
min(time_difference) as minimum_time,
avg(time_difference) as average_time,
max(time_difference) as maximum_time
from tb2
Run a query to Download Data