Filter Aggeration like SQL

How we can filter aggeration value

Like we have below SQL query, How we can write that in Elastic

SELECT '0-10' AS range, COUNT(AssetId) FROM 
(SELECT AssetId, SUM(SumOfPowerOffDuration) / 3100 AS Duration from AssetEventdatasummary where AssetId = 1785194
and EventDate = '2018-05-11T00:00:00' GROUP BY AssetId) A WHERE Duration >= 0 AND Duration <= 10

@dadoonet @Christian_Dahlqvist

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