0xHaM-dNew & Active Users
    Updated 2024-04-16
    -- forked from h4wk / sei new account @ https://flipsidecrypto.xyz/h4wk/q/8HPR27HKPgKC/sei-new-account

    with userTb as (
    select
    tx_from as user,
    block_timestamp :: date as date
    from
    sei.core.fact_transactions
    WHERE
    block_timestamp >= '2023-08-15'
    ),
    new_usrTb as (
    select
    tx_from,
    min(block_timestamp) as min_date
    from
    sei.core.fact_transactions
    WHERE
    block_timestamp >= '2023-08-15'
    group by
    1
    ),
    daily_new_usrTb as (
    select
    min_date :: date as first_date,
    count(tx_from) as new_usrs,
    sum(new_usrs) over (
    order by
    first_date
    ) as cum_new_usr
    from
    new_usrTb
    group by
    1
    ),
    total_users as (
    QueryRunArchived: QueryRun has been archived