I was needing to check what different labels present in graph database neo4j.
How to get different labels and their count in neo4j by cypher query?
I finally found a solution to the multiple label problem that is less complicated:
MATCH (a) WITH DISTINCT LABELS(a) AS temp, COUNT(a) AS tempCnt
UNWIND temp AS label
RETURN label, SUM(tempCnt) AS cnt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With