Ed,

Try the following query

select ID,
        DateAdded,
        URL,
        count(*) as 'cnt'
from mytable
group by URL
order by cnt desc

It should display the most numerous URLs in the table.

dimitar

-----Original Message-----
From: Ed Lazor [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 23, 2004 1:46 PM
To: 'mysql'
Subject: Query question


I use a table to log what pages on the website are getting visits with a
table structure like this:

ID
DateAdded
URL

Now I'm trying to query the database to see which URLs are most popular, but
I'm not sure how to go about doing this.  Any ideas?

Thanks,

Ed



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to