Hi guys,
I have a simple group by clause question I can't seem to figure out.
I have a table called Students and a column in that table called StartDate.
I want to return the number students who enrolled in each calendar month over the years to see which months produce the most enrollments.
January 95
February 136
March 72
etc.
The statement below is what I've got but of course this isn't returning the result set I want.... what am I missing?
SELECT COUNT(StudentID) AS Enrolments, DATENAME(Month, StartDate) AS StartMonth
FROM STUDENTS
GROUP BY StartDate
Thanks!