1

Trying to write a group by query in Java client,

As here it says I should be use like this,

GROUP BY column_name_1 [, column_name_2 …]

So I have tried this,

Collection<String, Person> col = store.putCollection("col01", Person.class);
Query<Person> query = col.query("SELECT name FROM col01 GROUP BY name", Person.class);

and get this error:

[151001:TQ_SYNTAX_ERROR_EXECUTION] Syntax error during parse:

Then I check this, and it says:

Fetching of all Columns (*) and aggregate operations (e.g., SUM) are available for a select expression. (Fetching of a particular Column is not available.)

How can I write a valid group by query?

Brown
  • 41
  • 4

0 Answers0