SELECT AVG( valor ) , HOUR( `timestamp` )
FROM tabela
WHERE DATE_SUB( `timestamp` , INTERVAL 1 HOUR )
GROUP BY HOUR( `timestamp` )
Resultado
SELECT AVG( valor ) , HOUR( `timestamp` )
FROM tabela
WHERE DATE_SUB( `timestamp` , INTERVAL 1 HOUR )
GROUP BY HOUR( `timestamp` )
Resultado