select hour::date as day,
avg(price) as price_usd,
avg (price_usd) over (order by day rows between 6 preceding and current row) as price_ma_7,
avg (price_usd) over (order by day rows between 29 preceding and current row) as price_ma_30
from ethereum.core.fact_hourly_token_prices
where symbol = 'WETH'
and day between '{{ start_date }}' and '{{ end_date }}'
group by 1