We have InfluxDb database with
request measurement, it contains
url tag and
I need to select top 5 slowest requests (average). I can write similar sql-query for sql server:
select top 5 url, avg_duration FROM ( select url, avg(duration) avg_duration FROM @request group by url ) T ORDER BY T.avg_duration desc
How to write query like this for InfluxDb?