NDuv7. Daily New User + Cumulative User
    Updated 2024-07-25


    with tb1 as (
    select block_timestamp,
    from_address user
    from thorchain.core.fact_transfers
    )
    ,tb2 as (
    select
    min(block_timestamp) min,
    user
    from tb1
    group by 2
    )
    select date_trunc('day',min) daily,
    count(distinct(user)) as "New User",
    sum("New User")over(order by daily) as "Cumulative User"
    from tb2
    where min::date >= current_date - 30
    group by 1


    QueryRunArchived: QueryRun has been archived