Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'admin_wkuliksys.catalog_i18n.name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by [ SELECT `catalog`.`id`, `catalog`.`cost`, `catalog`.`cost_old`, `catalog_i18n`.`name`, `catalog`.`alias`, `catalog`.`image`, `catalog`.`available`, `catalog`.`specifications`, COUNT(DISTINCT catalog_specifications_values.specification_alias) AS cList FROM `catalog` JOIN `catalog_i18n` ON (`catalog`.`id` = `catalog_i18n`.`row_id`) JOIN `catalog_specifications_values` ON (`catalog_specifications_values`.`catalog_id` = `catalog`.`id`) WHERE `catalog_i18n`.`language` = 'ru' AND `catalog`.`status` = 1 AND `catalog`.`parent_id` > 0 AND `catalog`.`catalog_tree_id` = 57 AND ((`catalog_specifications_values`.`specification_alias` = 'color' AND `catalog_specifications_values`.`specification_value_alias` IN ('white'))) GROUP BY `catalog`.`id` HAVING `cList` >= 1 ORDER BY `catalog`.`available` ASC, `catalog`.`sort` ASC ]