tsbs icon indicating copy to clipboard operation
tsbs copied to clipboard

groupby-orderby-limit query incorrect on influxdb

Open toddlipcon opened this issue 5 years ago • 0 comments

The description of this query is:

The last 5 aggregate readings (across time) before a randomly chosen endpoint

but the query produced for influx looks like:

SELECT max(usage_user) from cpu WHERE time < '2016-01-01T14:37:05Z' group by time(1m) limit 5

this is missing the appropriate ORDER BY clause to get the last five readings.. Instead it seems to pick up the first five minutes of the dataset.

toddlipcon avatar Jan 24 '20 06:01 toddlipcon