A fatal MySQL error occurred.

Query:
SELECT c2.title, c2.id, c2.friendly_url, c2.friendly_url_path AS catpath, '' AS locationpath, count(l.title) AS count FROM pmd_categories c1 JOIN pmd_categories c2 ON c2.left_ >= c1.left_ AND c2.right_ <= c1.right_ AND c2.level = 2 AND c1.level = 1 JOIN pmd_listings_categories lc ON lc.cat_id = c2.id JOIN pmd_listings_mc_stat l ON l.id = lc.list_id WHERE l.status = 'active' AND c1.id = GROUP BY c2.title

Error:
(1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY c2.title' at line 1