Ezvor

579. Find Cumulative Salary of an Employee

HardDatabase Preparing judge… LeetCode
Database

Hints

Hint 1
Seem hard at first glance? Try to divide this problem into some sub-problems. Think about how to calculate the cumulative sum of one employee, how to get the cumulative sum for many employees, and how to except the most recent month of the result.
Hint 2
Use the technique of self-join if you have only one table but to write a complex query.
Hint 3
Still remember how to use the function `sum` and `max`?