afonsoUntitled Query
Updated 2023-01-22Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
›
⌄
select
count(distinct tx_id) as txns_count,
count(distinct tx_from) as users_count,
count(distinct block_id) as blocks_count,
sum(substring(fee, 0, charindex('uosmo', fee) -1)/1e6) as total_fee,
avg(substring(fee, 0, charindex('uosmo', fee) -1)/1e6) as average_fee,
(count(distinct (iff(tx_succeeded = 1, tx_id, null))) / txns_count) * 100 as success_rate,
100 - success_rate as fail_rate,
txns_count / (86400 * 90) as tps
from osmosis.core.fact_transactions
where fee like '%uosmo%'
and block_timestamp > current_date - 90
Run a query to Download Data