justabfjHarmony Total TPM Average
Updated 2022-07-19
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
›
⌄
with tx_min_harmony as (
select date_trunc('minute', block_timestamp) as minute,
sum(tx_count) as tpm
from mdao_harmony.blocks
where block_timestamp >= {{start_date}}
group by minute
),
tx_day_harmony as (
select date_trunc('day', minute) as day,
avg(tpm) as tpm_daily_avg
from tx_min_harmony
group by day
),
tx_month_harmony as (
select date_trunc('month', day) as month,
day,
tpm_daily_avg,
avg(tpm_daily_avg) over (partition by month) as tpm_monthly_avg
from tx_day_harmony
),
tx_tpm_harmony_all as (
select 'HARMONY' as chain,
month,
day,
tpm_daily_avg,
tpm_monthly_avg
from tx_month_harmony
)
select avg(distinct tpm_monthly_avg) from tx_tpm_harmony_all
order by month