Glossary

self-join

the enrollments table is joined with itself, using different aliases (`e1` and `e2`). The `WHERE` clause filters so that `e1` only has CS101 records and `e2` only has CS201 records, while the `ON` clause ensures they're the same student.

Learn More

Related Terms