Executed Query -> select r.*, tcmt.treatment_id as treatment_id, t.treatment_name, t.category_id, t.subcategory_id, l.clinic_id, cate.categoryname, subcate.subcategoryname, rc.reviewer_category,clinic.clinic_name, ci.image_name from tbl_reviews r left join tbl_tcm_treatments tcmt on r.tcmt_id = tcmt.id left join tbl_clinic_locations l on r.clinic_location_id = l.id left join tbl_treatments t on t.id = tcmt.treatment_id left join tbl_category cate on cate.categoryid = t.category_id left join tbl_subcategory subcate on subcate.subcategoryid = t.subcategory_id left join tbl_reviewer_category rc on rc.id = r.reviewer_category_id left join tbl_clinics clinic on clinic.id = l.clinic_id left join tbl_clinic_images ci on ci.clinic_id = l.clinic_id where r.id = "42" group by r.id order by r.id desc
ERROR:"SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #31 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'treatment_scout.ci.image_name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by: 308"