#806

Smooth daily revenue with a 3-day rolling average

Marketing smooths daily revenue noise with a three-day moving average — weekends and one-off spikes stop yanking the trend, and the long-term signal becomes clearer. For every day compute the average revenue over that day and the two previous ones, rounding the result to two decimal places. Sort by day.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.

davg_3d
2024-01-01100.00
2024-01-02110.00
2024-01-03110.00

Your query result will appear here