I have seen a similar question here Find ALL the prerequisites for a given course. My question is similar on the tables. I have the following tables:
Student_