SELECT a.IdLibro, a.Nombre, a.Total AS TotalActivo, ISNULL(b.Total, 0) AS TotalBaja FROM ActivosBajas AS a LEFT JOIN ActivosBajas AS b ON b.IdLibro = a.IdLibro AND b.Estado = 'B' WHERE a.Estado = 'A'