select
date_trunc('day', date) as "Date",
avg (balance/ pow(10, 6)) as "Average Balance",
count(distinct(address)) "Number of Addresses"
from osmosis.core.fact_daily_balances
where currency = 'uosmo'
and "Date" between'2022-10-15' and '2022-10-23'
group by 1