Hi. I'm learning neo4j and I have to make a simple query, but I'm not able to make it.
Suppose to have the graph below.
I want to return all the nodes connected to the node A
and the maximum of the values on the edges between two consecutive nodes(which is an attribute of the relation). I show an example in the picture below.
I did it for path of length one with this query:
MATCH (p {id:"A"})<-[r:HAS]-(t)
RETURN p,max(r.value),t
But I don't know how to make a query for a path longer than one, just because I can't do
MATCH (p {id:"A"})<-[r:HAS*]-(t)
RETURN p,max(r.value),t
I got this error : Type mismatch: expected Map, Node, Relationship, Point, Duration, Date, Time, LocalTime, LocalDateTime or DateTime but was List