Hi All,
I have a table that's described as follows:
+------------+-----------------------+------+-----+-------------------+----------------+
| Field | Type | Null | Key | Default |
Extra |
+------------+-----------------------+------+-----+-------------------+----------------+
| uid | mediumint(8) unsigned | NO | PRI | NULL |
auto_increment |
| temp_f | float(4,1) | YES | | NULL
| |
| temp_c | float(4,1) | YES | | NULL
| |
| windchill | float(4,1) | YES | | NULL
| |
| dewpoint | float(4,1) | YES | | NULL
| |
| time | timestamp | NO | | CURRENT_TIMESTAMP
| |
+------------+-----------------------+------+-----+-------------------+----------------+
This table gets data injected in it every minute. I have one graph
being generated right now that displays the last 30 minutes: SELECT
[fields] FROM data ORDER BY uid DESC LIMIT 30
Now I'm trying to build different graphs from select chunks of data
and I have a question:
I want to display a graph for the last 24 hours by averaging each
hour. Since I get (at most) 60 readings per hour, I need to average
them out to get a number for that hour. Do I have to do this averaging
outside of MySQL or can it be done within? And I would have to do this
for each of the 24 hours I want displayed.
Thanks.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]