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)
字符串切割 group by
最新推荐文章于 2023-04-12 17:49:12 发布