можете да използвате: Delete from activity_logs WHERE mod_result = 'Fail' AND cert_links = '' or ''NULL'