Sorry I was not clear, there are other columns including a sequence. Thanks for the results, they are helpful! I am always in Dallas, since I live here. I will be at Hotsos next month. Looking forward to it, highlight of my year professionally speaking. - Ethan On 2/8/06, Wolfgang Breitling <breitliw@xxxxxxxxxxxxx> wrote: > Looks extremely ugly and I have no idea how it performs on something > with more than 30 rows, but it appears to give the correct answer, > provided I coorectly understood what the question was: > -- //www.freelists.org/webpage/oracle-l