by mikael
15. May 2009 12:24
select count(*),
cast(convert(varchar,a.CreatedDate,101) as smalldatetime) as VisitDate
from ActivityLogs.dbo.DetectionLogs a
where a.Column = 'value'
group by cast(convert(varchar,a.CreatedDate,101) as smalldatetime)
order by cast(convert(varchar,a.CreatedDate,101) as smalldatetime) asc
This is extremely useful to gather some quick statistics! :)