adriaparcerisasNew NEAR users 2
    Updated 2024-11-18
    with
    t1 as (
    select
    distinct tx_signer,
    min(block_timestamp) as debut
    from near.core.fact_transactions
    where tx_succeeded = 'true'
    group by 1
    ),
    t2 as (
    SELECT
    distinct tx_signer,debut from t1 where debut >=CURRENT_DATE-INTERVAL '1 MONTH' and debut<current_date
    )
    select
    trunc(debut,'day') as date,
    count(distinct tx_signer) as new_user,
    sum(new_user) over (order by date) as cum_new_users
    from t2
    group by 1
    order by 1 asc
    QueryRunArchived: QueryRun has been archived