troubleshooting Question

Need query to calculate average data for a 5 day period

Avatar of edrz01
edrz01Flag for United States of America asked on
Microsoft SQL Server
7 Comments1 Solution310 ViewsLast Modified:
Need a query to calculate device average data for a rolling 5 day period. The results need to be for unique device names and the average of data for the past 5 days (including anything current).

Sample data:
Node1      31      2011-08-01
Node1      25      2011-08-01
Node1      43      2011-08-01
Node1      10      2011-08-03
Node1      52      2011-08-04
Node1      34      2011-08-04
Node2      17      2011-08-01
Node2      27      2011-08-03
Node3      43      2011-08-01
Node3      10      2011-08-03
Node3      52      2011-08-04
Node3      34      2011-08-04
-------

Results
Node1          32.5
Node2          22
Node3          34.75

Ideas?
ASKER CERTIFIED SOLUTION
Ephraim Wangoya
Software Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros