‎03-29-2017 06:20 PM
‎04-04-2017 09:42 PM
‎04-04-2017 07:58 PM
Select Top 1000000 Case
When web50rep694c570b7fc546f39e1f6fab6b019a5f.lastPatchDate >= DateAdd(day,
-7, GetDate()) Then '1. less than a week'
When web50rep694c570b7fc546f39e1f6fab6b019a5f.lastPatchDate < DateAdd(day,
-7, GetDate()) And web50rep694c570b7fc546f39e1f6fab6b019a5f.lastPatchDate >=
DateAdd(day, -30, GetDate()) Then '2. less than a month'
When web50rep694c570b7fc546f39e1f6fab6b019a5f.lastPatchDate < DateAdd(day,
-31, GetDate()) And web50rep694c570b7fc546f39e1f6fab6b019a5f.lastPatchDate
>= DateAdd(day, -90, GetDate()) Then '3. less than 3 months'
Else '4. more than 3 months' End As DateRange,
count(*) As NumberOfAssets
From web50rep694c570b7fc546f39e1f6fab6b019a5f
Where web50rep694c570b7fc546f39e1f6fab6b019a5f.OSname In ('Win 7', 'Win 8',
'Win 8.1', 'Win 10')
Group By Case
When web50rep694c570b7fc546f39e1f6fab6b019a5f.lastPatchDate >= DateAdd(day,
-7, GetDate()) Then '1. less than a week'
When web50rep694c570b7fc546f39e1f6fab6b019a5f.lastPatchDate < DateAdd(day,
-7, GetDate()) And web50rep694c570b7fc546f39e1f6fab6b019a5f.lastPatchDate >=
DateAdd(day, -30, GetDate()) Then '2. less than a month'
When web50rep694c570b7fc546f39e1f6fab6b019a5f.lastPatchDate < DateAdd(day,
-31, GetDate()) And web50rep694c570b7fc546f39e1f6fab6b019a5f.lastPatchDate
>= DateAdd(day, -90, GetDate()) Then '3. less than 3 months'
Else '4. more than 3 months' End
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now