Vedi se funziona così:

select t1.cognome from tabella t1, tabella t2 where t1.cognome=t2.cognome