B
Brett Kelts
Can anybody help me figure this out. I use this sort of query in a
bunch of different places. Essentially I want to sum by an entire day.
SELECT
CONVERT(SMALLDATETIME, CONVERT(CHAR(10), StartDate, 102)) as
StartDay,
Count(CourseID) as CountCourse
FROM Course
GROUP BY CONVERT(SMALLDATETIME, CONVERT(CHAR(10), StartDate, 102))
ORDER BY CONVERT(SMALLDATETIME, CONVERT(CHAR(10), StartDate, 102))
The results will be something like this
StartDay CountCourse
1/1/2008 50
1/2/2008 60
1/3/2008 55
etc.
Any thoughts
bunch of different places. Essentially I want to sum by an entire day.
SELECT
CONVERT(SMALLDATETIME, CONVERT(CHAR(10), StartDate, 102)) as
StartDay,
Count(CourseID) as CountCourse
FROM Course
GROUP BY CONVERT(SMALLDATETIME, CONVERT(CHAR(10), StartDate, 102))
ORDER BY CONVERT(SMALLDATETIME, CONVERT(CHAR(10), StartDate, 102))
The results will be something like this
StartDay CountCourse
1/1/2008 50
1/2/2008 60
1/3/2008 55
etc.
Any thoughts