Exercise: Find Unmatched
Find students without courses.
Solution
sql
1SELECT s.name
2FROM students s
3LEFT JOIN courses c ON s.course_id = c.id
4WHERE c.id IS NULL;
Find students without courses.
1SELECT s.name
2FROM students s
3LEFT JOIN courses c ON s.course_id = c.id
4WHERE c.id IS NULL;