Monday, September 30, 2013

Systems Created in the last 90 days

Just an exercise with dates because I haven't done much along these lines:

SELECT     DATEPART(week, GETDATE()) - DATEPART(week, Creation_Date0) AS WeeksAgo, COUNT(DATEPART(week, GETDATE()) - DATEPART(week, Creation_Date0))
                      AS Count
FROM         v_R_System
WHERE     (DATEDIFF(dd, Creation_Date0, GETDATE()) < 90)
GROUP BY DATEPART(week, GETDATE()) - DATEPART(week, Creation_Date0)
ORDER BY WeeksAgo


Data looks like the following:

WeeksAgo
0
Count
9
1143
2110
3172
4100
5114
6108
7104
876
971
1078
1174
1292
1321

Then I stuck it in a SRSS chart:

No comments:

Post a Comment