sql error in: Model_Module_Themes_Head_Sub SELECT `table`.contentType, COUNT(*) AS count FROM contentArticle AS `table` LEFT JOIN themesToContent ON themesToContent.contentArticleId = `table`.id WHERE `table`.`active` = '1' AND `table`.`startDate` < '2019-08-23 10:40' AND `table`.contentType != 'companynews' AND themesToContent.themesHeadSubId IN ({id}) GROUP BY `table`.contentType