SQL Interview Question of the Day 📌 Scenario: An organization wants… — Cloudydata — TG.ME

🔥 SQL Interview Question of the Day

📌 Scenario:

An organization wants to find employees who earn more than their managers.

You have one table:

employees

• employee_id
• employee_name
• salary
• manager_id

Solution:

SELECT
e.employee_name,
e.salary,
m.employee_name AS manager_name,
m.salary AS manager_salary
FROM employees e
JOIN employees m
ON e.manager_id = m.employee_id
WHERE e.salary > m.salary;

💡 Concept Tested:

SELF JOIN

❤️ React if you want more SQL interview questions.
❤7
August 31, 2026 369 5