Eman-RazAverage Number of Users
    Updated 2025-03-22
    with overview as (with table1 as (select date_trunc('day',block_timestamp) as "Date", count(distinct from_address) as "Total Users"
    from ronin.core.fact_transactions
    where tx_succeeded='TRUE'
    group by 1),

    table2 as (with tab1 as (select from_address as user, min(block_timestamp::date) as first_date
    from ronin.core.fact_transactions
    where tx_succeeded='TRUE'
    group by 1)

    select date_trunc('day',first_date) as "Date", count(distinct user) as "New Users"
    from tab1
    group by 1)

    select table1."Date", "Total Users", "New Users", "Total Users"-"New Users" as "Active Users"
    from table1 left join table2 on table1."Date"=table2."Date")

    select round(avg("New Users")) as dnu, round(avg("Active Users")) as dau
    from overview

    Last run: about 1 month ago
    DNU
    DAU
    1
    45663736104
    1
    16B
    9s