I'm trying to learn Neo4j and am currently playing around with the movie graph, by opening a neo4j browser, entering
:play movie graph
and following the instructions. The instructions provide like this:
<500 lines of CREATE statements>
WITH TomH as a
MATCH (a)-[:ACTED_IN]->(m)<-[:DIRECTED]-(d) RETURN a,m,d LIMIT 10;
which creates the movie graph database, and displays a small subgraph consisting of 10 movies that Tom Hanks acted in, and their directors. However, when I try to just return this subgraph, i.e. without creating the graph again by simply running the last two lines, I get
Variable `TomH` not defined (line 1, column 6 (offset: 5))
"WITH TomH as a"
Can anybody explain why this is?