I have a graph for cities with 6 cities, and only two of them have a relationship between them. I would like to write a query that gives me all the cities along with all the relationships in between them.
MATCH (n) RETURN n
The query above only gives me the nodes and not the relationships.
If I would like to have all the nodes along with all the relationships, what query may I use?
2
Answers
you can try the below query
here "-[r]-()" matches all the relationships in the graph.
let me know if this helps.
You can use the RIGHT JOIN clause, just like this:
In your case, it will show you this: