select main.*, category.name as category_name, category.title as category_title, category.id as category_id, category.master_id as category_master_id from (select a.*, c.* from product a, product_lang c where a.id=c.main_id and c.lang_id = '1') main left join (select * from category_element where identifier = 'product') rel on main.id=rel.main_id left join (select a.*, c.* from category a, category_lang c where a.id=c.main_id and c.lang_id = '1') category on rel.category_id=category.id left join (select * from category where status=1) d on d.id=main.category where 1=1 and main.seo='four-chairs-dinning-set5' and main.master_id='7' and main.status = 1 group by main.id , main.order_no asc Expression #35 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'category.name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by