0 - 1 of 1 tags for reset

Hello all,
This is my first post in the forum and please excuse me if i am off the hook with my post.
I am writing a sql logic and i am stuck at a point where i am not sure how to proceed.  I am hereby giving some synopsis about the issue and i will really appreciate if you can guide me how to proceed to the resolution.