Elastic search aggregation similar to group by

Hi,

I am trying to get the following sql query to work in elastic search. I am using csv plugin.
Select name, rowid, sum(amt1), sum(amt2) from tableone where
Code='code1' group by name, road.

I excuted a similar query in kibana but group by had only one column. It worked.

When i tried executing with multiple column in group by
I get exception ---- "currently only a single expression can be used with group by" please select one of name, rowid.

Does sql query currently not support multiple column in group by.

Can i get the same result using aggregation, if its possible through aggregation can i get sample aggreation query for the above sql.

Thanks

Hi @l_2018,
The timing is perfect: ES 6.4.0 with SQL has this restriction removed, and 6.4.0 has just been released.
For your reference, this is the change that went into 6.4.0: https://github.com/elastic/elasticsearch/issues/31793

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.