Tobi_1inherent-sapphire
    Updated 2024-09-21
    WITH last_month_users AS (
    SELECT DISTINCT PROPOSER
    FROM flow.core.fact_transactions;
    WHERE BLOCK_TIMESTAMP BETWEEN DATEADD(MONTH, -2, CURRENT_TIMESTAMP()) AND DATEADD(MONTH, -1, CURRENT_TIMESTAMP())
    ),
    this_month_users AS (
    SELECT DISTINCT PROPOSER
    FROM flow.core.fact_transactions
    WHERE BLOCK_TIMESTAMP >= DATEADD(MONTH, -1, CURRENT_TIMESTAMP())
    )
    SELECT
    COUNT(this_month_users.PROPOSER) AS returning_users
    FROM
    last_month_users
    JOIN
    this_month_users ON last_month_users.PROPOSER = this_month_users.PROPOSER;

    QueryRunArchived: QueryRun has been archived