In a simple table
(obsdate datetime, value money)
Rainfall records (values) are logged at the date and time the observations (obsdate). Since rain may occur more than once on one day a typical slice of data is:
2006-03-28 12:00:00.000 0.2
2006-03-29 14:45:00.000 0.2
2006-03-29 15:00:00.000 0.2
2006-03-29 15:15:00.000 0.4
2006-03-29 15:30:00.000 0.2
2006-03-29 19:00:00.000 0.2
2006-03-30 01:00:00.000 0.2
I need to know how much rainfall falls in one day. I can abstract distinct dates, but how to loop through these to accumulate the rainfall for each day. Any help much appreciated.