For any aggregation period, the timestamp returned is the beginning of the bucket. Regardless of the WHERE time clauses, the buckets start on pre-determined boundaries unless explicitly shifted.
See http://docs.influxdata.com/influxdb/v1.0/query_language/data_exploration/#group-by-time-intervals for more. On Sat, Nov 12, 2016 at 10:48 AM, <[email protected]> wrote: > Thanks for reply Sean. same applies for aggregate by hour as well.? > > SELECT SUM(value) FROM campaignstats WHERE event='sent' AND > channel='browser_push' And time >= '2016-11-03T18:30:00Z' AND time < > '2016-11-12T17:07:34.236639Z' GROUP BY time(1h) > > result value starting from 6:00:00Z > > [["2016-11-03T18:00:00Z", null] > > > > On Thursday, November 10, 2016 at 10:33:22 PM UTC+5:30, Sean Beckett wrote: >> >> The timestamps are the beginning of the bucket, not the end. Therefore >> the "2016-11-06T00:00:00Z" value, 395890, is for the 2016-11-06 to >> 2016-11-13 time range. >> >> On Thu, Nov 10, 2016 at 4:12 AM, <[email protected]> wrote: >> >>> Below query will get data from 2016-10-12T18:30:00Z and aggregated by >>> week ( sunday to sunday). >>> >>> SELECT SUM(value) FROM campaignstats WHERE event='sent' AND >>> channel='browser_push'And time >= '2016-10-12T18:30:00Z' GROUP BY time(1w >>> ,3d) fill(0) >>> >>> But Its not returning current week data. I run it today ( wednesday >>> 10-11-2016). data for 6th november to 13th november is missing.for example, >>> >>> [ >>> "2016-10-09T00:00:00Z", >>> 215935 >>> ], >>> [ >>> "2016-10-16T00:00:00Z", >>> 1197385 >>> ], >>> [ >>> "2016-10-23T00:00:00Z", >>> 1058452 >>> ], >>> [ >>> "2016-10-30T00:00:00Z", >>> 250785 >>> ], >>> [ >>> "2016-11-06T00:00:00Z", >>> 395890 >>> ] >>> >>> >>> >>> any idea why? Please help asap. >>> >>> thanks... >>> >>> -- >>> Remember to include the version number! >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "InfluxData" 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/ms >>> gid/influxdb/3fd28b7c-9df5-45f8-bfd1-a6b105e98589%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 version number! > --- > You received this message because you are subscribed to the Google Groups > "InfluxData" 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/ms > gid/influxdb/ce4db87c-2697-4e9c-bb53-41f649a9e9df%40googlegroups.com > <https://groups.google.com/d/msgid/influxdb/ce4db87c-2697-4e9c-bb53-41f649a9e9df%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Sean Beckett Director of Support and Professional Services InfluxDB -- Remember to include the version number! --- You received this message because you are subscribed to the Google Groups "InfluxData" 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/CALGqCvN0N_1wqCKd9HWnve1h%3D-x6GcR6x1FNCz1VG%2BQfCOf-VA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
