Where is the actual problem you have?
In reply to Re: sort based on last and first value by Corion in thread sort based on last and first value by Anonymous Monk