Sample Header Ad - 728x90

Why `MATCH (p:Person)-[:ACTED_IN]->(m) WHERE 'Neo' IN r.roles RETURN p.name` returns 3 rows for only 1 node?

0 votes
1 answer
32 views
In Neo4j, when I use the following query: MATCH (p:Person)-[:ACTED_IN]->(m) WHERE 'Neo' IN r.roles RETURN p then it returns only one Person node. But when I change the query to: MATCH (p:Person)-[:ACTED_IN]->(m) WHERE 'Neo' IN r.roles RETURN p.name then it returns 3 rows. Neo4j query results This is strange to me since I expect there should be only one row returned?
Asked by Kt Student (115 rep)
Feb 7, 2025, 03:18 AM
Last activity: Feb 7, 2025, 05:43 PM