-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aggregate functions doesnot work with Limit values in InfluxQL query #63
Comments
If I understand your problem statement, I believe you want
its a subquery. I believe 2.7 should support it: https://docs.influxdata.com/influxdb/v2/query-data/influxql/explore-data/subqueries/ |
ah I see now. yes it appears that min, max over subqueries are not working as expected. It appears to be a bug. nice find. We would welcome a pr from you to fix it or you can work around it by processing the results outside influxdb for example in python. |
Please help me with process of creating a PR. For I handled it in a different for min, max aggregates in java. Once I know the process of creating a PR i will create and will wait for fix. |
I think i steered you wrong. I tried again locally with 2.7 (build from
Then with
You can see i'm getting the correct min and max values. I'm using this line protocol as data: https://github.com/influxdata/influxdb/blob/main/test_fixtures/lineproto/metrics.lp (the process for creating a pull request is to fork the repo, fix the bug, and then open a pull request in the original repo - you need to sign the contributors release too) |
I have bitcoin api storing britainpound, eurodollar and I am trying to get min, max for latest 10 records. |
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 ?
The text was updated successfully, but these errors were encountered: