I am new to Neo4j. Below is my social graph image which I have created in my Neo4j. Currently I am looking for a Cypher query which will fetch all Friends of "Rohit" who Like "Trekking"
I have tried the following but it is not working.
MATCH (:Profile{name:"Rohit"})-[:Friend]-(p:Profile)
WITH p
MATCH (p)-[l:Like]-(:Hobby{name:"Trekking"})
RETURN l
If you want to return the friend you should return
p
instead ofl
. Moreover, I think you don't need to use aWITH
here (although you can, if you wish), you can try something likeThis should work