Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

3-Day Moving Average

For every day return the average sales over that day and up to two preceding days (fewer days at the start), rounded to two decimals.

Table schema

DailySales(sale_date DATE PRIMARY KEY, amount INT)

Sample data

sale_date | amount
2026-01-01 | 100
2026-01-02 | 200
2026-01-03 | 300
2026-01-04 | 400

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.