I have this SQL query and EVENT table in my Oracle database.
max(DATE) AS eventdate
WHERE TYPE = 'CRASH'
GROUP BY CITY
ORDER BY eventdate DESC, CITY ASC)
WHERE ROWNUM < 6;
NEW YORK 15/02/27
EVENT: ID, NAME, DATE, CITY, TYPE
I want to do the same query in ElasticSearch using JavaAPI.
Is it possible?
I must know 6 cities that have the latest events and their dates.