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 ROASTER_FEED
ORDER timestamp
Data:
timestamp Feed
02/07/2011 12:00:01 1246
02/07/2011 12:00:01 1234
02/07/2011 12:00:01 1387
02/07/2011 12:00:02 1425
02/07/2011 12:00:03 1263
...
02/07/2011 11:00:01 1153
02/07/2011 11:00:01 1348
02/07/2011 11:00:01 1387
02/07/2011 11:00:02 1425
02/07/2011 11:00:03 1223
....
03/07/2011 12:00:01 1226
03/07/2011 12:00:01 1245
03/07/2011 12:00:01 1384
03/07/2011 12:00:02 1225
03/07/2011 12:00:03 1363
I don't know how to average the feed when someone select a date in a month and it give display the average/sum of that day only.
For example, in the outcome, if I select day as 02/07/2011. It would give me something like this:
02/07/2011 1234 (average value/or sum)