0

For example I have the following script:

CREATE TABLE test 
(
     items  array(string)
)

INSERT INTO test (items) VALUES (array['a', 'b']);
INSERT INTO test (items) VALUES (array['a'])

Is it possible to count number of items in the table? Something similar to ES terms aggregation.

I expected something like this:

SELECT COUNT(\*), items 
FROM test 
GROUP BY items;

But this raises an error

Cannot GROUP BY 'items': invalid data type 'string_array'

Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

0

As of CrateDB 1.0 this is not supported. See this GH issue and this

mfussenegger
  • 3,931
  • 23
  • 18