I have a polygon layer with area geometries of parcels and tables with contracts, with owners / users linked by means of a link table in many to many relationships. This is because some parcels may have multiple owners and each owner may have multiple and different contracts to certain parcels. Can I, and if so how, do a query of a related layer/table in the expression editor or define a style so that I query attributes of a related table? For example, I would like to know or display how many parcels of a particular owner already have contracts. What is the correct expression for querying a value of another realted layer?
my exemplatory set up:
table: owner
fid | owner |
---|---|
1 | Miller |
2 | Andrews |
3 | ... |
table: contracts
fid | contract |
---|---|
1 | 20230901 (Hyperlink) |
2 | 20190628 (Hyperlink) |
3 | ... |
polygon: parcels
fid | parcel |
---|---|
1 | parcel 23 |
2 | parcel 44/6 |
3 | parcel 789 |
4 | ... |
link table: links
fid | parcel | owner | contract |
---|---|---|---|
1 | 3 | 2 | 2 |
2 | 1 | 2 | 2 |
3 | 2 | 1 | 1 |
4 | ... | ... | ... |