Hi I have a table like:
CREATE TABLE `data` (
`time` DATETIME NOT NULL.
`cpu` DECIMAL(10, 4) UNSIGNED NOT NULL
)
And I have row each 10 seconds, for example:
time cpu
2018-09-12 11:49:41 0.200
2018-09-12 11:49:51 0.100
2018-09-12 11:50:01 0.200
2018-09-12 11:50:11 0.301
2018-09-12 11:50:21 0.100
2018-09-12 11:50:31 0.000
2018-09-12 11:50:41 0.200
2018-09-12 11:50:51 0.100
2018-09-12 11:51:01 0.100
2018-09-12 11:51:11 0.400
2018-09-12 11:51:21 0.000
2018-09-12 11:51:31 0.000
2018-09-12 11:51:41 0.300
2018-09-12 11:51:51 0.300
2018-09-12 11:52:01 0.300
2018-09-12 11:52:11 0.200
2018-09-12 11:52:21 0.000
2018-09-12 11:52:31 0.200
2018-09-12 11:52:41 0.100
2018-09-12 11:52:51 0.200
2018-09-12 11:53:01 0.801
2018-09-12 11:53:11 0.100
2018-09-12 11:53:21 0.200
2018-09-12 11:53:31 0.200
2018-09-12 11:53:41 0.100
I want to calculate the CPU average each 15 Minutes. How can I do it?
Thanks in advance!!!
I'm using:
MariaDB [(none)]> SELECT VERSION();
+----------------------------------+
| VERSION() |
+----------------------------------+
| 10.1.30-MariaDB-0ubuntu0.17.10.1 |
+----------------------------------+
1 row in set (0.00 sec)