Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
On page:
http://guides.neo4j.com/4.0-intro-neo4j-exercises/05.html
Exercise 5.6
Blockquote
Write a Cypher query to retrieve all people in the graph whose name begins with Tom and optionally retrieve all people named Tom who directed a movie.
And the answer is:
MATCH (p:Person)
WHERE p.name STARTS WITH 'Tom'
OPTIONAL MATCH (p)-[:DIRECTED]->(m:Movie)
RETURN p.name, m.title
I think the Question would be better worded as:
Return all persons who's name begins with Tom and optionally return the name of a movie that this person directed.