--SQL Server 2012 SELECT ProductID, Price FROM (SELECT ProductID, Price , SUM(Price) Over(Order By ProductID) as runningTotal FROM @Products ) t WHERE runningTotal<1000 ORDER BY ProductID
↧
Re: How to do this Query?
↧