Error while fetching from topic as t1 left join users as t2 on t2.users_id = t1.user_id and t2.status = "1" left join comment as t3 on t1.topic_id=t3.topic_id and t3.status="1" and t3.parent_comment_id="0" In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'alternat_db2018.t2.users'; this is incompatible with sql_mode=only_full_group_by