Skip to content
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

Top N of an Avg Value #2467

Closed
bnortman opened this issue Apr 30, 2015 · 7 comments
Closed

Top N of an Avg Value #2467

bnortman opened this issue Apr 30, 2015 · 7 comments

Comments

@bnortman
Copy link

Something like this

select top(mean(value),10) from /ResourceName [0-9].Metric 120/ where time < 1428734700s and time > 1428733380s

Which would first get the mean of value and then return the 10 highest. Can this be done?

@beckettsean
Copy link
Contributor

related to #1821

@beckettsean beckettsean added this to the Longer term milestone Apr 30, 2015
@dswarbrick
Copy link

+1

1 similar comment
@jamellebrown
Copy link

+1

@sl4dy
Copy link

sl4dy commented Nov 9, 2015

+1

@jeffutter
Copy link

This would be very useful in queries such as:

`SELECT sum(value) FROM requests WHERE time > now() - 15m GROUP BY time(30s),host,path``

when there are many different 'path' labels for displaying in something like Grafana. Currently, with no way to use top I get back ~100 results, when I really only want to see the top 10 or so.

@steverweber
Copy link

using Limit and orderby should resolve this?
https://influxdb.com/docs/v0.9/query_language/data_exploration.html

@beckettsean
Copy link
Contributor

As mentioned in my post to the mailing list we are experimenting with simplifying our open GitHub Issues. This feature request has been rolled into an aggregate issue for all function requests, so that we can close this issue until we are ready to work on it.

You may continue to make comments here. Closing the issue does not mean we are rejecting this idea.

jsternberg added a commit that referenced this issue May 18, 2017
The test cases demonstrate that the following issues are resolved
through some newer features.

Related to #813, #5095, #2467, #5345, and #5150.
stuartcarnie pushed a commit that referenced this issue May 25, 2017
The test cases demonstrate that the following issues are resolved
through some newer features.

Related to #813, #5095, #2467, #5345, and #5150.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants