Abbas_ra21Overview
Updated 2024-10-02Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
›
⌄
select
'Kaia' AS Chain,
count(*) AS TXs,
TXs/count(DISTINCT Block_timestamp::Date)/86400 AS "Avg TPS",
avg(TX_FEE*price) AS Fee,
count(DISTINCT from_Address) AS "Active Addresses",
(sum(case when TX_SUCCEEDED!='TRUE' then 1 else 0 end)/TXs)*100 AS "Failed TX %",
TXs/"Active Addresses" AS "Avg TX Per Address",
TXs/Count(DISTINCT BLOCK_TIMESTAMP::DATE) AS "Avg TX Per Day",
"Active Addresses"/count(DISTINCT BLOCK_TIMESTAMP::Date) AS "Avg Addresses Per Day"
from kaia.core.fact_transactions inner join crosschain.price.ez_prices_hourly on symbol='KLAY' and BLOCKCHAIN='klaytn' and date_trunc('Hour',BLOCK_TIMESTAMP)=HOUR
where BLOCK_TIMESTAMP::DATE between dateadd('Day',-{{Last_N_Days}},current_date) and current_date - 1
group by 1
QueryRunArchived: QueryRun has been archived