clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 1130830 fiddles created (16560 in the last week).

with subqry(host, name, severity, clock) as ( select 'tete', 'Processor load is too high on tete', 3, 1575023065 union all select 'tete', 'Processor load is too high on tete', 0, 1575022885 union all select 'tete', 'Processor load is too high on tete', 3, 1575022645 union all select 'tete', 'Processor load is too high on tete', 0, 1575022585 union all select 'tete', 'Processor load is too high on tete', 3, 1575022524 union all select 'titi', 'Zabbix agent for titi is unreachable for 8 minutes', 3, 1575022429 union all select 'gege', 'Processor load is too high on gege', 0, 1575022283 ) SELECT host, name, severity, clock_un, clock FROM ( SELECT s.*, from_unixtime(clock) as clock_un, row_number() over (partition by host order by clock) as rn FROM subqry s ) t WHERE rn = 1 ORDER BY clock desc
host name severity clock_un clock
tete Processor load is too high on tete 3 2019-11-29 10:15:24 1575022524
titi Zabbix agent for titi is unreachable for 8 minutes 3 2019-11-29 10:13:49 1575022429
gege Processor load is too high on gege 0 2019-11-29 10:11:23 1575022283
 hidden batch(es)