SQL Practice Logo

SQLPractice Online

Scenario SQL Question

Running Total of Salaries Per Department (Explicit Frame)

Build mastery in Ctes Window with this scenario-based SQL challenge and live execution support.

Problem Statement

Within each department, compute a running total of salary ordered by hire_date (ties broken by employee_id). Use an explicit ROWS frame. Return first_name, last_name, hire_date, salary, department_name, running_total — ordered by department_name, hire_date, employee_id.

Relevant Tables

employeesdepartments

SQL Concepts Used in This Scenario

Strengthen your understanding with these targeted learning topics: