Elprognerd11 Successful txns daily
    Updated 2023-03-06
    select
    'Arbitrum' as chain,
    block_timestamp::date as date,
    count(tx_hash) as "Total number of txns",
    count(case when status = 'SUCCESS' then tx_hash end) as "Number of successful txns",
    ("Number of successful txns"/"Total number of txns")*100 as "Success rate"
    from arbitrum.core.fact_transactions
    where block_timestamp >= '2023-01-01'
    group by 1,2

    union all

    select
    'Optimism' as chain,
    block_timestamp::date as date,
    count(tx_hash) as "Total number of txns",
    count(case when status = 'SUCCESS' then tx_hash end) as "Number of successful txns",
    ("Number of successful txns"/"Total number of txns")*100 as "Success rate"
    from optimism.core.fact_transactions
    where block_timestamp >= '2023-01-01'
    group by 1,2
    order by 2

    Run a query to Download Data