On 11/10/11 12:55, Adarsh Sharma wrote:
Thanks Craig, but I solved the issue by the below query :- Yep, so you used the self-join method. That works, though it's probably quite a lot slower than using a window function for the job. I'm glad you found a suitable solution for your needs. -- Craig Ringer |