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

Running Total of Sales

For every sale date return the daily amount and the cumulative (running) total up to and including that date, ordered by date.

Table schema

Sales(sale_date DATE PRIMARY KEY, amount INT)

Sample data

sale_date | amount
2026-01-01 | 100
2026-01-02 | 150
2026-01-03 | 50

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.