Я подозреваю, что вы просто хотите union all
:
select weekid, acc1, acc2, acc3, acc4, value
from t
union all
select weekid, acc1, acc2, acc3, 'Fixed new' as acc4,
( max(case when acc4 = 'd' then value end) /
max(case when acc4 = 'e' then value end)
) as value
from t
group by weekid, acc1, acc2, acc3;