Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Techsavy
Starting Member
4 Posts |
Posted - 2008-05-04 : 05:13:21
|
Hello,I am trying to analyze 56 years of hourly rainfall data.Right now i have three columns. Date(mm/dd/yyyy), hr(0-23) and hourly Rainfall(inches).I would like to know the count of rainfall events that exceed 2.4 inches in 24 hrs. This means if the sum of rainfall in 24 hrs exceeds 2.4 inches in 24 hours then count that as an event.once a first event is identified then the next event should be identified with at least a gap of 72 hours.Any suggestions on how to query this?Thanks, |
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2008-05-06 : 11:39:02
|
Why do you want a gap of 72 hours?Without the gap it would be something like:select date, sum(rainfall) totalrainfallfrom rainfalltablegroup by datehaving sum(rainfall) > 2.4 |
 |
|
|
|
|