MDL-43719 tags: Fix the sql statement in the tag management page.

MSSQL and Oracle require that all fields in teh select also be present
in the group by section.