Skip to content

Commit 8dd99b2

Browse files
committed
Clarify BI Q6 comments
1 parent 29d4214 commit 8dd99b2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cypher/queries/bi-6.cypher

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
*/
55
MATCH (tag:Tag {name: $tag})<-[:HAS_TAG]-(message2:Message)-[:HAS_CREATOR]->(person1)
66
OPTIONAL MATCH (message2)<-[:LIKES]-(person2:Person)
7-
OPTIONAL MATCH (person2)<-[:HAS_CREATOR]-(message3:Message)<-[like:LIKES]-(p3:Person)
7+
OPTIONAL MATCH (person2)<-[:HAS_CREATOR]-(message3:Message)<-[like:LIKES]-(person3:Person)
88
RETURN
99
person1.id,
10-
count(DISTINCT like) AS authorityScore // 'DISTINCT like' ensures that each p2's popularity score is only added once for each p1
10+
// Using 'DISTINCT like' here ensures that each person2's popularity score is only added once for each person1
11+
count(DISTINCT like) AS authorityScore
1112
ORDER BY
1213
authorityScore DESC,
1314
person1.id ASC
1415
LIMIT 100
16+
17+
// We need to use a redundant computation due to the lack of composable graph queries in the currently supported Cypher version.
18+
// This might change in the future with new Cypher versions and GQL.

0 commit comments

Comments
 (0)