avaemaOsmosis : Success & Fail Rate
Updated 2022-07-18
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
›
⌄
with total as (select count(1) as total_count ,trunc(block_timestamp,'DAY') as days
from osmosis.core.fact_transactions
where trunc(block_timestamp,'DAY') >= getdate() - interval '120 days'
group by 2)
, success as
(select count(1) as success_count ,trunc(block_timestamp,'DAY') as days
from osmosis.core.fact_transactions
where TX_STATUS='SUCCEEDED' and trunc(block_timestamp,'DAY') >= getdate() - interval '120 days'
group by 2)
, fail as
(select count(1) as fail_count ,trunc(block_timestamp,'DAY') as days
from osmosis.core.fact_transactions
where TX_STATUS='FAILED' and trunc(block_timestamp,'DAY') >= getdate() - interval '120 days'
group by 2)
select success_count/total_count*100 as success_rate , fail_count/total_count*100 as fail_rate,total.days
from total inner join success on success.days=total.days
inner join fail on fail.days=total.days
Run a query to Download Data