Skip to content

3.13 One anchor, many keys — joining on a list-valued property

A property that holds several values is several keys, not one. If a trial lists three collaborators, each is looked up in its own right:

MATCH (t:ClinicalTrial)-[:COLLABORATES_WITH]->(c:CorporateEntity)
WHERE t.nctId = 'NCT01234567'
RETURN c.name, c.ultimateOwner

The join declares keyField: collaborators, and that property is a list. Blank and duplicate entries are dropped, so a name shared by two trials is fetched once — and because CorporateEntity declares an identity, both trials end up pointing at the same node. That is what makes counting possible: the question “which company appears across the most trials” only has an answer if one company is one node.