SQL Practice Logo

SQLPractice Online

Scenario SQL Question

Employees with Higher Salaries than Department Average

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

Problem Statement

Find employees whose salary exceeds their department's average salary. Show by how much (percentage). Return employee_id, first_name, last_name, department_name, salary, avg_salary, percentage_above_avg — ordered by percentage_above_avg DESC, employee_id.

Relevant Tables

employeesdepartments

SQL Concepts Used in This Scenario

Strengthen your understanding with these targeted learning topics: