This will return the top 50 urls in descending order of popularity.

SELECT URL, count(1) as popularity
FROM yourtablename
GROUP BY URL
ORDER BY popularity DESC
LIMIT 50;

Feel free to adjust as needed.

HTH,

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

"Ed Lazor" <[EMAIL PROTECTED]> wrote on 12/23/2004 01:45:30 PM:

> 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]
> 

Reply via email to