Currently getting the mean value of the most recent entries into the DB based on time:
SELECT MEAN(value) FROM “adjust_temp” WHERE time>now() -10m
I’ve been looking but not able to find anything pertaining to this, but is there a way to get the mean() of a certain number of recent entries, regardless of time? basically just looking to average the last 10 values. Time is not helpful, as sometimes, I don’t have entries over a certain time period.
SELECT MEAN(value) FROM “adjust_temp” WHERE last 10 entries
Thanks for any help and points in the right direction++