Hola oscarac, con la subconsulta que dices tendría que ser algo así:
Código SQL
[-]
select codigo
from tabla t
where importe_total=(select sum(importe_individual) as suma
from tabla
where codigo=p.codigo
group by registro)
......................................
......................................
o con having, como te indicaba Román, talvez así:
Código SQL
[-]
select registro
from tabla
group by registro, importe_total
having importe_total=sum(importe_individual)
donde solo te mostraría los registros que cumplen tu condición.
Saluditos