nitsMonthly Performance
Updated 2022-12-13
999
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
›
⌄
with a as
(
SELECT block_timestamp as bt , block_number as bn from avalanche.core.fact_blocks),
avalanche as
(SELECT date_trunc('month',block_timestamp) as month, avg(td) as avg_time_taken,
avg(avg_time_taken) over (order by month) as avg_time_taken_over_time , 'avalanche' as type
from
( SELECT *
, timestampdiff(sql_tsi_second,bt, block_timestamp) as td
from a
inner join avalanche.core.fact_blocks
on block_number = bn +1 )
where date(block_timestamp)>= '{{start_date}}'
GROUP by 1 ),
n as
(
SELECT block_timestamp as bt , block_id as bn from near.core.fact_blocks),
near as
(SELECT date_trunc('month',block_timestamp) as month, avg(td) as avg_time_taken,
avg(avg_time_taken) over (order by month) as avg_time_taken_over_time , 'near' as type
from
( SELECT *
, timestampdiff(sql_tsi_second,bt, block_timestamp) as td
from n
inner join near.core.fact_blocks
on block_id = bn +1 )
where date(block_timestamp)>= '{{start_date}}'
GROUP by 1 ),
e as
(
SELECT block_timestamp as bt , block_number as bn from ethereum.core.fact_blocks),
eth as
( SELECT date_trunc('month',block_timestamp) as month, avg(td) as avg_time_taken,
avg(avg_time_taken) over (order by month) as avg_time_taken_over_time , 'ethereum' as type
from
( SELECT *
Run a query to Download Data