Error while fetching from broker_directory as t1 left join company_sector as t2 on t1.company_sector_id=t2.company_sector_id left join country as t3 on t3.country_id = t1.company_country_id left join broker_directory_comment as t5 on t1.broker_directory_id=t5.broker_directory_id In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'alternat_db2018.t1.broker_directory_id'; this is incompatible with sql_mode=only_full_group_by