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 |
1 | 143 |
2 | 110 |
3 | 172 |
4 | 100 |
5 | 114 |
6 | 108 |
7 | 104 |
8 | 76 |
9 | 71 |
10 | 78 |
11 | 74 |
12 | 92 |
13 | 21 |
Then I stuck it in a SRSS chart:
No comments:
Post a Comment