I have table called subject and I added a new column stdCount.
There is another table called enrollments with columns student_id, subject, year, marks. Mainly this table records for each student which subjects he or she is enrolled in.
Now I need to get the student count for each unit from the enrollments table and update the subject table's stdCount column.
How can I do this ?