COUNT(id) AS countofnumber FROM (SELECT * from downloads ) AS foo GROUP BY stryearmonth ORDER BY stryearmonth ASCbtw, whats the reason for the subselect?
Oh, right, looks a bit stupid like this. It's eventually being filled with something more useful, upon the user's request. It's dynamically (via PHP) extended to fulfill certain rules...