I rather think you want to do. start n=(1) match (n)-[r]-(x) where r~TYPE != :REL3 return count(x)
Could you please try that. Cheers Michael Am 11.07.2011 um 22:42 schrieb David Montag: > Hi, > > It sounds like you want to: > > return distinct x > > David > > On Mon, Jul 11, 2011 at 1:06 PM, noppanit <noppani...@gmail.com> 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 >> User@lists.neo4j.org >> https://lists.neo4j.org/mailman/listinfo/user >> > > > > -- > David Montag <david.mon...@neotechnology.com> > Neo Technology, www.neotechnology.com > Cell: 650.556.4411 > Skype: ddmontag > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user