abaQuery - flow tps
Updated 2022-07-18
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
›
⌄
-- flow tps
with blocks_tps as (
select b.ID,
b.TX_COUNT,
iff(
TIMESTAMPDIFF(second,b.BLOCK_TIMESTAMP,b2.BLOCK_TIMESTAMP) != 0,
TIMESTAMPDIFF(second,b.BLOCK_TIMESTAMP,b2.BLOCK_TIMESTAMP), 1) as block_time ,
(b.TX_COUNT/block_time) as tps
from flow.core.fact_blocks as b
join flow.core.fact_blocks as b2
on b.ID = b2.PARENT_ID
)
select avg(tps) tps
from blocks_tps
Run a query to Download Data