RANGE vs ROWS Running Total
Hard
Window Frames
Return each row's day, amount and the running total computed with the default RANGE frame ordered by day, so rows with the same day share the same running total. Order by day, then amount.
Table schema
Sales(day INT, amount INT)Sample data
day | amount
1 | 10
2 | 20
2 | 30
3 | 40
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.