Count of PCs by month and day in 2010

select
    DatePart(mm,os.InstallDate0) as ‘Month’,
    DATEPART(dd,os.InstallDate0) as ‘Date’,
    count(OS.resourceid)as ‘daily count’ 
from 
    v_GS_OPERATING_SYSTEM OS
Where
    DATEPART(yyyy,os.InstallDate0) =’2010′
group by
    DatePart(mm,os.InstallDate0),
    DATEPART(dd,os.InstallDate0)
order by
    DatePart(mm,os.InstallDate0),
    DATEPART(dd,os.InstallDate0)

Leave a Reply

Your email address will not be published. Required fields are marked *