Executed Query -> select c.id, c.clinic_name, cl.country, cl.state, cl.city1, cl.city2, count(distinct r.id) as totalreview, group_concat(distinct cat.category_id) as cliniccategories from tbl_clinics c left join tbl_clinic_categories cat on cat.clinic_id = c.id left join tbl_clinic_locations cl on cl.clinic_id = c.id left join tbl_reviews r on r.clinic_location_id = cl.id where cat.category_id = "11" and c.status = "a" group by r.clinic_location_id order by totalreview desc
ERROR:"SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'treatment_scout.c.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by: 308"