Skip to content

Commit

Permalink
Update 3.go.md (#2555)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-YiYeXingChen authored May 17, 2024
1 parent 3c5ee66 commit 478432b
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions docs-2.0-zh/3.ngql-guide/7.general-query-statements/3.go.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,19 +213,18 @@ nebula> MATCH (v)<-[e:follow]- (v2) WHERE id(v) == 'player100' \
场景:使用子查询的结果作为图遍历的起始点。

```ngql
# 查询 player100 的朋友和朋友所属队伍
nebula> GO FROM "player100" OVER follow REVERSELY \
# 查询 player100 年龄大于 20 的朋友和这些朋友所属队伍
nebula> GO FROM "player100" OVER follow \
YIELD src(edge) AS id | \
GO FROM $-.id OVER serve \
WHERE properties($^).age > 20 \
YIELD properties($^).name AS FriendOf, properties($$).name AS Team;
YIELD properties($^).name AS Friend, properties($$).name AS Team;
+---------------------+-----------------+
| FriendOf | Team |
| Friend | Team |
+---------------------+-----------------+
| "Tim Duncan" | "Spurs" |
| "Tim Duncan" | "Spurs" |
+---------------------+-----------------+
| "Boris Diaw" | "Spurs" |
| "Boris Diaw" | "Jazz" |
| "Boris Diaw" | "Suns" |
...
# 该 MATCH 查询与上一个 GO 查询具有相同的语义。
nebula> MATCH (v)<-[e:follow]- (v2)-[e2:serve]->(v3) \
Expand Down

0 comments on commit 478432b

Please sign in to comment.