cyphernear dash - new and active users
    Updated 2023-04-13
    with
    first_tx as (
    select
    tx_signer,
    min(block_timestamp) as timestamp
    from
    near.core.fact_transactions
    group by
    1
    ),
    daily_new_users as (
    select
    date(date_trunc('day', timestamp)) as date,
    count(*) as n_new_users
    from
    first_tx
    group by
    date
    ),
    active_users as (
    select
    date(date_trunc('day', block_timestamp)) as date,
    count(distinct (tx_signer)) as active_users
    from
    near.core.fact_transactions
    group by
    1
    )
    select
    *
    from
    daily_new_users
    join active_users using (date)
    Run a query to Download Data