On Sunday, March 27, 2005 19:48, Louie Miranda wrote:

> mysql> select count(*) - count(distinct username,email) as 'duplicate
> names' from users;
> +-----------------+
>> duplicate names |
> +-----------------+
>>               2 |
> +-----------------+
> 1 row in set (0.00 sec)
> 
> I got this select syntax to count how many duplicate entries i have.
> But i dont know how to show the duplicate entries i have on that
> table.
> 

SELECT username, email, COUNT(*) as n 
FROM users
GROUP BY username, email 
HAVING n > 1

> Pls help!
> 
> --
> Louie Miranda
> http://www.axishift.com

-- 
Tom Crimmins
Interface Specialist
Pottawattamie County, Iowa

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to