AmbassadorsParallel Daily Block Time
Updated 2024-04-14
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
35
36
›
⌄
-- forked from EVM Daily Block Time @ https://flipsidecrypto.xyz/edit/queries/306ce1ff-2eb6-49a3-b987-f2a607b80e4e
-- Credited #M-Zamani
with
final as (
select date(a.block_timestamp) as date,'Aptos' as chain, avg(datediff(second,a.block_timestamp, b.block_timestamp)) as avg_time
from aptos.core.fact_blocks a, aptos.core.fact_blocks b
where a.block_number = b.block_number-1
and a.block_timestamp::date >= '2023-08-15'
and b.block_timestamp::date >= '2023-08-15'
group by 1,2
UNION ALL
select
date(a.block_timestamp) as date,'Sei' as chain, avg(datediff(second,a.block_timestamp, b.block_timestamp)) as avg_time
from sei.core.fact_blocks a, sei.core.fact_blocks b
where a.block_id = b.block_id-1
and a.block_timestamp::date >= '2023-08-15'
and b.block_timestamp::date >= '2023-08-15'
group by 1,2
UNION ALL
select
date(a.block_timestamp) as date,'Solana' as chain, avg(datediff(second,a.block_timestamp, b.block_timestamp)) as avg_time
from solana.core.fact_blocks a, solana.core.fact_blocks b
where a.block_id = b.block_id-1
and a.block_timestamp::date >= '2023-08-15'
and b.block_timestamp::date >= '2023-08-15'
group by 1,2
)
select
date,
chain ,
avg(avg_time) as "Average Time"
from final a join ethereum.core.dim_dates b on a.date = b.date_day
where date >= current_date() - 30 and date < current_date
group by 1,2
QueryRunArchived: QueryRun has been archived