ValiMohammadiDaily Flow Transactions
Updated 2024-03-04Copy Reference Fork
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
›
⌄
------------------------FLOW-------------------
with flow_transactions as (
select 'Flow' as chain,
date_trunc('day', block_timestamp) as date,
case
when date >= '2022-06-01 00:00:00.000' then 'Second Half of 2022'
else 'First Half of 2022'
end as period,
count (distinct tx_id) as "Daily TX Count",
"Daily TX Count"/1440 as "Transactions Per Minute (TPM)",
"Daily TX Count"/86400 as "Transactions Per Second (TPS)"
from flow.core.fact_transactions
where block_timestamp >= '2022-01-01'
and block_timestamp::date != CURRENT_DATE
group by 1,2),
flow_data as(
select chain, period,
avg("Daily TX Count") as avg_tpd,
avg("Transactions Per Minute (TPM)") as avg_tpm,
avg("Transactions Per Second (TPS)") as avg_tps
from flow_transactions
group by 1,2),
------------------------Etherum-------------------
etherum_transactions as (
select 'Etherum' as chain,
date_trunc('day', block_timestamp) as date,
case
when date >= '2022-06-01 00:00:00.000' then 'Second Half of 2022'
else 'First Half of 2022'
end as period,
count (distinct tx_hash) as "Daily TX Count",
"Daily TX Count"/1440 as "Transactions Per Minute (TPM)",
"Daily TX Count"/86400 as "Transactions Per Second (TPS)"
from ethereum.core.fact_transactions
where block_timestamp >= '2022-01-01'
QueryRunArchived: QueryRun has been archived