select a.clearId,GROUP_CONCAT(DISTINCT gt.alarmTitle ORDER BY gt.clYxj) alarmTitle, CONVERT(SUBSTRING(GROUP_CONCAT(gt.clYxj ORDER BY gt.clYxj),1,1),UNSIGNED INTEGER) clYxj, GROUP_CONCAT(DISTINCT gt.gjHy ORDER BY gt.clYxj) gjHy, case when a.standardName is null then 0 else length(a.standardName) != char_length(a.standardName) end as standardNameHz, a.eventTime,a.standardName,a.standardCode,CONVERT(SUBSTRING(GROUP_CONCAT(b.isXq ORDER BY b.isXq),1,1),UNSIGNED INTEGER) isXq, b.sceneTypeName,b.codeOrName,b.gridNameShort,b.oneSceneName,b.standardTypeName,b.standardZsName,b.packName,og.orgkind, case when b.isXq=1 then GROUP_CONCAT(b.standardName) else '' end as utranCellConcat,a.codeOrName,1 gdKind from gj a left join logical_standing_alarm b on a.codeOrName = b.codeOrName left join wcn.tbl_org og on b.gridNameShort = og.allname left join gjkind gt on a.alarmTitle = gt.alarmTitle where a.eventDay = 20230305 and clearTime is null and b.gridNameShort is not null and b.standardZs !='22' and b.regularPowerOutages='0' and TIMESTAMPDIFF(MINUTE,eventTime,NOW())>=10 and TIMESTAMPDIFF(MINUTE,eventTime,NOW())<=15 and b.standardCode != 'CCF14EGX07213' and b.standardCode != 'CCF14EGX07362' and b.standardCode != 'CCF14EGX07491' and b.standardCode != 'CCF14EGX07497' and b.standardCode != 'CCF14EGX08092' and b.standardCode != 'CCF14EGX08093' and b.standardCode != 'CCF14EGX08127' and b.standardCode != 'CCF14EGX08156' and b.standardCode != 'CCF14EGX08159' and b.standardCode != 'CCF14EGX08161' and b.standardCode != 'CCF14EGX08172' and b.standardCode != 'CCF14ENG08169' and b.standardCode != 'CCF14ENG08171' and b.standardCode != 'CCF15EGX07233' and b.standardCode != 'CCF15EGX07240' and b.standardCode != 'CCF15EGX07386' and b.standardCode != 'CCF15EGX07444' and b.standardCode != 'CCF15EGX07642' and b.standardCode != 'CCF15EGX08545' and b.standardCode != 'CCF15EGX08548' and b.standardCode != 'CCF16EGX00020' and b.standardCode != 'CCF16EGX07620' and b.standardCode != 'CCF16EGX07744' and b.standardCode != 'CCF16EGX07754' and b.standardCode != 'CCF16EGX07772' and b.standardCode != 'CCF16EGX08331' and b.standardCode != 'CCF16EGX08337' and b.standardCode != 'CCF16EGX08338' and b.standardCode != 'CCF16EGX08343' and b.standardCode != 'CCF16EGX08358' and b.standardCode != 'CCF17EGX00469' and b.standardCode != 'CCF18EGX07396' and b.standardCode != 'CCF19ENG04265' and b.standardCode != 'CCF21EGX06588' and b.standardCode != 'CCU20E0T07317' and b.manufacturerName='爱立信' and gt.maker = '爱立信' and (a.alarmTitle = 'Heartbeat Failure' or a.alarmTitle = 'Service Unavailable' or a.alarmTitle = 'Resource Activation Timeout') group by DATE_FORMAT(a.eventTime,'%Y-%m-%d %H:%i'),a.standardName ORDER BY isXq asc