I have a Neo4j graph with several relationships, each of them having property y (number). I want to find all shortest paths between node with name 'x' and all other nodes and then, for each of these paths, calculate sum of the path edges properties and return the minimum of these sums.
MATCH paths = allShortestPaths((m)-[r*]-(n))
WHERE m.name = 'x' AND n.name <> 'x'
RETURN n.name, //min(sum(edge.y for y in path) for path in paths) -- something like this
So, is there some way to process each of the found paths independently and apply some function to their edges?
question from:https://stackoverflow.com/questions/65859220/how-to-process-each-of-the-allshortestpaths-in-neo4j