0

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.

Lee Owens
  • 11
  • 2

2 Answers2

0

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)
최현수
  • 56
  • 2
0

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

rohit thomas
  • 2,302
  • 11
  • 23
P.Büth
  • 1
  • 1