TGViewer
Data Analyst Interview Resources Data Analyst Interview Resources @dataanalystinterview · 52.6K subscribers
Post #2404 1.34K
🔥 SQL Interview Question of the Day

📌 Scenario:

A university wants to find students who have never enrolled in any course.

You have two tables:

students

• student_id
• student_name

enrollments

• enrollment_id
• student_id
• course_id

🎯 Task:

Find all students who have never enrolled in any course.

☑ Solution:

SELECT
s.student_id,
s.student_name
FROM students s
LEFT JOIN enrollments e
ON s.student_id = e.student_id
WHERE e.student_id IS NULL;

💡 Concept Tested:

LEFT JOIN + NULL Filtering (Finding Missing Records)

❤️ React if you want more SQL interview questions.
  • ❤ 5
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 →