influxdata / influxdata/influxql
Aggregate functions doesnot work with Limit values in InfluxQL query
- Dominant language
- Go
- Stars
- 170
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
I am using influx 2.7 v2 version with influx query. I have a scenario where I need to get min, max values of last 10 records. Query that I was using
select min(*) from "testapis" order by time desc limit 10; Shown as below

here are my last 10 records
select * from "testapis" order by time desc limit 10

Do we have a way to address this ? or is there a work around ?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the two InfluxQL queries against InfluxDB 2.7 and compare how ORDER BY, LIMIT, and min(*) are evaluated. Determine whether the aggregate is expected to operate on the limited records, then document the supported behavior or workaround; the issue names no source files or tests to begin with.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100