Re: duplicate rows




patrick wrote:
Hello,

I have 4 columns:

A B C 2007/01/01
A B C 2005/01/01
A B D 2007/01/01

I would want to extract duplicates rows on first 3 columns, but with
the max date.
Here, I should extract :
A B C 2007/01/01

I've tried with a table join (+ having count() > 1), but without
success.
Is there a sample way to solve this ?

Thanks in advance.


select col1, col2, col3, max(col4) from mytable group by col1, col2,
col3 having count(*) > 1

.