MATCH (source:SourceTwittername) WITH count(*) as sources MATCH (source:SourceTwittername)-[rel:FOLLOWER|:FRIEND]->(dest:DestTwittername) WITH type(rel) as type, dest, count(*) as cnt,sources WHERE cnt = sources RETURN type, collect(dest)
> Am 09.03.2015 um 11:47 schrieb Shijo c j <[email protected]>: > > Hi all, > > I have just started using Neo4j.Now I am working with Cypher queries.Here I > am deeply twisted with one intersection query. Here I have Two labels called > SourceTwittername And DestTwittername. > SourceTwittername consist of following > nodes(source1,source2,source3,source4,source5) and > DestTwittername contain following nodes(dest1,dest2,dest3,dest4,dest5).Some > SourceTwittername nodes are followers(relationship) of DestTwittername while > some others are friends(relationship) of DestTwittername. > > Example > > source1-[:follower]->(dest1,dest2) > source1-[:friend]->(dest3,dest4) > > source2-[:follower]->(dest1,dest5) > source2-[:friend]->(dest3,dest4,dest5) > > I want to get nodes which is common in all cases.Here dest1,dest3,dest4 are > common for source1 and source2. > > > I tried a lot using Intersection query, but it doesn't seems working.Any kind > of help will be appreciated. > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
