Not sure if I am over simplyfing here but would it not be
SELECT CODE, COUNT(CODE), SUM(COUNT), YEAR(DATE), MONTH(DATE) FROM tbl GROUP BY CODE, COUNT, YEAR(DATE), MONTH(DATE)
uriDium
2009-07-09 15:50:58
Not sure if I am over simplyfing here but would it not be
SELECT CODE, COUNT(CODE), SUM(COUNT), YEAR(DATE), MONTH(DATE) FROM tbl GROUP BY CODE, COUNT, YEAR(DATE), MONTH(DATE)