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.
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
GROUP BY StartDate