create table tablename (runid int,rundate date,errorid int);
insert into tablename values
(101 , '2017-04-11', 1),
(101 , '2017-04-11', 2),
(101 , '2017-04-11', 3),
(102 , '2017-04-22', 2),
(102 , '2017-04-22', 3),
(103 , '2017-04-26', 1),
(104 , '2017-04-27', 3),
(105 , '2017-04-28', 4)
;
with t1 as (select runId,runDate,errorID
,first_value(runDate) over(partition by errorID order by runDate desc rows between unbounded preceding and unbounded following) as last_seen
from tablename)
select
distinct t1.errorid
,first_value(t.rundate) over(partition by t1.errorID order by t1.runDate desc rows between unbounded preceding and unbounded following) as rundate
,first_value(t.runID) over(partition by t1.errorID order by t1.runDate desc rows between unbounded preceding and unbounded following) as runid
from t1
join tablename t on t.runDate>t1.last_seen