The Question
SQLMonthly Departmental Salary Benchmarking
Given a salary ledger and employee department mappings, write a SQL query to benchmark each department's monthly average performance against the overall company average for that same month. The output should categorize each department as 'higher', 'lower', or 'same' compared to the company-wide mean, formatted by month (YYYY-MM).
PostgreSQL
Window Func
CTE
TO_CHAR
CASE Statement
JOIN