with t as (
select 1 id,'A' 部门,'甲' 责任人 from dual
union
select 2 id,'B' 部门,'乙' 责任人 from dual
union
select 3 id,'C' 部门,'丙' 责任人 from dual
union
select 4 id,'D' 部门,'甲' 责任人 from dual
union
select 5 id,'E' 部门,'丁' 责任人 from dual
)
select * from t
order by
first_value(部门)over(partition by 责任人 order by 部门)