cumulative_salaries that selects employee_id, experience, salary, and calculates the cumulative sum of salaries over each partition of experience, ordered by salary in ascending order.experience and count the number of employee_id where the cumulative sum is less than or equal to the budget (70000) for seniors.experience and count the number of employee_id where the cumulative sum is less than or equal to the remaining budget for juniors.UNION ALL clause to get the final result.
erDiagram
Candidates {
int employee_id
enum experience
int salary
}