select
date(date) as day,
DAILY_ACTIVE_WALLETS as "Daily Active Wallets",
sum("Daily Active Wallets") over (order by day asc) as "Cumulative Daily Active Wallets",
avg("Daily Active Wallets") over (order by day asc rows between 14 preceding and current row) as "Moving Average"
from
near.core.metrics_active_wallets
where date>CURRENT_DATE-90