Skip to content

Commit

Permalink
Improve the IC-6 (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
yixinglu authored Jan 31, 2023
1 parent 8635dc4 commit 22e1bf5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nebula/queries/interactive-complex-6.ngql
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
MATCH (person:Person)-[:KNOWS*1..2]-(friend:Person)
WHERE id(person) == $personId AND id(friend) != $personId
WITH DISTINCT friend
MATCH (knownTag:`Tag`{name: $tagName})<-[:HAS_TAG]-(post:Post),
(post)-[:POST_HAS_CREATOR]->(friend:Person),
(post)-[:HAS_TAG]->(t:`Tag`)
MATCH (knownTag:`Tag`{name: $tagName})<-[:HAS_TAG]-(post:Post)-[:HAS_TAG]->(t:`Tag`)
(post)-[:POST_HAS_CREATOR]->(friend:Person)
WHERE t.`Tag`.name != $tagName
RETURN t.`Tag`.name AS tagName, count(id(post)) AS postCount
ORDER BY postCount DESC, tagName ASC
Expand Down

0 comments on commit 22e1bf5

Please sign in to comment.