Exercise: Courses Without Students
Find courses with no students.
Solution
sql
1SELECT c.course_name
2FROM courses c
3LEFT JOIN students s ON s.course_id = c.id
4WHERE s.id IS NULL;
Find courses with no students.
1SELECT c.course_name
2FROM courses c
3LEFT JOIN students s ON s.course_id = c.id
4WHERE s.id IS NULL;