The following only do notes
Consider the following table [FM_ALARM]
RES_ID : 资源的唯一标识
OCCUR_TIME : 发生时间(毫秒时间戳)
SEVERITY : 告警级别
Real-time data will change, I want to remove the latest record of all data, you can use the following SQL
select res_id, severity
from fm_alarm t
where not exists (select 1
from fm_alarm
where t.res_id = res_id
and t.occur_time < occur_time)