In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'towbar_fitters.jm_jobleadflowmgmt.rfr_deleted_field'; this is incompatible with sql_mode=only_full_group_by
SELECT rfr_deleted_field,flag,IF(`rfr_deleted_field`, COUNT(`id`), 0) AS cnt FROM jm_jobleadflowmgmt WHERE `jobid` = 'JM1003388' AND `contractor_id` = '' AND `status` = 'I'