I have one label called Person and another one called Dirs. They structure is as follows:
Thomas;London; (etc etc)
And the table Dirs contains just the unique values for all the different Directions:
Paris; (etc etc)
I have already created a relation called lives, which links all the persons with the city to which they belong. So at the end, for example I have the city of Londo with Maria and Thomas connected.
Here is my code:
MATCH (n:Person), (b:Dirs)
WHERE n.dir = b.dir
However, as my label contains thousands of nodes, at the end I have some directions that have just one node linked. I would like to filter by counting all the linked nodes so at the end, for example, I get all those cities that have more than 2 persons linked.
Thanks a lot