Reputation: 603
I have 'chunks' of data getting stored every 30 seconds. The timestamps on each row of a chunk is the same. The measurements and one of the tags are different. Is there a way to query the data so that I get the data from the last 24 hours but with timestamps of every x mins instead of 30 seconds? I don't need that fine a resolution.
Upvotes: 2
Views: 6087
Reputation: 28656
Use GROUP BY
time interval:
GROUP BY time(xm)
but you will need to apply some aggregation function on the field, for example MEAN(field)
to get average value.
Upvotes: 4