I tried to use "group by" query on AgensGraph.
But, there is no "group by" clause on CYPHER.
How can I use "group by" on query.
I tried to use "group by" query on AgensGraph.
But, there is no "group by" clause on CYPHER.
How can I use "group by" on query.
CYPHER is distinct from SQL.
There is no explicit "GROUP BY" clause on grammar.
But, You can list extra column with aggregate function on return or with cluase.
# match (n:v) return n.x, sum(n.y);
x | sum
---+-----
1 | 4
2 | 9
(2 rows)
Cypher has no Group by
clause, but with AgensGraph
you can mix SQL and Cypher. You can write a Cypher-Query and insert it into another SQL-Query with group_by
.
At the documentation is an example for such hybrid querys. https://bitnine.net/documentations/developer-manual-en.html#hybrid-query