MySQL Forums
Forum List  »  Newbie

Counting single column with multiple values
Posted by: Rodney Beck
Date: May 26, 2005 05:37AM

This is a stupid question and I know I'm missing the answer somewhere...

My table is like so:

IP | hostname
201.283.0.1 | somehost.com
201.283.0.1 | someotherhost.com
184.183.12.43 | justanother.com

I want to count the number of unique IP addresses in the table... I'm using COUNT(*) at the moment but that's returning 3 when I want it to return 2.

I know I've read this somewhere before but I can't find it... Stupid brain.

Options: ReplyQuote


Subject
Written By
Posted
Counting single column with multiple values
May 26, 2005 05:37AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.