I have a SQLite DB and I want to compress some data from a temperature readings. The readings are recorded every minute. I have no problem to calculate this on a daily base with
"SELECT date(Time_T), AVG(reading) AS reading_avg, MIN(reading) AS reading_min, MAX(reading) AS reading_max FROM readings WHERE (Zeitpunkt_T > '2016-02-20') GROUP BY (SELECT date(Time_T))"
That works pretty fine and gives me daily averages together with min & max. But this compression is too much. I would like to have values per hour. How can I calculate this ?
Aucun commentaire:
Enregistrer un commentaire