cybergenlab[Network Overview] 24h metrics overview
Updated 2024-11-16
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
›
⌄
-- Ethereum key usage metrics overview
--Get Ethereum block base fee
with block_base_fee as (
select
date_trunc('day', block_timestamp) as time,
avg(get(block_header_json, 'baseFeePerGas')/pow(10, 9)) as base_fee
from ethereum.core.fact_blocks
group by 1
)
--Get type and status of transactions
, transaction_details as (
select
time,
sum(successes) / (sum(successes) + sum(failures)) as success_rate,
sum(legacy) as legacy_tx,
sum(EIP_2930) as EIP_2930_tx,
sum(EIP_1559) as EIP_1559_tx,
sum(EIP_4844) as EIP_4844_tx
from(
select
date_trunc('day', block_timestamp) as time,
case when status = 'SUCCESS' then 1 else 0 end as successes,
case when status = 'FAIL' then 1 else 0 end as failures,
case when tx_type = 0 then 1 else 0 end as legacy,
case when tx_type = 1 then 1 else 0 end as EIP_2930,
case when tx_type = 2 then 1 else 0 end as EIP_1559,
case when tx_type = 3 then 1 else 0 end as EIP_4844,
from ethereum.core.fact_transactions
)
group by 1
)
--Get Ethereum usage metrics
select
QueryRunArchived: QueryRun has been archived