Cumulative Monthly Sales by Store with Month Reset (SQL)
You have a sales table with columns: date, store_id, amount.
Compute cumulative sales by store, but reset the cumulative total to 0 whenever a new month starts (i.e., cumulative sum wit...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
