Postgresql – How to calculate the values of child-tables by using ForeignKey from a parent-table
My purpose is to gain averages of values stored in child-tables depending on each parent-table. In my case, I want to gain averages of satisfaction stored in the Evaluation model (child) depending on each Professor model (parent). models.py class Professor(models.Model):…