Count number of duplicate rows, sort from most to least (statistic) I'm trying to make statistic of top-10 most visited URL. I have one simple table. For each URL visit, one row added with that URL as content. Most visited URL has the most number of duplicate.

I've found many reference to SELECT count(*) FROM tablename WHERE url='tofind' but that only works if I supply the URL data.

Suggestion are welcome.
Have you tried something like:

SELECT COUNT(url) AS My_Count 
FROM tablename 
GROUP BY url
ORDER BY My_Count DESC 
LIMIT 10 ;