• Actually this issue was asked in an interview of mine and my answers were to use Row_Numbers, Cursors , functions etc . but they forced me to provide a solution without native powers of tool and to do this by using simple SQL.

    i threw this question here for my knowledge if there exists a solution for that.

    thanks