Cypher - calculate the correspondence between 2 entities

Viewed 23

I am new to Cypher, I have a bit of trouble with a query, so my query consists of calculating the number of matches between two entities, I managed to do it in SQL to be able to translate it into Cypher but I didn't can't do it ... here is my SQL request :

SELECT count(*) 
FROM Dogs 
INNER JOIN Cats ON condition
1 Answers

With a presumption about your graph, this might do it

(d:Dog)-[:condition]-(c:Cats) return count(*)

or, if you want to know the count by condition

(d:Dog)-[r:condition]-(c:Cats) return type(r) as condition, count(*) as ct
Related