clear markdown compare help best fiddles feedback
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 2555451 fiddles created (37471 in the last week).

create table tbl (fld1 text, fld2 text); insert into tbl values ('abc', 'D123'), ('xyz', 'D123'), ('abc', 'D125'), ('abc', 'D128'), ('def', 'D128'), ('abc', 'D789');
6 rows affected
 hidden batch(es)

select t1.* from tbl t1 where fld1 = 'abc' and exists (select 1 from tbl t2 where t2.fld2 = t1.fld2 group by fld2 having count(*) = 1);
fld1 fld2
abc D125
abc D789
 hidden batch(es)