Functions do not accept wildcards, so you must explicitly mention each
field you want to downsample.

SELECT MEAN(num1) as A, MEAN(num2) AS B, MEAN(num3) AS C INTO
downsampled_foo..measurement
FROM foo..measurement GROUP BY time(1m), *

You will not be able to get the average of the timestamps. InfluxDB will
store the aggregated values at the beginning of the aggregation bucket. See
https://docs.influxdata.com/influxdb/v0.13/query_language/data_exploration/#group-by-time-intervals
.

As for selecting only one value, I don't understand the question. Isn't
that just "SELECT value ..."?

On Tue, Jun 21, 2016 at 12:44 AM, <[email protected]> wrote:

> On Tuesday, June 21, 2016 at 2:16:19 AM UTC+3, Sean Beckett wrote:
> > Use GROUP BY * to preserve the tags when downsampling.
> >
> >
> > On Mon, Jun 20, 2016 at 9:39 AM,  <[email protected]> wrote:
> >
> > As mentioned in Downsampling and retention documentation.
> >
> >
> > "InfluxDB can handle hundreds of thousands of data points per second.
> Working with that much data over a long period of time can create storage
> concerns. A natural solution is to downsample the data; keep the high
> precision raw data for only a limited time, and store the lower precision,
> summarized data for much longer or forever."
> >
> >
> >
> > My goal is to have 2 databases on my influxdb:
> > first one is named:"foo", it is a db with retention policy of 4 weeksthe
> second one is named: "downsampled_foo", it is a db with downsampled points
> with larger retention policy (12 weeks).
> > I want the downsampled db to have a 5 minuets "group by" aggregation
> (avg for example) for numeric fields, and will keep original tag values.
> > Meaning, if in original db i have a measurement like:
> > numeric field1numeric field2numeric
> field3tag1tag2time500203orangesqure146643663450102orangesqure146643664455113orangesqure14664546345301yellowcircle1466454635I
> would like the downsampled measurement to look like:
> > numeric field1numeric field2numeric
> field3tag1tag2time275152.5orangesqure146643663955113orangesqure14664546345301yellowcircle1466454635
> >
> > how can i create a single continuous query that keeps the original tags
> while downsampling?
> >
> >
> >
> >
> > thanks :)
> >
> >
> >
> >
> > --
> >
> > 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/8486cee4-b8d1-409a-a0af-7d3b5658733a%40googlegroups.com
> .
> >
> > For more options, visit https://groups.google.com/d/optout.
> >
> >
> >
> >
> >
> > --
> >
> >
> > Sean Beckett
> > Director of Support and Professional Services
> > InfluxDB
>
> so i have to aggregate each field separately, or is there a way to select
> only one value from the time period?
>
> --
> 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/b9c4e9dc-e952-4487-9bb1-3d5b9b4030d8%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/CALGqCvM__Q%2BFCpkOEeXUrEKLDixf6W71exsMkOk%3D%2BRTijU4Gfw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to