Interview practice question
Employees earning more than their manager
Data Engineering · SQL · Beginner
Given an employees table with id, name, salary and manager_id, find employees who earn more than their managers.
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Self join employees to employees on manager_id = id.
- Compare employee salary with manager salary.
- Inner join drops employees without a manager, which is correct here.
- Use clear aliases like e and m.
- Output employee name and both salaries.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.