select
substr(record_id, 1, 4),
COUNT(*) as counts
from monitor_alert_notification
where
env = "prod"
and gmt_create > "2022-06-06 12:10:00"
and notify_status = "FAILED"
-- and record_id not LIKE '677%'
-- and record_id not like "local%"
group by substr(record_id, 1, 4)
11-09
6014
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountBlack.png)