Skip to content

Commit

Permalink
Create q1b.gsql
Browse files Browse the repository at this point in the history
  • Loading branch information
mingxiw authored Sep 12, 2024
1 parent 8c4cdbf commit 30cca5b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions demos/guru_scripts/docker/tutorial/4.x/script/q1b.gsql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#enter the graph
USE GRAPH financialGraph

CREATE OR REPLACE QUERY q1b () SYNTAX v3 {

//select an expression list into a table T
SELECT a.isBlocked, count(*) INTO T
FROM (a:Account)
GROUP BY a.isBlocked;

//out put the table T in JSON format
PRINT T;
}

#compile and install the query as a stored procedure
install query q1b

#run the query
run query q1b()

0 comments on commit 30cca5b

Please sign in to comment.