I have 2 tables
- Payments : Below are the columns
- Student (Ref To another table also)
- Num Of Sessions
- Amount
- FeeForTheMonth
- StudentsSessionInfo : Below are the columns
- Student
- TotalSessionsAllowed (This value needs to be updated , once a new row is added in the above table , existing value + value from above table (Num of sessions) are to be added)
- Month
- Year
There will only be 1 row in StudentsSessionInfo for per student per month per year , but multiple rows per student per month in Payments table.
I’m having difficulty in achieving the above result, please help.