I\'m writing an application that calculates the ranking of teams in the pool stages of a rugby competition (Rugby World Cup 2015, but it could apply to many other pool-based
This is complicated, but I would try the following.
Make a view each combination of opponents and who wins the tie.
With the results of your current ranking add in a column for the prior player, a column for prior rank, a column for next rank using windowing functions
Join to the view in step 1
Make a case statement that only sets a value if prior rank or next rank is equal that has the value from the view in step 1.