You can use the following if you want to group only a month:
SELECT Location, Avg(value) AvgVal, Month(date) Mnth FROM Value GROUP BY Location, Month(date)
You can even use GROUPING SETS , which will be GROUP BY Month, year, location, and then give you a common ground for everyone:
SELECT Location, Avg(value) AvgVal, Month(dt) Mnth, Year(dt) Yr FROM yourtable GROUP BY GROUPING SETS((Month(dt), Year(dt), Location), (Location));
See SQL Fiddle with Demo
Taryn source share