Skip to content

Commit

Permalink
Update 1.get-subgraph.md (#1957)
Browse files Browse the repository at this point in the history
  • Loading branch information
abby-cyber committed Feb 15, 2023
1 parent c6138bc commit 3d874a0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs-2.0/3.ngql-guide/16.subgraph-and-path/1.get-subgraph.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,20 @@ nebula> INSERT EDGE serve(start_year, end_year) VALUES "player101" -> "team204":
The returned subgraph is as follows.

![GET SUBGRAPH FROM "101" OUT serve](https://docs-cdn.nebula-graph.com.cn/figures/subgraph-2-22-5-7.png)

* This example goes two steps from the vertex `player101` over `follow` edges, filters by degree > 90 and age > 30, and shows the properties of edges.

```ngql
nebula> GET SUBGRAPH WITH PROP 2 STEPS FROM "player101" \
WHERE follow.degree > 90 AND $$.player.age > 30 \
YIELD VERTICES AS nodes, EDGES AS relationships;
+-------------------------------------------------------+------------------------------------------------------+
| nodes | relationships |
+-------------------------------------------------------+------------------------------------------------------+
| [("player101" :player{age: 36, name: "Tony Parker"})] | [[:follow "player101"->"player100" @0 {degree: 95}]] |
| [("player100" :player{age: 42, name: "Tim Duncan"})] | [] |
+-------------------------------------------------------+------------------------------------------------------+
```

## FAQ

Expand Down

0 comments on commit 3d874a0

Please sign in to comment.