select id, max(enddate) from yourTable group by 1 order by 1
>Let's say I have a table with 3 fields.
>
>id (c), startdate (d),enddate (d)
>
>I have multiple records per id with different dates and I need the latest dates for all id's..
>
>ex..
>
>00001,12.01.2001,12.02.2001
>00001,12.01.2002,12.02.2002
>00001,12.01.2003,12.02.2003
>00002,12.01.2001,12.02.2001
>00002,12.01.2002,12.02.2002
>00003,12.01.2001,12.02.2001
>00003,12.01.2002,12.02.2002
>00003,12.01.2003,12.02.2003
Doru