MATCH (n:User{id:'id'}) - [:HAS_FAX_NUMBER] -> () <-[:HAS_FAX_NUMBER]-(m1)
WITH distinct n,m1
MATCH p = allShortestPaths((n)-[*..2]-(m1))
RETURN m1.fhid AS SuggestedUser, COUNT(p) as Connections
UNION
MATCH (n:User{id:'id'}) - [:HAS_PHONE_NUMBER] ->() < - [:HAS_PHONE_NUMBER] -(m2)
WITH distinct n,m2
MATCH p = allShortestPaths((n)-[*..2]-(m2))
RETURN m2.fhid AS SuggestedUser, COUNT(p) as Connection
Michael
> --
> 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
neo4j+un...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.