Hi.I'm Nizam.
Sorry if the question I asked is unclear.
I have the table as below
Classroom
- id
- capacity
- code
- ......
Schedule
- id
- group_id
- classroom_id
- ......
The schedule will be filled with the group and classroom.
My problem now is how can I retrieve the classrooms from table Classroom that is based on the occurence of classroom_id in Schedule table.
Let say.. we have classroom {1,2,3,4,5,6,7} ..
the occurence of classroom_id = 2 in Schedule is 8 times.
And I want to select classroom from Classroom table that contains less than 8 occurence in Schedule table which will only give result {1,3,4,5,6,7}.