MySQL Forums
Forum List  »  Portuguese

MySQL - criar SQL contabilizar média entre horas
Posted by: Cesar Lopes
Date: March 16, 2011 02:41PM

Olá,

Tenho uma tabela onde eu salvo um valor boleano a cada 5 minutos o que gera 12 resultados por hora. Quero construir um gráfico onde eu coloque a média desses resultados por hora.

Exemplo:
valor | hora
0.5 - 2011-03-16 16:00:01
0.8 - 2011-03-16 16:05:01
1.4 - 2011-03-16 16:10:01
...
0.9 - 2011-03-16 16:55:01
0.8 - 2011-03-16 17:00:01
0.3 - 2011-03-16 17:05:01

Existe algum SQl que eu possa fazer esse resgaste de informação seprando por hora e com média?

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL - criar SQL contabilizar média entre horas
4904
March 16, 2011 02:41PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.