Hi, I have a data source like below: -
TYPE VALUE
A 123
A 234
B 890
A 789
B 085
I need to pull the latest record for each type i.e. there will be two rows in the result : -
A 123
B 890
I think I cannot do it with elasticsearch sql(please correct me if I am wrong). If not, can I have two essql filters in my expression and somehow combine them? The two essql filters will be : -
SELECT TYPE, VALUE FROM SOURCE WHERE TYPE = A ORDER BY @timestamp DESC LIMIT 1
SELECT TYPE, VALUE FROM SOURCE WHERE TYPE = B ORDER BY @timestamp DESC LIMIT 1
Is it possible?
Thanks a lot in advance.