+6  A: 

Put the GROUP BY after the WHERE.

deinst