Er det det, du vil have?
select e.*
from egr e
where not exists (select 1
from egr e2
where e2.groupid = e.groupid and e2.offid <> e.offid
);
Eller hvis du vil begrænse til kun disse to tilbud:
select e.*
from egr e
where e.offid in (1, 2) and
not exists (select 1
from egr e2
where e2.groupid = e.groupid and
e2.offid in (1, 2) and
e2.offid <> e.offid
);