lookup "WITH ROLLUP", it outputs summary data for each column in your group
by.
SELECT DateAccessed
, COUNT(IPAddress) AS Hits
FROM Hits_ThirdQuarterVideo
GROUP BY DateAccessed WITH ROLLUP
[quoted text, click to view] "zwieback89 via SQLMonster.com" <u28634@uwe> wrote in message
news:78b622059b360@uwe...
> Hi,
>
> I have a query that shows a total number of hits for each day. The query
> is:
>
> SELECT DateAccessed, COUNT(IPAddress) AS Hits
> FROM Hits_ThirdQuarterVideo
> GROUP BY DateAccessed
>
> My question now is how to get the total sum of all the counts per day? Is
> this possible to do so in SQL statement?
>
> Thanks.
>
> --
> ---------------------
> zwieback89
>
> Message posted via SQLMonster.com
>
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-programming/200709/1
>