mattkstewLAAF Transactions 5
Updated 2023-01-25
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
›
⌄
with tab1 as (
select
date_trunc('day', block_timestamp) as date_day,
date_trunc('min', block_timestamp),
count(*) as count1
from terra.core.fact_transactions
group by 1,2 )
, tab2 as (
select
date_day,
avg(count1/60) as Avg_Transactions_Per_Second
from tab1
group by 1 )
, tab3 as (
select
block_id,
min(date_trunc('day', block_timestamp)) as date2,
count(*) as count1
from terra.core.fact_transactions
group by 1 )
select
date_trunc('day', date_day) as date1,
avg(count1/ Avg_Transactions_Per_Second) as Avg,
max(count1/Avg_Transactions_Per_Second) as Max,
min(count1/Avg_Transactions_Per_Second) as Min
from tab2 left outer join tab3 on
date_day = date2
where date1 > '2023-01-07'
group by 1
Run a query to Download Data