Ver originalSELECT count(ID) as pcount FROM mitabla m INNER JOIN (SELECT apellido, nombre FROM mitabla WHERE id_encomun < '1' GROUP BY apellido, nombre HAVING COUNT(*) > 1)t1 ON m.apellido = t1.apellido AND m.nombre = t1.nombre