Using top_hits in sql

Hello,
im using Elasticsearch sql to run aggregations on my data.
What im trying to do is devide my data into buckets of time (using histogram) and then get the top docs of each bucket (using somthing similar to top_hits).
I have checked the sql documentation and especially the functions and operators page but didn't find a suitable solution.
I did notice that functions like first_value are implemented by top_hits aggregation (can be seen when using the translate api).
Is there a way, using sql syntax, to retrieve number of docs per bucket?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.