AnalystPath

Employees Earning Above Company Average

SQLMediumMid level~15 min

Problem

**[Classic — asked at multiple companies]**

Find all employees whose salary is **above the company-wide average**.

Return `name`, `department`, and `salary`, ordered by salary descending.

Tables

Example rows — the live problem includes the full dataset.

employees
employee_idnamedepartmentsalary

Expected output

Your answer should return 2 rows with the columns name, department, salary.

Starter code (SQL)

SELECT *
FROM employees;

Solve this SQL question free

Write SQL and run it instantly in your browser — even on your phone. No signup needed to try.

Solution & explanation

Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.

Sign up free to unlock

Related SQL questions