Syntax Error: SELECT tag, COUNT(*) as count FROM freetags INNER JOIN freetagged_objects ON (id = tag_id) WHERE 1 GROUP BY tag ORDER BY tag ASC