Use OPTIONAL MATCH to get Q15 Cypher implementation correct
@@ -17,7 +17,8 @@ WITH country, floor(socialNormalFloat) AS socialNormal
MATCH
(country)<-[:IS_PART_OF]-(:City)<-[:IS_LOCATED_IN]-(person2:Person)
MATCH
- (country)<-[:IS_PART_OF]-(:City)<-[:IS_LOCATED_IN]-(friend2:Person),
+ (country)<-[:IS_PART_OF]-(:City)<-[:IS_LOCATED_IN]-(friend2:Person)
+OPTIONAL MATCH
(person2)-[:KNOWS]-(friend2)
WITH country, person2, count(friend2) AS friend2Count, socialNormal
WHERE friend2Count = socialNormal
