Hi,
I am trying to visualize some data in a Canvas and I am using elasticsearch sql to build some visualizations. I am importing data from winlogbeat and I have written this query:
SELECT count(*) as c, winlog.event_id
FROM "winlogbeat-*"
GROUP BY winlog.event_id ORDER BY c DESC
This query works fine and shows the elements in the right order. However, when I add a LIMIT statement
SELECT count(*) as c, winlog.event_id
FROM "winlogbeat-*"
GROUP BY winlog.event_id
ORDER BY c DESC
LIMIT 10
Instead of getting the first results I receive the last results.
(For reference I am using Elasticsearch 6.7)
My expected behavior is that it should return the events with the highest count