Trying to run a query to pull multiple sums (with conflicting criteria).As designed it obviously does not work as it cancels itself out. Can anyone tweak this to give me an idea of how I should designing these?From the code ... my sum RestTotal should be sum for productids 142, 143, 152,153my sum NonTotal should be sum of all but productids 142,143,152,153my sum Total is some of all combined.SELECT dbo.tblContractDetail.ZoneNo, dbo.tblContractDetail.InHomeDate, SUM(dbo.tblProducts.PagePercent) AS RestTotal, SUM(dbo.tblProducts.PagePercent) AS NonTotal, SUM(dbo.tblProducts.PagePercent) AS TotalFROM dbo.tblContractDetail INNER JOIN dbo.tblProducts ON dbo.tblContractDetail.ProductID = dbo.tblProducts.ProductIDWHERE (dbo.tblContractDetail.InsertType = 'M') AND (dbo.tblContractDetail.FranchiseID = N'mdipho')GROUP BY dbo.tblContractDetail.ZoneNo, dbo.tblContractDetail.InHomeDate, dbo.tblContractDetail.ProductIDHAVING (NOT (SUM(dbo.tblProducts.PagePercent) IN (142, 143, 152, 153))) AND (SUM(dbo.tblProducts.PagePercent) IN (142, 143, 152, 153))