Open mysteryman9000 opened 3 years ago
Right now entries are stored by datapoint. Each datapoint has its associated timestamp. I suggest adding an "Average" schema. Each entry in "Average" will have 5 fields: a date, a morning average, an afternoon average, a night average, and a day average. The average is updated each time a new datapoint is added. That way, retrieving averages is a simple matter of fetching a database entries based on the date field.
Gonna use the bucket model described here
For example "Morning, Afternoon, Night".