jcintra
jcintra

Reputation: 877

How to get the actors with more than one movie on the neo4j Movie Graph

I'm playing with the Movie Graph from Neo4J to learn more about Cypher. I want to get the actors that entered in more than one movie. How can I create such query?

Upvotes: 0

Views: 290

Answers (1)

cybersam
cybersam

Reputation: 66999

Here is a performant way to get actors that acted in multiple movies (using a cheap degreeness check):

MATCH (a:Person)
WHERE SIZE((a)-[:ACTED_IN]->()) > 1
RETURN a

Upvotes: 5

Related Questions