Friday, November 28, 2014

How can i get end balance

Your question is not clear...


Are you looking for the below? If not, please provide sample data and your desired output....



SELECT tday,SUM(balance) AS 'Total Balance'
FROM savta
WHERE prodid = 'S004'
--AND tday ='2014-09-01'
AND balance BETWEEN '10' AND '100'
Group by tday


No comments:

Post a Comment