MATCH (n:Person)-[:KNOWS]->(m:Person)
WHERE n.name = 'Alice'

Node patterns can contain labels and properties.

MATCH (n)-->(m)

Any pattern can be used in MATCH.

MATCH (n {name: 'Alice'})-->(m)

Patterns with node properties.

MATCH p = (n)-->(m)

Assign a path to p.

OPTIONAL MATCH (n)-[r]->(m)

Optional pattern: nulls will be used for missing parts.

Comments