Re: identifying duplicates in table with redundancies - Mailing list pgsql-sql

From Tarlika Elisabeth Schmitz
Subject Re: identifying duplicates in table with redundancies
Date
Msg-id 20100927175418.162ee906@dick.coachhouse
Whole thread Raw
In response to Re: identifying duplicates in table with redundancies  (Oliver d'Azevedo Christina <oliveiros.cristina@gmail.com>)
List pgsql-sql
On Fri, 24 Sep 2010 18:12:18 +0100
Oliver d'Azevedo Christina <oliveiros.cristina@gmail.com> wrote:

>>> SELECT DISTINCT trainer_id,trainer_name
>>> FROM (
>>> SELECT trainer_name   -- The field you want to test for duplicates
>>> FROM (
>>> SELECT DISTINCT "trainer_id","trainer_name"
>>> FROM student
>>> ) x
>>> GROUP BY "trainer_name"    -- the field you want to test for  
>>> duplicates
>>> HAVING (COUNT(*) > 1)
>>> ) z
>>> NATURAL JOIN student y  



What indices would you recommend for this operation?

-- 

Best Regards,
Tarlika Elisabeth Schmitz


pgsql-sql by date:

Previous
From: Vibhor Kumar
Date:
Subject: Re: pgdump with insert command help
Next
From: gangadhar bandaru
Date:
Subject: eB7E2R