This should work:
MATCH (n:Actor)-->(m:Movie)
WHERE NOT (n)-->()<--(:Stuntman)
RETURN n AS actor, collect(m) AS movies
Greetings
PS: there is another solution, but I find it less productive:
MATCH (n:Actor)
WITH n AS actor, collect(m) AS movies
WHERE all(m IN movies WHERE not (m)<
RETURN actor, movies
source
share