SELECT mean(value) FROM foo GROUP BY time(1h)

https://docs.influxdata.com/influxdb/v0.13/query_language/data_exploration/#the-group-by-clause
https://docs.influxdata.com/influxdb/v0.13/query_language/functions/



On Wed, Jun 29, 2016 at 10:41 AM, Saad Khan <[email protected]> wrote:

> Hi,
>
> Is there a way to get sampled date from influxdb. I am currently running
> following
>
> Select value from mytable;
>
> it returns me a lot of data but I need only 30 points to plot a graph. So
> I am sampling the data by picking up 30 points from the result on equal
> intervals. This is of course very expensive on my web app. Is there a query
> I can use to get only x points from equal intervals?
>
> If that's not possible i would also like to hear other suggestions. May be
> there is a way to get any 1 point from every hour.
>
> Thanks for the help.
>
> --
> Remember to include the InfluxDB version number with all issue reports
> ---
> You received this message because you are subscribed to the Google Groups
> "InfluxDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/influxdb.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/influxdb/ccd60142-39a6-4de8-a2a9-8f0c60e96917%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Sean Beckett
Director of Support and Professional Services
InfluxDB

-- 
Remember to include the InfluxDB version number with all issue reports
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/CALGqCvPUUOcnPZr5Rvd0HzF8L-kPpHDM0ZYbrYtWdYVOXJgtJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to