See DISTINCT ON()
On Tue, Feb 03, 2004 at 12:22:29AM +0900, Alex wrote:
> Hi,
> I need to remove duplicate records from a table like
>
> Code Date
> XS111111 2004-01-26
> XS111111 2003-01-22
> XS222222 2004-02-01
> XS222222 2004-01-26
> XS222222 2003-01-22
>
> where only the newest record of Code XSxxxxxxx is kept in the table. Is
> there an easy way to do that?
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> (... have gone from d-i being barely usable even by its developers
> anywhere, to being about 20% done. Sweet. And the last 80% usually takes
> 20% of the time, too, right?) -- Anthony Towns, debian-devel-announce