prova questa:
codice:select cl.ext,nome,cognome from classi cl inner join codice on cl.ext = codice.ext where cl.ext not like "zz%" group by concat(cl.ext,nome,cognome) having count(concat(cl.ext,nome,cognome)) < 2 and cl.ext in (select ext from classi group by ext having count(ext) > 1);