cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Some question about filtering out unwanted relationship

Hi all, I could like to find out which pairs of stock price have correlation over 0.85 in last year.

I input the following in Neo4J:

MATCH (a)-[c:Correlation]-(b)
#Find out the relationship with correlation>0.85 & Exclude relationships with the stock itself (the correlation must be 1)
WHERE c.correlation > 0.85 and a<>b
Return *
The outcome:

I founded out there are 2 pairs with correlations higher than 0.85 (highlighted in yellow)
But some extra relationships (less than 0.85) are also included in the graph.
May I have some recommendations that how can I excluded those extra relationship when inputting order to Neo4J. Thanks!

1 ACCEPTED SOLUTION

can you uncheck connect result nodes under settings and test it.

Hello @dirkchin63, welcome to Neo4j community.

Please, match the exact relationship and relationship properties also.

2X_3_36298e0a5ff77404d918d520b536f5a22bd63be0.png

View solution in original post

2 REPLIES 2

can you uncheck connect result nodes under settings and test it.

Hello @dirkchin63, welcome to Neo4j community.

Please, match the exact relationship and relationship properties also.

2X_3_36298e0a5ff77404d918d520b536f5a22bd63be0.png

Done! I am a newcomer of Neo4J and Thank you very much for your help!