misaghlbFailed Transactions
    Updated 2022-10-02
    with swap as (
    select
    date_trunc('hour', block_timestamp) as mdate,
    count(case when STATUS = 'SUCCESS' then TRUE else NULL end ) as success,
    count(DISTINCT TX_HASH) as tx_count,
    tx_count - success as fails,
    success / (tx_count) as success_rate,
    1 - success_rate as failure_rate
    from ethereum.core.fact_transactions
    where date(block_timestamp) >= '2022-07-01'
    and origin_function_signature in (select distinct origin_function_signature from ethereum.sushi.ez_swaps)
    group by mdate
    ),
    borrow as (
    select
    date_trunc('hour', block_timestamp) as mdate,
    count(case when STATUS = 'SUCCESS' then TRUE else NULL end ) as success,
    count(DISTINCT TX_HASH) as tx_count,
    tx_count - success as fails,
    success / (tx_count) as success_rate,
    1 - success_rate as failure_rate
    from ethereum.core.fact_transactions
    where date(block_timestamp) >= '2022-07-01'
    and origin_function_signature in (select distinct origin_function_signature from ethereum.sushi.ez_borrowing)
    group by mdate
    ),
    lending as (
    select
    date_trunc('hour', block_timestamp) as mdate,
    count(case when STATUS = 'SUCCESS' then TRUE else NULL end ) as success,
    count(DISTINCT TX_HASH) as tx_count,
    tx_count - success as fails,
    success / (tx_count) as success_rate,
    1 - success_rate as failure_rate
    from ethereum.core.fact_transactions
    where date(block_timestamp) >= '2022-07-01'
    Run a query to Download Data