MySQL Forums
Forum List  »  New in 4.1: Subqueries

Re: Problem with "Find Duplicates" using subquery
Posted by: sai ram
Date: May 14, 2005 04:13AM

Hi.,

I have a very simple solution.,

Just group by the column for which you don't want duplicates and do a select * from .,

you will be surprised to see the result coming without duplicates.,

It should be like this ,.

select * from Donations group by date,amt,donor

No inner joins, no sub query etc.,

The point is .,when " select * from " is used .,along with group by ., mysql engine .,takes the first row of matching record.,



Hope it makes sense..,

Sairam
GofrugalTech
Chennai,India

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Problem with "Find Duplicates" using subquery
4315
May 14, 2005 04:13AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.