with tab1 as
(select
distinct TX_SIGNER as user,
min(BLOCK_TIMESTAMP) as first_day
FROM near.core.fact_transactions
group by 1)
select
date_trunc('week',first_day::date) as weekly,
count(distinct user) as new_users,
sum(new_users) over (order by weekly) as cumulative_new_users
from tab1
group by 1
order by 1