I am using one of the neo4j practice graphs (see below) to learn cypher and running a query to search for people who both acted int and directed a movie, I'm running the following commands:
:play movie graph
MATCH (p:Person)-[a:ACTED_IN]->(m:Movie)<-[d:DIRECTED]-(p)
RETURN p,m,a,d,type(a),type(d)
I few things don't make sense:
- for some rows in the result
type(a)is notACTED_INbutPRODUCERorWROTEetc. - a lot of nodes are returned which don't seem to satisfy this pattern
- using
OPTIONAL MATCHworks exactly right but I don't know why?
Any help would be much appreciated