I’ve got a process that updates the table every ten minutes. Now I am trying to graph an average 24 hours over the period of several months. So I need the output to be like this:
- average of all entries in each individual column between 00:00-00:10
- average of all entries in each individual column between 00:10-00:20
- average of all entries in each individual column between 00:02-00:30
- average of all entries in each individual column between 00:30-00:40
- etc, etc…
How do I do that?
Here’s my table:
CREATE TABLE IF NOT EXISTS snr
(
updated
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
10714
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
10729
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
10744
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
10758
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
10773
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
10788
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
10803
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
10817
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
10832
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
10847
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
10862
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
10876
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
10891
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
10906
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
10921
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
10935
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
10964
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
10994
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
11023
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
11053
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
11067
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
11097
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’,
11126
float(4,2) UNSIGNED NOT NULL DEFAULT ‘0’
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_bin;