From: Michal Ludvig Date: March 20 1999 6:33pm Subject: Re: Help with query, plz List-Archive: http://lists.mysql.com/mysql/691 Message-Id: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII > COUNT(DISTINCT(...)) doesn't work in MySQL (yet). Try this: > > SELECT COUNT(*) FROM table GROUP BY ip; It tells me how many times each IP is in the table, but that's not what I need. I need the count of >different< IPs. > > On Sat, Mar 20, 1999 at 07:20:50PM +0100, Michal Ludvig wrote: > > INSERT INTO tabtmp SELECT DISTINCT ip FROM table > > and then querying that new table: > > SELECT COUNT(ip) FROM tabtmp > Michal Ludvig