Hi Have you tried:
return x, count(x) That will accumulate (i.e. roll up) all the occurrences of a particular node - plus you'll know how many times it was connected to. Kind regards ian On 11 July 2011 21:06, noppanit <[email protected]> wrote: > Hi! > > I'm not sure how to do this in Cypher. Basically, I want to count the > outgoing nodes but I don't know the relationships and they're growing. > > For examples, > > Node1---[rel1]------>Node2 > | | > |-------[rel2]----------| > | > [rel3] > | > Node2 > > I want to count all the nodes that connected with Node1 with whatever > relationships. I'm using this query > start n=(1) match (n)--(x) where return x > > X will be 3 because there are three relationships out of Node1, I only want > x=2, because rel1, and rel2 is connected to Node2 as well. I'm not sure I'm > explaining this well. Thanks a lot, I love this community. > > -- > View this message in context: > http://neo4j-user-list.438527.n3.nabble.com/How-to-filter-out-a-visited-node-in-Cypher-tp3160310p3160310.html > Sent from the Neo4J User List mailing list archive at Nabble.com. > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > -- Director of Customer Success, Neo Technology http://neotechnology.com UK: +44 7974 144424 Skype: iansrobinson _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

