SectionΒ 2. ChapterΒ 7
single
Challenge: Employees Without Projects
Swipe to show menu
Task
Swipe to start coding
Write a SQL query to list all employees who are not assigned to any project.
- Use the
employeesandassignmentstables. - Select
employee_idandnamefrom theemployeestable. - Use a
LEFT JOINonemployee_idto include all employees regardless of whether they have an assignment. - Filter results using
WHERE a.assignment_id IS NULLto keep only employees with no matching row inassignments.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 7
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat