Afonso_DiazTotal
Updated 2024-10-02
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
›
⌄
with main as (
select
tx_hash,
block_timestamp,
from_address as user,
tx_fee,
block_number
from kaia.core.fact_transactions
where tx_succeeded = 1
and block_timestamp::date between '{{ start_date }}' and '{{ end_date }}'
)
select
count(distinct tx_hash) as transactions,
(transactions / (select count(distinct tx_hash) from kaia.core.fact_transactions where block_timestamp::date between '{{ start_date }}' and '{{ end_date }}')) * 100 as success_rate,
count(distinct user) as users,
count(distinct block_number) as blocks,
sum(tx_fee) as fees_volume,
avg(tx_fee) as average_fees_amount,
transactions / count(distinct block_timestamp::date) as daily_average_transactions,
users / count(distinct block_timestamp::date) as daily_average_users
from main
QueryRunArchived: QueryRun has been archived