Hadisehnew users 1
    Updated 2022-09-07

    with new_user as ( select min(block_timestamp) as day, tx_signer
    from near.core.fact_transactions
    group by 2)
    ,
    tb1 as ( select trunc(day,'week') as weekly,
    count(DISTINCT tx_signer) as total_new,
    sum(total_new) over (order by weekly asc) as cumulative_new
    from new_user
    group by 1)

    select weekly,
    case when weekly >= CURRENT_DATE - 90 then 'Last 90 Days' else 'weekly' end as weeks,
    total_new,
    cumulative_new
    from tb1
    Run a query to Download Data