I’m really new to NEO4J and currently testing some simple Cypher queries.
I want to model users and their hobbies, where one user can have multiple hobbies.
Users and their hobby are created as nodes with the respective labels :User and :Hobby.
I can easily find users that are doing the hobby “Sport” or “Music”:
WHERE h.name = "Sport" OR h.name = "Music"
Result: Max, Joe
But how can I find users that are doing both the hobbies “Sport” AND “Music”?
In this case the query should only return the user “Max”.
Many thanks for your help.