select
date_trunc('day',b.block_timestamp) as date,
count(distinct a.address) as new_wallets,
sum(new_wallets) over (order by date asc rows between unbounded preceding and current row) as cumulative_new_wallets
from algorand.account a
left join algorand.block b on b.block_id = a.created_at
where b.block_timestamp >= '2022-01-01'
AND account_closed = 'FALSE'
AND balance > 1
group by date
order by date desc