Issues writing a query that would fetch the second degree friends of Abiodun considering the pattern and the relationships

Viewed 19

As a newbie, I am trying to write a cypher query that would fetch the second-degree friends of Abiodun(node) considering the pattern and the relationships.

Initial codes

1) CREATE (abiodun:Person {name:"Abiodun"})
   RETURN abiodun

2) MATCH (abiodun:Person {name:"Abiodun"})
   CREATE (abiodun)-[like:LIKE]->(neo:Database {name:"Neo4j" }) 
   RETURN abiodun,like,neo

3)MATCH (abiodun:Person {name:"Abiodun"})
  FOREACH (name in ["Rajesh","Anna","Julia","Andrew"] |
  CREATE (abiodun)-[:FRIEND]->(:Person {name:name}))

4)MATCH (neo:Database {name:"Neo4j"})
  MATCH (anna:Person {name:"Anna"})
  CREATE (anna)-[:FRIEND]->(:Person:Expert {name:"Amanda"})-[:WORKED_WITH]->(neo) here

Actual issue(what i did so far

MATCH (abiodun) WHERE not ((abiodun)-[:FRIEND]->(myFriends)) 
RETURN n

enter image description here

I am trying to write a query that will display only Amanda

1 Answers
Related