I have a table in this form:
id | firstname | lastname ---+-----------+---------- 1 | alex | marti 2 | mark | finger 3 | alex | marti 4 | ted
select id, firstname, lastname from table t where exists (select 1 from table t2 where t2.firstname = t.firstname and t2.lastname = t.lastname and t2.id <> t.id)