It's get a lot trickier when considering tie ! =D
But already pretty instructive for a beginner puzzle.
@lyqandgdp : Thanks for your solution, i will try to use more CTE enven if i'm not so comfortable with them.
@Marc Jellinek : Indeed Rank() is worthly but I'm still struggling because when there is a tie, it numbers them : '1,1,3' and then '1,1,1,4', ... so no number 2 to look for. But I thinks it's the best way. Thanks for your help.
commented on May 3 2012 7:49AM