Código SQL:
Ver originalSELECT * FROM(
SELECT Nombre,Codigo,NumCta,isnull(cargo,0) AS cargo, isnull(abono,0) AS abono, ROW_NUMBER() OVER(partition BY codigo ORDER BY codigo ASC) AS rn FROM
(
SELECT CTA.Nombre AS Nombre,S.Codigo AS Codigo,CTA.Codigo AS NumCta, SUM(CASE WHEN TipoMovto = 0 THEN Importe END) AS Cargo,
SUM(CASE WHEN TipoMovto = 1 THEN Importe END) AS Abono
FROM MovimientosPoliza AS M
INNER JOIN Cuentas Cta ON Cta.Id = M.IdCuenta INNER JOIN SegmentosNegocio S ON Cta.Id = M.IdCuenta
GROUP BY CTA.Nombre,Cta.Codigo,S.Codigo
) AS MovimientosPoliza
) AS t1 WHERE rn=1
prueba ese codigo y comentas :)