I\'m trying to average data in SQL Server 2005 in a day. Here is what my database look like this if I use simple query as
SELECT timestamp, FEED FROM ROASTE
try this:
SELECT timestamp, sum(FEED) FROM ROASTER_FEED WHERE timestamp=.... GROUP BY timestamp
it could be slow if you are handling alot of data, in this case you should considering an additional table which holds the pre-calculated values for each day.