← SQL & Databases
#6 most askedVery commonEasySelf joins & CTEs

Employees Earning More Than Their Managers

🏢 Asked in real interviews
No reports yet. Were you asked this? Be the first to say where.
I was asked this

employees.manager_id points to another row in employees. Return the name of each employee who earns more than or the same as their manager. (Order doesn't matter.)

🧪 Practice

Write the query, then press Run tests to compare your rows with the expected result.

SQL
SELECT *
FROM employees;

Output appears here. Press Run or Ctrl/⌘ + Enter.

Try it first. Struggling for a few minutes is how it sticks.