Skip to content

Commit

Permalink
Update Cypher.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mingxiw authored Jan 20, 2025
1 parent 4336f30 commit 8478c40
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions demos/guru_scripts/docker/tutorial/4.x/Cypher.md
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,8 @@ install query c17

The result is shown in [c17.out](https://github.com/tigergraph/ecosys/blob/master/demos/guru_scripts/docker/tutorial/4.x/cypher/c17.out) under `/home/tigergraph/tutorial/4.x/cypher/c17.out`

[Go back to top](#top)

### UNION ALL
In query c18() below, ` MATCH (s:Account {name: "Steven"})` finds "Steven". `MATCH (s:Account) WHERE s.isBlocked` finds all blocked accounts--"Steven". `UNION ALL` will combine these two, keeping the duplicates.

Expand All @@ -620,6 +622,8 @@ run query c18()

The result is shown in [c18.out](https://github.com/tigergraph/ecosys/blob/master/demos/guru_scripts/docker/tutorial/4.x/cypher/c18.out) under `/home/tigergraph/tutorial/4.x/cypher/c18.out`

[Go back to top](#top)

## Conditional Logic
### CASE Expression
The CASE expression in OpenCypher allows you to implement conditional logic within a query, enabling dynamic result customization based on specific conditions.
Expand Down Expand Up @@ -658,6 +662,8 @@ run query c19()

The result is shown in [c19.out](https://github.com/tigergraph/ecosys/blob/master/demos/guru_scripts/docker/tutorial/4.x/cypher/c19.out) under `/home/tigergraph/tutorial/4.x/cypher/c19.out`

[Go back to top](#top)

## Aggregate Functions
Aggregation functions in OpenCypher allow you to perform calculations over a set of values, summarizing or transforming the data into a single result. These functions are typically used in combination with the `WITH` or `RETURN` clauses to compute aggregate values based on certain criteria. In `WITH` and `RETURN`, other non-aggregate expressions are used form groups of the matched rows.

Expand Down Expand Up @@ -693,9 +699,12 @@ run query c20()

The result is shown in [c20.out](https://github.com/tigergraph/ecosys/blob/master/demos/guru_scripts/docker/tutorial/4.x/cypher/c20.out) under `/home/tigergraph/tutorial/4.x/cypher/c20.out`

[Go back to top](#top)

## Other Expression Functions
There are many expression functions openCypher supports. Please refer to [openCypher functions](https://docs.tigergraph.com/gsql-ref/4.1/opencypher-in-gsql/opencypher-in-gsql)

[Go back to top](#top)
# Support
If you like the tutorial and want to explore more, join the GSQL developer community at

Expand Down

0 comments on commit 8478c40

Please sign in to comment.