My query skills are sorely lacking so hopefully someone can help me with this.
My table is called IPAddresses and it contains:
DateAdded as datetime
IPAddress as varchar(15)
I want to know what each distinct IPAddress is, and I also want to know what the total count for each distinct IPAddress is. I can easily do either one, but can't figure out a way to do both so that I have both the count and the actual IPAddress being counted.
My purpose is to see which IP Addresses are hitting a site of mine the most, so sorting in descending order of the total count would be helpful.
This is a query I'll be executing manually once a day or so, so I'm not too concerned with how efficient it is.
Thanks.