I hope you can help me. I want to count for every node all its neighbours sperated by the type of relationship. For example if i got this graph:
I want to get for Node 165 following:
id AnzTaxi AnzBus AnzSchiff
165 2 2 0
I made this query, but it seems like neo4j connects my "Match" as an AND so it will only list nodes, which got at least 1 relationship at every type.
MATCH (Station)-[:TAXI]-(b)
MATCH (Station)-[:BUS]-(c)
MATCH (Station)-[:SCHIFF]-(d)
RETURN Station.id, COUNT(DISTINCT b) AS AnzTaxi,
COUNT(DISTINCT c) AS AnzBus, COUNT(DISTINCT d) AS
AnzSchiff
ORDER BY COUNT(DISTINCT b) DESC;
Many thanks in advance!