diff --git a/nebula/queries/interactive-complex-6.ngql b/nebula/queries/interactive-complex-6.ngql index 47b72d49a..6a5a5e689 100644 --- a/nebula/queries/interactive-complex-6.ngql +++ b/nebula/queries/interactive-complex-6.ngql @@ -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