Angela Thompson interacts with Braveheart movie. Recommend her a Movie based on other users who

Angela Thompson interacts with Braveheart movie. Recommend her a Movie based on other users who have also seen Braveheart.

Hello,

I've been trying to code the above from the MovieLens database but i dont get it right. This is what i did so far, can someone help please?

MATCH (u1:User{name:"Angela Thompson"})

MATCH(m1:Movie {title: "Braveheart"})

MATCH (u1:User{name:"Angela Thompson"})-[:RATED]->(m1:Movie)-[:IN_GENRE]->(g:Genre)<-[:IN_GENRE]-(m2:Movie)<-[:RATED]-(m1:Movie {title: "Braveheart"})

WITH COUNT(*) AS usersWhoAlsoWatched

RETURN *;

What is your database model?

Hello glilienfield,

I am using the MovieLens database

Execute this command in Neo4j Browser:

CALL db.schema.visualization();

and upload the result here.

This is what i got
(migrated from khoros post Re: Angela Thompson interacts with Braveheart movi... - Neo4j - 58260)

This query should do what you want:

MATCH (u:User {name: "Angela Thompson"})-[:RATED]->(:Movie {title: "Braveheart"})<-[:RATED]-(:User)-[:RATED]->(m:Movie)
RETURN m.title AS movie, count(*) AS count

It only gives me a table, how do i get the graph?

What graph do you want? If you want to see Movie nodes, just do:

RETURN m, count(*) AS count

i want to see this graph