Re: Query for duplicate records

From: Date: Sun, 17 Oct 2010 22:14:00 +0000
Subject: Re: Query for duplicate records
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-47391@lists.php.net to get a copy of this message
On 18/10/10 06:55, Ron Piggott wrote:
Is there a query you could help me write a SELECT query that would search table ministry_profiles for where column organization has the same organization more than once? I am trying to delete the duplicate organization records, but I am working with 1,000+ businesses and I can't go through each record looking for duplicates.
select organization, count(*) from ministry_profiles group by organization having count(*) > 1; gives you which organization has more than 1 account (and how many duplicates you are dealing with). -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.db (#47391) next »