如何使用联接完成查询。我是数据库的新手。这个查询工作正常..但我想让它更健壮
$query = "SELECT student_id
FROM students
WHERE student_id
IN (
SELECT student_id
FROM class_students
WHERE class_id
IN (
SELECT class_id
FROM class_course
WHERE teacher_id =". $_SESSION['teacher_id']."))";
有没有其他方法可以做到这一点