Summarise data by a criteria which is in another matrix

Solved2.29K viewsFormulas and FunctionsAverage select Summary

In the attached simple model, I have a table named Marks which contains marks by student by course. In another table named Demographics, I have the students names and gender. I want to populate a third table, named Marks by Gender, based on the average marks by gender for each course. How can I do that ?
Many thanks in advance

Answered question