SELECT YEAR(start) AS 'Year', MONTH(start) AS 'Month'
Group By Year(start), Month(start)
ORDER BY Month ASC
What I am trying to do is get my events to display grouped by Months so that it comes up something like this:
Jan 3, 2012 Event 1 Zone 1 field 2 field 3
Jan 19, 2012 Event 2 Zone 2 field 2 field 3
Jan 28, 2012 Event3 Zone 3 field 2 field 3
Feb 6, 2012 Event A Zone 1 field 2 field 3
Feb 22, 2012 Event B Zone 2 field 2 field 3
Feb 24, 2012 Event C Zone 3 field 2 field 3
So I found a statement( above ) that I was able to sort the data by year and month but it won't let me add more fields to the SELECT. ( Must be a better way? )
I get this error:
"Column 'blah' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause
Very grateful for your assistance experts.
Thank you in advance.