I have a multigraph and I am interested in counting the number of edges connecting each pair of nodes; moreover, I would need to get, for each pair of nodes, the maximum value of a certain attribute.
Unfortunately it seems to me we can use .group().by(...)
with one attribute only, while I would need to group by inV
and outV
.
In Cypher I would write something like
MATCH (e0: Employee)-[fb: R]-> (e1: Employee)
WITH e0, e1, count(*) AS frequency, min(fb.value) AS min_val
RETURN e0, e1, frequency, min_val
Can anybody help?
Cheers!