Moefailed
    Updated 2024-03-26
    select
    date_trunc(day,block_timestamp) as date,
    'SEI' as network,
    count(TX_ID) as tx_count,
    sum(case when TX_SUCCEEDED!='true' then 1 else 0 end) AS "Failed TX",
    ("Failed TX"/tx_count)*100 AS "Failed %"
    from sei.core.fact_transactions
    where block_timestamp::date >= '2023-08-15'

    group by 1

    union all



    select
    date_trunc(day,block_timestamp) as date,
    'Polygon' as network,
    count(tx_hash) as tx_count,
    sum(case when STATUS!='SUCCESS' then 1 else 0 end) AS "Failed TX",
    ("Failed TX"/tx_count)*100 AS "Failed %"
    from Polygon.core.fact_transactions
    where block_timestamp::date >= '2023-08-15'


    group by 1

    union all

    select
    date_trunc(day,block_timestamp) as date,
    'Osmosis' as network,
    count(TX_ID) as tx_count,
    sum(case when TX_SUCCEEDED!='true' then 1 else 0 end) AS "Failed TX",
    ("Failed TX"/tx_count)*100 AS "Failed %"
    from Osmosis.core.fact_transactions
    QueryRunArchived: QueryRun has been archived