>>Please post create table for the test and a few records insert statements.
>
>The approach of Borislav will do it. I am just adjusting the syntax to make it work.
I wanted to write you a simpler to understand / read query, but I need a test table and a few records to test.
If it's not broken, fix it until it is.
My Blog