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

Daily Closing Balance

Given transactions per date, return each date with the closing balance (cumulative sum up to and including that date). Order by date.

Table schema

Txns(txn_date DATE, amount INT)

Sample data

txn_date | amount
2026-05-01 | 100
2026-05-01 | -40
2026-05-02 | 30
2026-05-04 | -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.