You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@druid.apache.org by di...@gmail.com, di...@gmail.com on 2018/12/26 14:28:09 UTC

How filter entries in group by max value of column?

Hi! I want execute groupBy request with filtering rows by max value of one column. 

If raw data is:

datetime, colA, colB, value
2018-12-01 04:00:00.0,ABC,001239,15.0
2018-12-01 04:00:00.0,ABC,073228,5.0
2018-12-01 04:00:00.0,ABC,117780,15.0
2018-12-01 05:00:00.0,ABC,073228,18.0
2018-12-01 06:00:00.0,ABC,073228,56.0
2018-12-01 06:00:00.0,CBA,001239,72.0

I want grouping by datetime and colA. Response will be:

datetime, colA, colB, value
2018-12-01 04:00:00.0,ABC,117780,15.0
2018-12-01 05:00:00.0,ABC,073228,18.0
2018-12-01 06:00:00.0,ABC,073228,56.0
2018-12-01 06:00:00.0,CBA,001239,72.0

How do it?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@druid.apache.org
For additional commands, e-mail: dev-help@druid.apache.org