I have a datamodel with a to-many to-many relationship. Using an example employee database, suppose that a department unit is associated with a department, which, in turn, is associated with an employee. The employee has an attribute salary. What is the best way to have an attribute at the division level, which is obtained from the salary attribute. For example, the average salary or maximum salary.
I need these attributes to sort the list of departments.
source
share