SELECT AVG(valor) FROM tabela where timestamp between '2017-4-20 18:00' and '2017-4-20 18:59';
SELECT AVG(valor) FROM tabela where timestamp between '2017-4-20 19:00' and '2017-4-20 19:59';
...............
1 de 6
user60252