adriaparcerisasAverage transactions per block on Polygon L2 comparison
Updated 2022-12-27
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
›
⌄
-- What is the average time between blocks on Polygon?
-- What was the maximum and minimum recorded time between two blocks?
-- How many transactions are done in a block on average?
-- How do these numbers compare to L1 such as Flow or Solana, or other L2 such as Arbitrum or Optimism?
WITH
poly_tpb as (
select
block_number,
block_timestamp,
count(distinct tx_hash) as txs
from polygon.core.fact_transactions
where block_timestamp>=CURRENT_DATE- INTERVAL '3 MONTHS' and status='SUCCESS'
group by 1,2
),
poly as (
SELECT
trunc(block_timestamp,'day') as date,
avg(txs) as avg_tx_per_block,
max(txs) as max_tx_per_block,
min(txs) as min_tx_per_block
from poly_tpb
group by 1
order by 1 asc
),
arb_tpb as (
select
block_number,
block_timestamp,
count(distinct tx_hash) as txs
from arbitrum.core.fact_transactions
where block_timestamp>=CURRENT_DATE- INTERVAL '3 MONTHS' and status='SUCCESS'
group by 1,2
),
arb as (
SELECT
trunc(block_timestamp,'day') as date,
Run a query to Download Data