fix GROUP BY clause

corrects error with group by clause.
https://github.com/fedora-infra/fedora-tagger/pull/169#issuecomment-48629020