Can someone help me out with this? I’m not sure why my group by isn’t working.
SELECT [Date], SUM(counted) as TotalCount
FROM dbo.TableName
GROUP BY [Date], TotalCount
ORDER BY [Date]
result
Date TotalCount
2011-09-07 00:00:00.000 12
2011-09-07 00:00:00.000 14
2011-09-07 00:00:00.000 11
I’m wanting the result to look like the following
2011-09-07 00:00:00.000 37
Thanks
This MSSQLServer 2008, and I want to group by the date and time.
Don’t
GROUP BY [Date], TotalCountinstead you needGROUP BY [Date]This would cause an error though unless you also had a column in your source of that name, e.g. as below.