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