This should be simple enough but something's gotten me big time.
All I have is a table with just TWO columns, something like:
WordCount DateAdded ````````````````````````````` 96 2008-11-07 09:16:31.810 32 2008-11-07 15:26:27.547 25 2008-11-23 16:05:39.640 62 2008-12-03 12:33:03.110 and so on.
I want to calculate the total word count for each day - I group them by dateadded and select sum of WordCount and finally get the syntax error (wordcount has to be in group by clause) but now I am getting nulls for day's count
This is my query:
select SUM(WordCount) as 'words per day' from @WordsCount group by DateAdded, WordCount this is selecting just null. How can I know what is wrong?
thanks.