yasmin-n-d-r-hHARD1
Updated 2023-02-22Copy Reference Fork
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
›
⌄
with base as (
select
case
when block_timestamp > '2023-01-17' then 'After Upgrade'
when block_timestamp < '2023-01-17' then 'Before Upgrade'
end as upgrade_phase,
block_number,
count(distinct(tx_hash)) as count_tx
from polygon.core.fact_transactions
WHERE block_timestamp >= '2023-01-01'
group by 1, 2
)
select
upgrade_phase,
avg(count_tx) as Transaction_per_Block,
'Average TX per Block' as Min_Avg_Max
from base
group by 1
union all
select
upgrade_phase,
max(count_tx),
'Max TX per Block'
from base
group by 1
union all
select
upgrade_phase,
min(count_tx),
'Min TX per Block'
from base
group by 1
order by 1, 2 asc
Run a query to Download Data