SELECT COUNT(*) AS c FROM ( SELECT COUNT(*) FROM (SELECT `colleges`.`id` FROM `college`.`colleges` WHERE `delReason`="" AND `colleges`.`subj_id`=16 AND `colleges`.`city_id`=14) a LEFT JOIN `college`.`lic_okso` ON `lic_okso`.`col_id` = a.`id` WHERE `lic_okso`.`okso_id`= GROUP BY a.`id` ) z
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GROUP BY a.`id` ) z' at line 10