insert into ABC (id,Name,Value) values('1','aaa','A');
insert into ABC (id,Name,Value) values('2','aaa','A');
insert into ABC (id,Name,Value) values('3','aaa','A');
insert into ABC (id,Name,Value) values('4','aaa','A');
select DISTINCT t.* from ABC t join ABC tt on t.id <> tt.id and t.name = tt.name;