I'm not sure about your example either, but if you want to look at something from another row in a given query subset you can use the lead/lag analytic tools. Here are two links that describes the lead/lag functions as they relate to the partition by clause.

hXXp://www.stanford.edu/dept/itss/do...s.htm#i1007032
hXXp://www.oracle-base.com/articles/...cFunctions.php