Hi,
maybe a bit dirty but I think this should also work
select line, dept, pr, et
from table
where et is null
union
select line, dept, pr, max(et)
from table
where line & dept & pr (if you have id, replace with id) not in (select distinct line & dept & pr
from table
where et is null)
group by...