TGViewer
Data Analyst Interview Resources Data Analyst Interview Resources @dataanalystinterview · 52.6K subscribers
Post #2399 1.39K
🔥 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.
  • ❤ 4
More from @dataanalystinterview
  1. Oct 1, 2026🔥 Top 10 Theoretical Interview Questions Every Data Analyst Must Prepare 📊 Data Analyst…
  2. Sep 29, 2026🚀 Excel Formulas Fundamentals — Part 10 📊 Conditional Functions (SUMIF, SUMIFS, COUNTIF,…
  3. Sep 29, 2026𝗙𝗥𝗘𝗘 𝗥𝗲𝘀𝗼𝘂𝗿𝗰𝗲𝘀 𝗧𝗼 𝗟𝗲𝗮𝗿𝗻 𝗔𝗜 𝗶𝗻 𝟮𝟬𝟮𝟲🚀 ​ Explore 6 free resource…
  4. Sep 29, 2026📊 Tableau Learning Roadmap — Part 2 Connecting to Data Before creating visualizations in…
  5. Sep 28, 2026This is useful when you want to guide someone through an analytical narrative. The Tableau…
  6. Sep 28, 2026📊 Tableau Learning Roadmap — Part 1 What is Tableau? Tableau is a Business Intelligence a…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →