Flipside Team olas safe 3
    Updated 2024-08-14
    with t1 as (select
    'Autonolas txn' as type,
    count(distinct tx_hash) as no_txn_olas
    from crosschain.olas.fact_service_events
    where BLOCKCHAIN = 'gnosis'
    --and BLOCK_TIMESTAMP >= '2023-08-01'
    ),

    t2 as (select
    distinct CONTRACT_ADDRESS
    from gnosis.core.fact_event_logs
    where TOPICS[0] in ('0x442e715f626346e8c54381002da614f62bee8d27386535b2521ec8540898556e',
    '0x6895c13664aa4f67288b25d7a21d7aaa34916e355fb9b6fae0a139a9085becb8')
    ),
    --where tx_hash = '0xca888b5964f07e6e1a47a8d15b5d01f22842e0c40f0e4cd09b8182a8bcbcfaad'

    t3 as (select
    'Other safe txn' as type,
    count(distinct tx_hash) as no_txn_total

    from gnosis.core.fact_transactions
    where TO_ADDRESS in (select CONTRACT_ADDRESS from t2)
    and STATUS = 'SUCCESS'
    --and BLOCK_TIMESTAMP >= '2023-08-01'
    --where TOPICS[0] = '0x442e715f626346e8c54381002da614f62bee8d27386535b2521ec8540898556e'
    )

    select
    'By Autonomous' as type,
    no_txn_olas as "Transactions"
    from t1

    union all

    select
    'Other safe txn' as type,
    QueryRunArchived: QueryRun has been archived