http://dev.mysql.com/doc/refman/5.0/en/group-by-optimization...
> The GROUP BY does not begin with the first part of the key, but there is a condition that provides a constant for that part:
> SELECT c1, c2, c3 FROM t1 WHERE c1 = 'a' GROUP BY c2, c3;
> The GROUP BY does not begin with the first part of the key, but there is a condition that provides a constant for that part:
> SELECT c1, c2, c3 FROM t1 WHERE c1 = 'a' GROUP BY c2, c3;