I have a non-cyclical graph, where all the nodes are of type (label) Entity and all relationships are of type OWNS. Each relationship is guaranteed to have a property Percentage, which is the numeric data type. Each node has an Id field (different from the internal id that Neo4j uses).
Given a starting node and target node, the path between them can have 1 relationship or many in between (if there are many nodes in that path). Using Cyper, how can I return the total percentage between the starting and target node? This can be complicated because the paths aren’t always linear. I’ve attached a picture example below.
I only started using Neo4j a week ago, so this is the very simplistic query I’ve written just to show the nodes and relationships given a starting and target node:
MATCH p=(:Entity {Id: "<STARTING ID>"})-[:OWNS*]->(:Entity {Id: "<TARGET ID>"})
RETURN p
However, instead of showing the graph, I would just like the calculated percentage between them.
Example: