SalehBlast_tx_true_false_daily
Updated 2024-11-11
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
›
⌄
with lst_tx_s as (
select
date_trunc(hour,block_timestamp) as date
,count(DISTINCT tx_hash) as TXn_S
from blast.core.fact_transactions
where STATUS='SUCCESS'
group by 1
)
, lst_tx_f as (
select
date_trunc(hour,block_timestamp) as date
,count(DISTINCT tx_hash) as TXn_F
from blast.core.fact_transactions
where STATUS!='SUCCESS'
group by 1
)
select
date
,TXn_S
,TXn_F
,ZEROIFNULL(TXn_S) + ZEROIFNULL(TXn_F) as "all"
,round(100/"all"*ZEROIFNULL(TXn_S)) as "Success Ratio"
,round(100/"all"*ZEROIFNULL(TXn_F)) as "Failure Rate"
from lst_tx_s
left join lst_tx_f using(date)
QueryRunArchived: QueryRun has been archived