Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 totaling data

Author  Topic 

JJins
Yak Posting Veteran

81 Posts

Posted - 2011-01-28 : 16:33:14
I am trying to total "dalySales" How would I add it to this query

SELECT dbo.DailyRecord.*
FROM dbo.DailyRecord
where date between '2004-11-17 00:00:00' and '2005-07-22 00:00:00'

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-01-29 : 11:06:26
[code]
SELECT SUM(dailySales) AS DailyTotalSales
FROM dbo.DailyRecord
where date between '2004-11-17 00:00:00' and '2005-07-22 00:00:00'
[/code]

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -