select
date_trunc('day',date) as date,
count(address) as UST_wallets,
sum(UST_wallets) over (order by date asc rows between unbounded preceding and current row) as UST_cumulative
from terra.daily_balances
where balance > 5 AND
currency = 'UST'
group by date
order by date