adriaparcerisassushi failure global
Updated 2023-04-06
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
t1 as (
SELECT
distinct origin_function_signature
from ethereum.sushi.ez_borrowing
),
t2 as (
SELECT
trunc(block_timestamp,'{{granularity}}') as date,
count(case when status = 'SUCCESS' then 1 end) as succeed_tx,
count(case when status = 'FAIL' then 1 end) as failed_tx,
(failed_tx/(failed_tx+succeed_tx))*100 as failed_rate,
count(distinct tx_hash) as n_transactions
FROM ethereum.core.fact_transactions
WHERE origin_function_signature in (select * from t1)
GROUP BY 1
),
t3 as (
select * from t2 where date >=CURRENT_DATE-INTERVAL'{{number_months}} MONTHS'
),
t4 as (
SELECT
distinct origin_function_signature
from ethereum.sushi.ez_lending
),
t5 as (
SELECT
trunc(block_timestamp,'{{granularity}}') as date,
count(case when status = 'SUCCESS' then 1 end) as succeed_tx,
count(case when status = 'FAIL' then 1 end) as failed_tx,
(failed_tx/(failed_tx+succeed_tx))*100 as failed_rate,
count(distinct tx_hash) as n_transactions
FROM ethereum.core.fact_transactions
WHERE origin_function_signature in (select * from t4)
GROUP BY 1
),
Run a query to Download Data