Това ли искате?
select e.*
from egr e
where not exists (select 1
from egr e2
where e2.groupid = e.groupid and e2.offid <> e.offid
);
Или ако искате да се ограничите само до тези две оферти:
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
);