select
s.tot, o.cod, o.name
from
occ o,
(select count(name) tot, cod
from occ
group by cod
having count(name) > 1) s
where
o.cod = s.cod