feyikemiMar1na codes
    Updated 2024-05-05
    with new_addresses AS
    (SELECT
    from_address,
    min(block_timestamp) as first_tx_timestamp
    FROM
    arbitrum.core.fact_transactions
    WHERE origin_function_signature <> '0x6bf6a42d'
    GROUP by from_address
    HAVING first_tx_timestamp >= '2023-03-01'
    and first_tx_timestamp < '2024-03-01'
    )

    SELECT
    date_trunc('week', first_tx_timestamp) as week,
    'new' as type,
    count(from_address) as n_addresses
    FROM
    new_addresses
    GROUP BY week, type

    UNION ALL

    SELECT
    date_trunc('week', block_timestamp) as week,
    'all active' as type,
    count(DISTINCT from_address) as n_addresses
    FROM
    arbitrum.core.fact_transactions
    WHERE date_trunc('day', block_timestamp) >= '2023-03-01'
    AND date_trunc('day', block_timestamp) <= '2024-03-01'
    GROUP BY week
    QueryRunArchived: QueryRun has been archived