hyoeisemanFailed Transactions_weekly data
Updated 2022-10-03Copy Reference Fork
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 swap as (select 'Swap' as type,
date_trunc('week', block_timestamp) as week,
count (case when STATUS ilike 'fail' then 1 end) as count_failed_txn,
count (case when STATUS ilike 'success' then 1 end) as count_successful_txn,
count_failed_txn + count_successful_txn as total_transaction,
count_failed_txn*100/total_transaction as failure_percentage
from ethereum.core.fact_transactions
where week >= CURRENT_DATE - {{past_weeks}} and week <= CURRENT_DATE-1
and origin_function_signature in (select distinct origin_function_signature from ethereum.sushi.ez_swaps)
group by type, week),
borrow as (select 'borrow' as type, date_trunc('week', block_timestamp) as week,
count (case when STATUS ilike 'fail' then 1 end) as count_failed_txn,
count (case when STATUS ilike 'success' then 1 end) as count_successful_txn,
count_failed_txn + count_successful_txn as total_transaction,
count_failed_txn*100/total_transaction as failure_percentage
from ethereum.core.fact_transactions
where week >= CURRENT_DATE - {{past_weeks}} and week <= CURRENT_DATE-1
and origin_function_signature in (select distinct origin_function_signature from ethereum.sushi.ez_borrowing)
group by type, week),
lend as (select 'lend' as type,
date_trunc('week', block_timestamp) as week,
count (case when STATUS ilike 'fail' then 1 end) as count_failed_txn,
count (case when STATUS ilike 'success' then 1 end) as count_successful_txn,
count_failed_txn + count_successful_txn as total_transaction,
count_failed_txn*100/total_transaction as failure_percentage
from ethereum.core.fact_transactions
where week >= CURRENT_DATE - {{past_weeks}} and week <= CURRENT_DATE-1
and origin_function_signature in (select distinct origin_function_signature from ethereum.sushi.ez_lending)
group by type, week),
tem_tab as (select distinct pool_address from ethereum.core.dim_dex_liquidity_pools where platform ilike 'sushiswap'),
add_remove_liq as ( select 'add_remove_liquidity' as type,
date_trunc('week', block_timestamp) as week,
count (case when STATUS ilike 'fail' then 1 end) as count_failed_txn,
count (case when STATUS ilike 'success' then 1 end) as count_successful_txn,
count_failed_txn + count_successful_txn as total_transaction,
count_failed_txn*100/total_transaction as failure_percentage
Run a query to Download Data