h4wkNEAR New users
    Updated 2023-10-22
    with base as (
    select date_trunc('week', block_timestamp) as date,
    -- case when b.project_name is null then 'Unlebeled'
    -- else initcap(b.project_name) end as project,
    tx_hash,
    tx_signer as user
    from near.core.fact_transactions a
    left join near.core.dim_address_labels b on tx_receiver = address
    where block_timestamp >= '2023-01-02'
    and tx_status = 'Success'
    -- and tx_signer not in (select address from near.core.dim_address_labels)
    -- -- and label_type not in ('token', 'fungible_token')
    )

    , new_users as (
    select user,
    -- project,
    min(date) as min_date
    from base
    group by 1
    )
    , daily_new_users as (
    select min_date,
    -- top_project,
    count(user) as new_count
    from new_users
    group by 1
    )

    , all_users as (
    select date, count(distinct user) as all_count
    from base
    group by 1
    )

    Run a query to Download Data