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!

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.


1 Like

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