MATCH (Person {name: 'Lana Wachowski'})--(movie)
RETURN movie
Using the above query, we are getting all nodes that are related to the node that has the name value 'Lana Wachowski'. The query will return all the nodes either is a movie label node or person label node if they are related to the node that has a name-value as Lana Wachowski.
MATCH (Person)--(movie)
RETURN movie
MATCH (p:Person)--(m)
WHERE ID(p) = 3
RETURN m
//Get all nodes
MATCH (:Person {name: 'J.T. Walsh'})--(m:Movie)
RETURN m
//Get title only
MATCH (:Person {name: 'J.T. Walsh'})--(m:Movie)
RETURN m.title
0 Comments