Retrieve unique values in a table and rank by number of times they occur

We have a table recording hits on our web site. How could we write a query to retrieve unique IP addresses AND. The number of times each IP address occurs?

Thanks in advance
nhmediaAsked:
Who is Participating?
 
LIONKINGCommented:
SELECT ip_address, COUNT(*) AS Times_Hit
FROM myHitTable
GROUP BY ip_address
0
 
mmr159Commented:
SELECT ip_address,COUNT(ip_address) AS cnt
FROM table_name
GROUP BY ip_address
0
 
nhmediaAuthor Commented:
Thanks, both solutions  worked a treat
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.