I want select values from specified seasons of the year grouped by year. Seasons are as follows: December(year before), January, February: Winter, March, April, May: Spring, June, July, August: Summer, September, October, November: Autumn
If i want to get single season grouped by year, my query for Spring, Summer and Autumn looks like this:
select avg(value) from table where month(date) between 3 and 5 group by year(date);
But i don't have idea how to achieve such a result for winter, where, for example, December is in 2017, and January and February in 2018. Grouping by year is very important. Thank You for help!