Skip to content

Commit

Permalink
Update 6.set.md (#1114)
Browse files Browse the repository at this point in the history
  • Loading branch information
randomJoe211 authored Oct 29, 2021
1 parent e36430e commit 06138c6
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions docs-2.0/3.ngql-guide/5.operators/6.set.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ nebula> GO FROM "player102" OVER follow \
+-------------+
| follow._dst |
+-------------+
| "player100" |
| "player101" |
| "player102" |
| "player125" |
+-------------+
# 返回两个查询结果的并集,包含重复的元素。
Expand All @@ -41,9 +42,10 @@ nebula> GO FROM "player102" OVER follow \
+-------------+
| follow._dst |
+-------------+
| "player100" |
| "player101" |
| "player101" |
| "player102" |
| "player125" |
+-------------+
# UNION也可以和YIELD语句一起使用,去重时会检查每一行的所有列,每列都相同时才会去重。
Expand Down Expand Up @@ -80,7 +82,10 @@ nebula> GO FROM "player102" OVER follow \
INTERSECT \
GO FROM "player100" OVER follow \
YIELD dst(edge) AS id, properties(edge).degree AS Degree, properties($$).age AS Age;
Empty set (time spent 2990/3511 us)
+----+--------+-----+
| id | Degree | Age |
+----+--------+-----+
+----+--------+-----+
```

## MINUS
Expand All @@ -100,13 +105,17 @@ nebula> GO FROM "player100" OVER follow \
+-------------+
| follow._dst |
+-------------+
| "player102" |
| "player125" |
+-------------+
nebula> GO FROM "player102" OVER follow \
MINUS \
GO FROM "player100" OVER follow;
Empty set (time spent 2243/3259 us)
+-------------+
| follow._dst |
+-------------+
| "player100" |
+-------------+
```

## 集合运算符和管道符的优先级
Expand Down

0 comments on commit 06138c6

Please sign in to comment.