Skip to content

Commit

Permalink
Create unionTest.gsql
Browse files Browse the repository at this point in the history
  • Loading branch information
mingxiw authored Jan 21, 2025
1 parent 1aa125d commit b7d21aa
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions demos/guru_scripts/docker/tutorial/4.x/script/unionTest.gsql
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()

0 comments on commit b7d21aa

Please sign in to comment.