'How to create a node with multiple relationship NEO4J

I wondered if someone knew how to create this following graph using Neo4J.

The main issue is when it comes to create two relationship with node called 'John'

Thanks a million in advanceenter image description here



Solution 1:[1]

I don't see the problem. To create such graph you can do the following query:

create (john:Person {name: 'John'})
create (sara:Person {name: 'Sara'})
create (joe:Person {name: 'Joe'})
create (maria:Person {name: 'Maria'})
create (steve:Person {name: 'Steve'})

merge (john)-[:FRIEND]->(sara)
merge (john)-[:FRIEND]->(joe)
merge (sara)-[:FRIEND]->(maria)
merge (joe)-[:FRIEND]->(steve)

What is the issue you are referring to?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Sbunzini