Sorry for my bad English
Situation: I have 3 tables class, courses, and subjects.
Class has attributes (Id,name) and has a relation many to many with courses because many class can have the same courses
So, I created a pivot table named
class_course which contain (id, class_id, course_id)
Courses : (id, name)
Courses has a one to many relation with subjects.
I want to filter subject by class for get all subjects for a specific class in a specific courses.
Thank you.