日期:2014-05-18 浏览次数:20460 次
select SUM(sp.LeftAmount) as Amount ,sp.ShopID as shopID from ShopProduct as sp where sp.ProductID=238 group by sp.ShopID having SUM(sp.LeftAmount)<=8
------解决方案--------------------
select SUM(sp.LeftAmount) as Amount ,sp.ShopID as shopID from ShopProduct as sp where sp.ProductID=238 group by sp.ShopID having SUM(sp.LeftAmount) < 8