gabriel Ok,i'll try to make it clear, so let me describe the real senario: I have relation called people that has some contact information such as forename, surname, mobile number, email and ...
also there is another relation that called building and has some information about building such as name, unit count and ... but for now only name matter.
also there is another relation called building_people_relation that hold how people and building related to each other in different times. it include from_date , people (n:1 relation), building (n:1 relation) and relation_type(n:1 relation).
relation_type is another relation holding predefined value like: guest, owner, resident and ...
it means that many people can be related to many building during time.
what is important to me is the last relation of each person to buildings. how can i get those records to show inside a list?
for example if we have following data in building_people_relation :
joe 2024/01/01 building_no_1 resident
joe 2024/05/10 building _no_1 owner
tom 2024/03/03 building _no_1 guest
tom 2024/03/03 building_no_2 resident
tom 2024/09/08 building_no_2 owner
i want to show following data in list :
joe 2024/05/10 building _no_1 owner
tom 2024/03/03 building _no_1 guest
tom 2024/09/08 building_no_2 owner
i tried to group list columns on people and building and use max aggregate function on from_date .. but i dont know how to get the correct relation type! (how ever it is easy to reach the goal using sql )