- #1
jacquestardie
- 1
- 0
First, let me describe my problem:
I'm trying to create a query within a database that will output the average of the three hottest consecutive days within a certain water year. The data is being pulled from a set of temperature loggers that record temperature every 15minutes.
My tentative solution:
1. Since I'm pulling data for a specific site, out of a database made of many sites, I first need to select the site. Duh.
2. Select Water Year.
3. Select the hottest temperature within each day. IE, somewhere around 2 oclock, per day.
3. Calculate degree days (simply the cumulative temperature at the site)
4. Determine largest change in a three day span, within the degree day data set.
5. Select that period with the greatest change.
6. Average Temperatures.
7. Celebrate?
Conclusion: So, while I think that should work, I have a feeling it may not be the most efficient solution. If any of you have any suggestions or comments, I'd be very grateful to hear them. Specifically, if anyone can comment on how a SQL Query for the highest rate-of-change within a 3 day period, and how that would look, I'd be eternally grateful!
Thanks in advance!
Jacques
I'm trying to create a query within a database that will output the average of the three hottest consecutive days within a certain water year. The data is being pulled from a set of temperature loggers that record temperature every 15minutes.
My tentative solution:
1. Since I'm pulling data for a specific site, out of a database made of many sites, I first need to select the site. Duh.
2. Select Water Year.
3. Select the hottest temperature within each day. IE, somewhere around 2 oclock, per day.
3. Calculate degree days (simply the cumulative temperature at the site)
4. Determine largest change in a three day span, within the degree day data set.
5. Select that period with the greatest change.
6. Average Temperatures.
7. Celebrate?
Conclusion: So, while I think that should work, I have a feeling it may not be the most efficient solution. If any of you have any suggestions or comments, I'd be very grateful to hear them. Specifically, if anyone can comment on how a SQL Query for the highest rate-of-change within a 3 day period, and how that would look, I'd be eternally grateful!
Thanks in advance!
Jacques