permaryTotal Users and Daily transactions on Kaia
Updated 2024-10-01
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
›
⌄
with weekly_activity as (
select
date_trunc('week', block_timestamp) as week_start,
count(distinct to_address) + count(distinct from_address) as total_unique_users,
count(tx_hash) as total_tx,
sum(
case
when tx_succeeded = 'true' then 1
else 0
end
) as successful_tx,
sum(
case
when tx_succeeded = 'false' then 1
else 0
end
) as failed_tx
from
kaia.core.fact_transactions
where
block_timestamp >= '2024-08-28'
and block_timestamp < '2024-10-01'
group by
week_start
)
select
week_start,
total_unique_users,
total_tx,
successful_tx,
failed_tx,
round((successful_tx :: float / total_tx) * 100, 2) as success_rate,
round((failed_tx :: float / total_tx) * 100, 2) as failure_rate
from
weekly_activity
order by
QueryRunArchived: QueryRun has been archived