Reputation: 11317
Having "player" nodes in a Neo4j instance, I am interested to find all players that have the same name and a different shirt number. Basically a SQL group BY of player name and player jersey number.
Any tips?
thanks
Upvotes: 2
Views: 1455
Reputation: 4392
The aggregation you want can be achieved by collect.
START n = node(*)
RETURN n.name, collect(n.tshirt_number)
I made a small example graph:
http://console.neo4j.org/r/1vfeug
Upvotes: 6