Gossamer Forum
Home : General : Databases and SQL :

Finding Unique IP

Quote Reply
Finding Unique IP
Hi-

I'm trying to analyze some information in my LinksSQL ClickTrack table, and wonder if there is an SQL command that will find the number of unique IP addresses for a give time period. So, it would be something like:

SELECT IP (Unique Somehow?)
FROM ClickTrack
WHERE Created > '20030401000000'
and Created < '2030402000000'

Does anyone know if there is an SQL command that will find the total number of Unique instances of a column value?

-Frank
Quote Reply
Re: [FrankM] Finding Unique IP In reply to
MySQLMan will return the number of rows so just use:

SELECT DISTINCT(IP)
FROM ClickTrack
WHERE Created > '20030401000000'
and Created < '2030402000000'
Quote Reply
Re: [Paul] Finding Unique IP In reply to
Perfect! Thanks very much.

--Frank