Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-03-05
3
Medium Priority
?
429 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:nhmedia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 13

Accepted Solution

by:
LIONKING earned 1000 total points
ID: 35044001
SELECT ip_address, COUNT(*) AS Times_Hit
FROM myHitTable
GROUP BY ip_address
0
 
LVL 7

Assisted Solution

by:mmr159
mmr159 earned 1000 total points
ID: 35044010
SELECT ip_address,COUNT(ip_address) AS cnt
FROM table_name
GROUP BY ip_address
0
 

Author Closing Comment

by:nhmedia
ID: 35044052
Thanks, both solutions  worked a treat
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question