Greetings,
I have a question about how to perform operations between children nodes. I have a document node(s) with about ~1200 children each containing a single value of a named metric. I'd like to pull two specific related node to create a ratio, then repeat for a list of parent nodes.
I'm thinking of using a user def function or a change in the modeling, but hoping for another opinion.
for example:
match( documents:Document )-[:hasMetric]->(x:Metric {name="revenue })
match( documents:Document )-[:hasMetric]->(y:Metric {name="profit })
...
// for every document, return y.value / x.value
the model is very simple right now as I do not want to over complicate it yet, but is that my issue? Maybe each named metric needs its own relation type, but that would be 1,000s of relation types on millions of nodes.
thanks for any reply, and please let me know how to clarify.
Cheers.