Downsample and Downsampling a Downsample

Hi, I’m new into using InfluxDB and I have some questions/problems. Is it correct to do something like this:

CREATE CONTINUOUS QUERY “cq_5m” ON “database” BEGIN SELECT mean() INTO “database_5m”.“autogen”.:MEASUREMENT FROM “database”.“autogen”././ GROUP BY time(5m),* END

CREATE CONTINUOUS QUERY “cq_15m” ON “database_5m” BEGIN SELECT mean() INTO “database_15m”.“autogen”.:MEASUREMENT FROM “database_5m”.“autogen”././ GROUP BY time(15m),* END

For some reason when I query the results on the database_15m the results aren’t syncing in the same time, example:
On the database where I aggregate the values every 5 minutes I get some values from the date 2017-04-04 13:45:00, 2017-04-04 13:50:00, 2017-04-04 13:55:00. In my database_15m the aggregation of those values gets timestampped at 2017-04-04 13:45:00.

@elmrmoe Have you tried to run both of your CQs on the raw data? This should fixt that issue for you.

Hi, it was my fault I didn’t read the documentation properly. In the example that I gave the CQ that aggregates by 15 minutes , is working as intented but the reading of the timestamp is completely different from what I was associating it with.
In that case when the query runs the time stamp of 13:45:00 its indicative of the 15 minutes between 13:45:00 and 14:00:00.