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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 aggregate query

Author  Topic 

SalmanAhmed
Starting Member

5 Posts

Posted - 2004-11-02 : 17:11:23
Hi,

I have a statistics table that contains and ID for a webpage, each page view is recorded in this table.

How can I run a report to see the top 100 pages in the statistics table and their total counts?

ehorn
Master Smack Fu Yak Hacker

1632 Posts

Posted - 2004-11-02 : 17:39:30
[code]select top 100 id, count(id) as hits
from statistics
group by id
order by count(id) desc
[/code]
Go to Top of Page

kselvia
Aged Yak Warrior

526 Posts

Posted - 2004-11-03 : 01:08:39
A log analyzer might be more informative than your own stats. You might look at WebLog Expert http://www.weblogexpert.com

I know there are a lot of log analyzers out there, but I happened across this one and used it recently. It served my needs.

--Ken
I want to die in my sleep like my grandfather, not screaming in terror like his passengers.
Go to Top of Page
   

- Advertisement -