Calculate moving avg using sql/biguqery

AVG(users) OVER (ORDER BY day ROWS BETWEEN 6 PRECEDING AND 0 FOLLOWING) AS moving_avg


What about moving average for different categories? For examples, we have date, categories, fee. We would like to calculate the moving avg for each categories.