-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
demos/guru_scripts/docker/tutorial/4.x/script/unionTest.gsql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
USE GRAPH financialGraph | ||
CREATE OR REPLACE QUERY unionTest () SYNTAX V3 { | ||
S1 = SELECT s | ||
FROM (s:Phone) | ||
WHERE s.number == "111" OR s.number == "222"; | ||
|
||
//show what's in S1 | ||
PRINT S1[S1.number]; | ||
|
||
S2 = SELECT s | ||
FROM (s:Phone) | ||
WHERE s.number == "222"; | ||
|
||
//show what's in S2 | ||
PRINT S2[S2.number]; | ||
|
||
S3 = S1 UNION S2; | ||
|
||
//show what's in S3 | ||
PRINT S3[S3.number]; | ||
|
||
S4 = SELECT c | ||
FROM (c:City); | ||
|
||
S5 = S3 UNION S4; | ||
|
||
//show what's in S5 | ||
PRINT S5[S5.number]; | ||
|
||
} | ||
|
||
install query unionTest | ||
run query unionTest() |