Hello I'm desperate trying to find a way in ESPER - CEP to output the events that have the max value. Here's a good example to illustrate my problem:
| value | category | date |
| 12.2 | A | yyyy-MM-dd HH:mm:ss |
| 13.3 | A | yyyy-MM-dd HH:mm:ss |
I want the following output:
| value | category | date |
| 13.3 | A | yyyy-MM-dd HH:mm:ss |
Very basic in SQL : select max(value), category date from tab group by category
Now in Esper, i have tried many things: output every, output last, contexts.. But couldn't find a solution :/ It either outputs nothing or outputs all the lines. With "output first every", it only ouputs the first line, regardless of the max() comparison.
Is there someone who has an idea of how to proceed to obtain the max(value) and group by a parameter from a stream?
Thanks for your help :)