Ver original"SELECT EosCodEmp,EosFecCot,EosCodRub,sum(Case when EosCodDC = 'C' THEN EosImpMN *-1 ELSE EosImpMN END) FROM Linea_Factura Where Eoscodemp = 'IS' group by EosCodEmp,EosFecCot,EosCodRub"