mohan2249-o7peAJTotal activity 2 copy
    Updated 2024-08-29
    -- forked from MLDZMN / Total activity 2 @ https://flipsidecrypto.xyz/MLDZMN/q/vlltnbik_utt/total-activity-2
    With ethereum as (
    SELECT
    date_trunc('month', BLOCK_TIMESTAMP) as month,
    'Ethereum' as chain,
    count(*) as no_txn
    from
    ethereum.core.fact_transactions
    where
    TO_ADDRESS in (
    SELECT
    DECODED_LOG:multisig as multisig
    from
    ethereum.core.ez_decoded_event_logs
    where
    CONTRACT_ADDRESS = '0x48b6af7b12c71f09e2fc8af4855de4ff54e775ca'
    and CONTRACT_NAME = 'Service Registry'
    and EVENT_NAME = 'CreateMultisigWithAgents'
    )
    group by
    1
    ),
    polygon as (
    SELECT
    date_trunc('month', BLOCK_TIMESTAMP) as month,
    'Polygon' as chain,
    count(*) as no_txn
    from
    Polygon.core.fact_transactions
    where
    TO_ADDRESS in (
    SELECT
    DECODED_LOG:multisig as multisig
    from
    Polygon.core.ez_decoded_event_logs
    where
    QueryRunArchived: QueryRun has been archived