Hi,
I have this SQL query and EVENT table in my Oracle database.
SELECT *
FROM (SELECT
CITY,
max(DATE) AS eventdate
FROM EVENT
WHERE TYPE = 'CRASH'
GROUP BY CITY
ORDER BY eventdate DESC, CITY ASC)
WHERE ROWNUM < 6;
NEW YORK 15/02/27
LONDON 15/02/27
LONDON 15/02/27
LONDON 15/02/11
LONDON 15/02/19
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.