select cod_n,cod_grupo,cod_tipo,cod_sec,count(*) from cgtb00018 where cod_n = 8 group by 1,2,3,4 having count(*) > 1 order by 1,2,3,4