select remun_id, date_majfrom ( select r.*, max(date_maj) over (partition by REMUN_ID) as max_date from histo_statut_remun r) where date_maj = max_date and statut = 2;
SQLFiddle:http
://sqlfiddle.com/#!4/7eb75/1

select remun_id, date_majfrom ( select r.*, max(date_maj) over (partition by REMUN_ID) as max_date from histo_statut_remun r) where date_maj = max_date and statut = 2;
SQLFiddle:http
://sqlfiddle.com/#!4/7eb75/1